-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return a consistent boc state from ObjWaitExtend()
Clients to the Object API need to know not only the current extension (new length) of streaming objects, but also the streaming state - in particular BOS_FINISHED and BOS_FAILED. The latter for obvious reasons, and the former to call the delivery function with OBJ_ITER_END, which then likely results in VDP_END sent down the delivery pipeline. Background: It is important for efficient delivery to not receive an additional VDP_END with a null buffer, but rather combined with the last chunk of data, so, consequently, it is important to reliably send OBJ_INTER_END also with the last chunk of data. Consequent to all of this, ObjWaitExtend() callers need to know when BOS_FINISHED has been reached for some extension. The current API, however, does not provide a consistent view of the streaming state, which is only available from within the critical region of ObjWaitExtend(). Thus, we add the streaming state as an optional return value. With this commit, we also remove a superfluous line to set rv again: Because boc->fetched_so_far must only be updated while holding the boc mutex, reading the value again provides no benefit.
- Loading branch information
Showing
5 changed files
with
21 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters