Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-66088

Make resharding_disallow_writes.js robust to _shardsvrDropIndexes command retrying dropIndexes after resharding completes

    XMLWordPrintable

Details

    • Fully Compatible
    • v6.0
    • Sharding NYC 2022-05-16
    • 38
    • 1

    Description

      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 }"}
      

      https://evergreen.mongodb.com/lobster/build/134933b7e47bc91e2ab6481453bb0d2c/test/6267897c904130343b24fef1#bookmarks=0%2C4871%2C4981%2C9164&f~=000~cmd%3A%20dropIndexes&l=1

      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.

      Attachments

        Activity

          People

            max.hirschhorn@mongodb.com Max Hirschhorn
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: