Skip to content
Latest commit cb6097d @great great committed with simonbasle JCBC-910: Add includeDocs variant to force order of get items
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.

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

This usage is flagged through the 'isOrderRetained()' method.

Added unit tests that validate this behavior.

A user can better tune view query result order consistency.

Change-Id: I3ca3998f13d40051297c228aa64661c785e2a5d1
Reviewed-by: Simon Baslé <>
Tested-by: Simon Baslé <>
Reviewed-by: Michael Nitschinger <>
Something went wrong with that request. Please try again.