DESCRIPTION

JVMCBC-44 : if bucket was closed, operations will throw a BucketClosedException

Motivation
-----------
After closing a bucket, one expects not to be able to use the bucket anymore.
However subsequent request are not rejected gracefully and usually result in
a TimeoutException (for example for a GetRequest).

Modifications
-------------
The RequestHandler now has a check in place to verify that given bucket name is
known in the cluster. It lets bootstrapping requests go through in order for the
configuration to correctly be known.

If the bucket name is not in configuration, then it means the bucket has been
closed and the request is ignored. The request's Observable is failed immediately
with a BucketClosedException.

Users can be impacted if they were watching for TimeoutExceptions specifically
to detect a closed bucket.

Result
------
Any request to do some work with a closed bucket immediately fails into a
BucketClosedException (passed in the onError method of the request's Observable).

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


COMMENTS

author: Natasha Sullivan
date: 2014-10-16 14:11:18.655000000

Change has been successfully cherry-picked as 68377aa00e51933f33302d04e4c0877a88fb93d0

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