Regression in bootstrapping in 3.4.7 around NRE in PruneNodes
Description
Environment
None
Gerrit Reviews
None
Release Notes Description
None
Attachments
2
Activity
Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Created June 8, 2023 at 12:29 PM
Updated June 12, 2023 at 4:20 PM
Resolved June 12, 2023 at 4:20 PM
When upgrading from 3.4.6 to 3.4.7 bootstrapping began to fail, showing this exception in the logs:
Based on review of the stack trace, I believe this is caused by the lack of a null check on IClusterNode.Owner here:
https://github.com/couchbase/couchbase-net-client/blob/b527bc98b681f89fae5954d7c1aad4eb01b49c35/src/Couchbase/Core/ClusterContext.cs#L834
I think this error probably existed before, but was being disguised until new error handling code was added in 3.4.7:
https://github.com/couchbase/couchbase-net-client/commit/7f3bf0f95142114b6453be6f4e26154fe884adbe#diff-ba5e9d3a81abb2d724c35296910c9b3a53782d6c9648fbcc3b4403cad8a60120R816
Now it throws the exception instead of simply logging and moving on.
In case it's a factor, the Couchbase Server details are:
Couchbase Server 6.6.5 Enterprise
Running in K8S via the Autonomous Operator
Two buckets used by this service, one Couchbase and one Ephemeral
MDS scaling with separate services per node
Application details:
.NET 6 using ASP.NET Core MVC
Using DI extensions
Not using WaitUntilReadyAsync, simply requesting the bucket