-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.6.4, 3.7.9
-
Component/s: Sharding
-
None
-
Sharding
-
41
This is because the donor shard sends authoritative=false in its setShardVersion request to the recipient, and setShardVersion requires authoritative=true if the shard does not have in-memory sharding state for this shard (which happens, for example, after the shard restarts or if this is the first chunk being received by the shard).
I think the fix is just to send authoritative=true, but we should probably also add some testing.
Noticed because of this log line while investigating a build failure:
d23011| 2018-03-16T19:26:02.396+0000 I COMMAND [conn18] command admin.$cmd appName: "MongoDB Shell" command: setShardVersion { setShardVersion: "foo.bar", init: false, authoritative: false, configdb: "upsert_sharded-configRS/ip-10-122-13-51:23012,ip-10-122-13-51:23013,ip-10-122-13-51:23014", shard: "upsert_sharded-rs1", shardHost: "ip-10-122-13-51:23011", version: Timestamp(2, 1), versionEpoch: ObjectId('5aac1a47a06d48723a19335e'), noConnectionVersioning: true, $clusterTime: { clusterTime: Timestamp(1521228362, 11), signature: { hash: BinData(0, F7FE62FC747161A2C451B9B9300408EF051CC7F8), keyId: 6533625978638303251 } }, $client: { application: { name: "MongoDB Shell" }, driver: { name: "MongoDB Internal Client", version: "3.7.3-66-gf092c84d7f" }, os: { type: "Linux", name: "Red Hat Enterprise Linux Server release 6.2 (Santiago)", architecture: "x86_64", version: "Kernel 2.6.32-220.el6.x86_64" }, mongos: { host: "ip-10-122-13-51:23015", client: "127.0.0.1:45799", version: "3.7.3-66-gf092c84d7f" } }, $configServerState: { opTime: { ts: Timestamp(1521228362, 11), t: 2 } }, $db: "admin" } numYields:0 ok:0 errMsg:"first time for collection 'foo.bar'" errName:UnknownError errCode:8 reslen:451 locks:{ Global: { acquireCount: { r: 2 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_msg 0ms
- duplicates
-
SERVER-34322 Best effort ssv to recipient shard will never succeed for the first time
- Closed