You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NCBC-4187: Config versions is sometimes null in logs
Motivation
==========
Debug-level logs for KV ops that aren't vBucket-mapped (e.g.
GetClusterConfig, Hello) emit "configVersion: null" because
op.ConfigVersion is only set in CouchbaseBucket.SendAsync
for vBucket ops. The version is still known on the ClusterNode
itself via NodesAdapter.ConfigVersion, so the log is
unnecessarily lossy.
Modification
============
- Added private helper EffectiveConfigVersion(IOperation op) on
ClusterNode that returns op.ConfigVersion ?? this.ConfigVersion.
- Updated the six KV/circuit-breaker LoggerMessage call sites in
ExecuteOp / SendAsyncWithCircuitBreaker to use the helper.
- No functional/behavioural change; op.ConfigVersion is unchanged
Result
======
GetClusterConfig and other non-vBucket ops now log the node's
known configVersion (e.g. "configVersion: 1/874") instead of "null".
Change-Id: I791635e885ebd27d1da1baeee07bf3bca6a8644f
Reviewed-on: https://review.couchbase.org/c/couchbase-net-client/+/244330
Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
Tested-by: Build Bot <build@couchbase.com>
0 commit comments