DESCRIPTION

SPY-165: Do not cache the selectedKeys.

Motivation
----------
Caching the selected keys may cause issues if the selector is accessed by different
threads, also the loop for the keys is not using the iterator correct.

Modifications
-------------
Make it not cache the keys and also correctly make use of an iterator to loop through
the keys.

Result
------
No stale/cached selected keys and correctly using the iterator should lead to better
stability during failure cases.

Thanks to Brad Svee xxx@xxx.xxx for suggesting the fix

Change-Id: If82cdfc810c758a4196415cb709a03ebd72c3d15
Reviewed-on: http://review.couchbase.org/36222
Reviewed-by: Natasha Sullivan xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2014-05-05 15:19:40.821000000

Change has been successfully cherry-picked as fde7a948c119fd510a41805ff376b133c400b927

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