-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
v6.0
-
Sharding NYC 2022-05-16
-
38
-
1
The combination of the changes from 622b08b as part of SERVER-64464 and the changes from 77ffcb1 as part of SERVER-6491 made it possible for the dropIndexes command to time out due to maxTimeMS expiry on mongos and for the _shardsvrDropIndexes command to continue running on the primary shard. This ultimately leads to the dropIndexes command running on the recipient shard twice. The second execution will fail with IndexNotFound because the index has already been dropped.
[js_test:resharding_disallow_writes] d20272| 2022-04-26T06:57:08.901+01:00 I COMMAND 51806 [conn53] "CMD: dropIndexes","attr":{"namespace":"test.foo","uuid":{"uuid":{"$uuid":"03b810c5-273a-4129-bb7e-6deef1411c6a"}},"indexes":"{ oldKey: 1.0 }"} [js_test:resharding_disallow_writes] d20272| 2022-04-26T06:57:08.901+01:00 I STORAGE 22206 [conn53] "Deferring table drop for index","attr":{"index":"oldKey_1","namespace":"test.foo","uuid":{"uuid":{"$uuid":"03b810c5-273a-4129-bb7e-6deef1411c6a"}},"ident":"index-52-8596053642237589745","commitTimestamp":{"$timestamp":{"t":1650952628,"i":75}}} [js_test:resharding_disallow_writes] d20273| 2022-04-26T06:57:08.902+01:00 I COMMAND 20344 [ReplWriterWorker-1] "CMD: dropIndexes","attr":{"namespace":"test.foo","indexes":"\"oldKey_1\""} ... [js_test:resharding_disallow_writes] d20272| 2022-04-26T06:57:09.382+01:00 I COMMAND 51806 [conn53] "CMD: dropIndexes","attr":{"namespace":"test.foo","uuid":{"uuid":{"$uuid":"03b810c5-273a-4129-bb7e-6deef1411c6a"}},"indexes":"{ oldKey: 1.0 }"}
We should change the resharding_disallow_writes.js test so it drops a different index after the resharding operation completes to avoid the IndexNotFound error.