...
In the final COMMIT step, the server includes the segment metadata and the segment creation metadata files so that the controller need not extract these from the segment in order to complete the segment and start the next one.
Note |
---|
The segment upload should ideally be going to the Segment store directly. That modification will be worked on independent of this one |
Design
We will add a new REST endpoint for segmentCommit step (3rd step of segment completion). This will be a POST endpoint, that includes a multi-part form. The multi-part POST has the following two parts:
...
The controller end point will extract these two files and use them for segment completion. The controller code is to be re-factored so that the single-step commit extracts these elements from the posted segment before calling the SegmentCompletionManager to do the final step. So, the code path for the final step will be common in either methods of segment completion.
...
Backward compatibility
The controller will be modified to expose both of the endpoints so that older servers will be able to work with the newer controllers.
...