DESCRIPTION

JCBC-692: fix lock on creating DefaultQueryResult

Motivation
----------
Users reported that all they get when trying to do a n1ql query is a
timeout. This comes from a race condition/deadlock that happens when
instantiating the DefaultQueryResult (blocking on each component of the
AsyncQueryResult).

Modifications
-------------
Only ever block once, in CouchbaseBucket, instead of multiple times in
the DefaultQueryResult constructor, by using a zip.

Constructor now only deals with collections or scalar types, not with
Observables.

Results
-------
Acquiring a query result synchronously should now work as expected.

Change-Id: I535d51ba9d67077fba99d209f936efdd5458802d
Reviewed-on: http://review.couchbase.org/45868
Tested-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Estrella Humphrey
date: 2015-01-26 14:18:57.882000000

Change has been successfully cherry-picked as 401f57a620d21249ca359db52751b3c4f6dd7755

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