DESCRIPTION

Reuse VBucket objects from last Configs to lower GC pressure.

This changeset allows to (optionally) pass in a existing Config
and if VBucket objects are the same, those get reused in the new
Config and not creating new ones all the time. This lowers GC
pressure, especially during rebalance phases when 10 or more
CouchbaseClient objects are used.

Tests have been added, please note that the JSON configs will
be separated out into resource files in a different commit.

Change-Id: If979b5a52ffbcf7e87a4c59bb14f781bf48deaee


COMMENTS

author: Natasha Sullivan
date: 2013-11-04 14:05:12.525000000

Uploaded patch set 4.

-------------------------------------
author: Andreas Short
date: 2013-11-04 17:09:43.271000000

Patch Set 4: Code-Review+2

(2 comments)

...with a couple of questions.

Line:38, src/test/java/com/couchbase/client/vbucket/config/DefaultConfigFactoryTest.java -> Is this the right name for this class?  Is it the only test for this class maybe?

Line:107, src/test/java/com/couchbase/client/vbucket/config/DefaultConfigFactoryTest.java -> Shouldn't we know the exact number of same and changed?  I guess this is okay, but it's deterministic with this test, right?

-------------------------------------
author: Natasha Sullivan
date: 2013-11-04 17:19:25.089000000

Patch Set 4: Verified+1

(2 comments)

Line:38, src/test/java/com/couchbase/client/vbucket/config/DefaultConfigFactoryTest.java -> Huh? Not sure I understand.. there was no test for the factory before!

Line:107, src/test/java/com/couchbase/client/vbucket/config/DefaultConfigFactoryTest.java -> I could've counted them but I thought this is not of value.. I assumed it was important to see that we are reusing vbuckets at all.. 

in the loop we also verify the correct vbuckets (both ordering and actual content.)

-------------------------------------
author: Natasha Sullivan
date: 2013-11-04 17:41:24.187000000

Patch Set 4: Code-Review+2

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