Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.4.4, 3.4.5, 3.4.6
-
None
-
None
-
0
Description
Initial discussion on the issue: https://forums.couchbase.com/t/couchbase-v3-sdk-kvnotmyvbucket-errors-after-add-node-rebalance/35438
Initial ticket for the issue: https://issues.couchbase.com/browse/NCBC-3350
Preconditions:
- Have a cluster of 2 nodes where one get traffic (call it #1) and node waiting to be added to the cluster via rebalancing (call it #2)
- Have a .NET client sending requests to the cluster
Steps
- Block connections from the .NET client to the node #2
- Start rebalance operation
- In the middle of rebalance unblock connections to the node #2
- Wait for the rebalance to finish
Expected Result
The app is recovered after rebalance is finished and continue working properly
Actual Result
The app is not recovered and constantly throwing exceptions:
- Timeouts exceptions before v3.4.5
- TaskCancelledExceptions after v3.4.5 (this is not fixed in v3.4.6 which can be verified with this test)
Dev Notes
Lots of investigation details can be found on the forum topic and in the previous ticket (the links are above).
The latest details:
There is the difference between this patch set (that solves the issue) https://review.couchbase.org/c/couchbase-net-client/+/186991 and the released v3.4.5 (and v3.4.6) version.
It is in the ClusterContext.ProcessClusterMap method. In the patch and I believe in all previous versions it propagated all exceptions that might occur during connecting to the bucket class, but in the v3.4.5 there is a try catch block that handles all exceptions and just log them. This make the CouchbaseBucket.ConfigUpdatedAsync method to think that connection was established and update its CurrentConfig prop (which prevents from updating it in the future), but in the |Nodes collection there is still no new node.
Current code that hides exceptions: https://github.com/couchbase/couchbase-net-client/blob/master/src/Couchbase/Core/ClusterContext.cs#L813-L816
Attachments
Issue Links
- relates to
-
NCBC-3350 NotMyVBucket result in TaskCancellationException
- Closed
For Gerrit Dashboard: NCBC-3393 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
191786,13 | NCBC-3393: OperationTaskException may continue after rebalance completes | master | couchbase-net-client | Status: MERGED | +2 | +1 |