[SERVER-34899] "best-effort" setShardVersion sent from donor to recipient after chunk migration commit always fails if this was first chunk migrated to recipient Created: 08/May/18  Updated: 06/Dec/22  Resolved: 08/May/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.4, 3.7.9
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-34322 Best effort ssv to recipient shard wi... Closed
Related
Assigned Teams:
Sharding
Participants:
Linked BF Score: 41

 Description   

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



 Comments   
Comment by Esha Maharishi (Inactive) [ 08/May/18 ]

renctan oh, nice, haha. Closing as dupe.

Comment by Randolph Tan [ 08/May/18 ]

Dup of SERVER-34322?

Generated at Thu Feb 08 04:38:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.