Is getBulk consistent during a rebalance?


I’ve recently noticed that, when using the getBulk call on the CouchbaseClient instance during a rebalance of the cluster, that the values for some of the requested keys are not returned even though a key definitely. In my Couchbase client wrapper, I’ve augmented the call to getBulk to attempt to retrieve a value for any key that does not have a value in the Map object returned by the getBulk call. Is there are reason for this inconsistency?



Yes it is consistent during a rebalance, the same way the simple get is. You can find more information about the rebalance here:

The last paragraph of this page says:

While the vBucket migration process is taking place, clients are still sending data to the existing vBucket. This information is migrated along with the original data that existed before the migration was requested. Once the migration of the all the data has completed, the original vBucket is marked as disabled, and the new vBucket is enabled. This updates the vBucket map, which is communicated back to the connected clients which will now use the new location

So until the vBucket is entirely moved from one node to the new node the get operations will go to the existing one.