-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication, Sharding
-
None
I was trying to update the C Driver to update its clusterTime from replica set members' isMaster replies and send those new clusterTimes to other members in its isMaster requests. In my old code, the C Driver would initially discover the replica set by calling isMaster on all members, but ignore the clusterTimes it received in the server replies.
Now, I'm updating the client's clusterTime with the latest clusterTime seen in any isMaster reply as they are received, and I send that latest clusterTime with the next isMaster request to any member.
After this change, sending isMaster with a clusterTime to an arbiter causes:
{ "isMaster" : 1, "client" : { "driver" : { "name" : "mongoc", "version" : "1.10.0-dev" }, "os" : { "type" : "Darwin", "name" : "macOS", "version" : "17.4.0", "architecture" : "x86_64" }, "platform" : "cfg=0xde8265 posix=200112 stdc=201112 CC=clang 9.0.0 (clang-900.0.39.2) CFLAGS=\"-DBSON_MEMCHECK\" LDFLAGS=\"\"" }, "compression" : [ ], "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1521233526, "i" : 1 } }, "signature" : { "hash" : { "$binary" : { "base64": "mPi0HEcgHcDV49pG4rvOLU14yO4=", "subType" : "00" } }, "keyId" : 6533633155528654849 } } }
Here's the isMaster sent to the arbiter:
{ "operationTime" : { "$timestamp" : { "t" : 1521233526, "i" : 1 } }, "ok" : 0.0, "errmsg" : "Cache Reader No keys found for HMAC that is valid for time: { ts: Timestamp(1521233526, 1) } with id: 6533633155528654849", "code" : 211, "codeName" : "KeyNotFound", "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1521233526, "i" : 1 } }, "signature" : { "hash" : { "$binary" : { "base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType" : "00" } }, "keyId" : 0 } } }
The replica set was started with auth; however, the driver never attempts to authenticate to the arbiter.
Server version 3.7.0-1275-g96e775a44f.
- duplicates
-
SERVER-32639 Arbiters in standalone replica sets can't sign or validate clusterTime with auth on once FCV checks are removed
- Closed
- is related to
-
CDRIVER-2555 Update clusterTime from handshake replies
- Closed