DESCRIPTION

JVMCBC-43: Fix ConcurrentModificationException on disconnect with more buckets.

Motivation
----------
When more buckets are closed in parallel, a ConcurrentModificationException was raised
because the same map was still iterated while it was being updated.

Modifications
-------------
This changes first creates a distinct set of all the buckets to close and then iterates
over it, mitigating the possibility of iteration while modification.

Result
------
No more ConcurrentModificationException on shutdown with more than one bucket.

Change-Id: I270edaa9452a9212f5b0dd1038f9580d2739a250
Reviewed-on: http://review.couchbase.org/42122
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Cory Peck xxx@xxx.xxx


COMMENTS

author: Cory Peck
date: 2014-10-15 07:43:28.606000000

Change has been successfully cherry-picked as 6c96d5985483387f715157512f6f38696831a278

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