DESCRIPTION

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


COMMENTS

author: Estrella Humphrey
date: 2016-02-05 15:52:45.527000000

Uploaded patch set 5.

-------------------------------------
author: Estrella Humphrey
date: 2016-02-05 16:07:06.312000000

Patch Set 5: Code-Review+1 Verified+1

@intae I added tests, made a few corrections (javadoc and method naming) and run the full integration+unit test suite, this is now Verified+1.

@michael can you CodeReview+2 before this can be submitted?

-------------------------------------
author: Natasha Sullivan
date: 2016-02-05 16:13:10.023000000

Patch Set 5: Code-Review+2

-------------------------------------
author: Estrella Humphrey
date: 2016-02-05 16:20:22.532000000

Patch Set 5:

congratulations Paulina Bailey on being a SDK 2.2.5 contributor :)

-------------------------------------
author: Tate Garrett
date: 2016-02-05 16:20:28.845000000

Change has been successfully cherry-picked as cb6097de716752215959377f6a0618d747d664c7

-------------------------------------
