-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JCBC-910: Add includeDocs variant to force order of get items
Motivation ---------- View query result order can be randomly mixed when includeDocs is true, if one of the documents takes longer to be retrieved (because of the efficient but unordered flatMap). Sometimes it should be consistent, even if that means a slight overhead on performance or memory. Modifications ------------- If includeDocs isn't used, concatMap can be used instead of flatMap (the ordering is correct and the impact is negligible). Added includeDocsOrdered variants that will enforce the row order. This uses the experimental concatMapEager operator that fires all get request immediately (instead of serially with a concatMap) and then buffers out of order responses to drain them in correct order as soon as it becomes possible. This usage is flagged through the 'isOrderRetained()' method. Added unit tests that validate this behavior. Result ------ A user can better tune view query result order consistency. Change-Id: I3ca3998f13d40051297c228aa64661c785e2a5d1 Reviewed-on: http://review.couchbase.org/59250 Reviewed-by: Simon Baslé <simon@couchbase.com> Tested-by: Simon Baslé <simon@couchbase.com> Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
- Loading branch information
1 parent
d556ad8
commit cb6097d
Showing
3 changed files
with
273 additions
and
20 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