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

Recipient shards in resharding may end up creating a DonorStateMachine upon refresh

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2021-02-08
    • Story Points:
      1

      Description

      d20028 is a recipient shard, but it ends up constructing a DonorStateMachine after refreshing the existing sharded collection namespace. It seems like processReshardingFieldsForCollection() is missing a check that the shard the refresh occurred on also owns at least one chunk for the sharded collection with resharding fields present.

      [js_test:resharding_fuzzer-4c289-1611626796463-5] 2021-01-26T02:09:47.040+0000 d20028| 2021-01-26T02:09:47.038+00:00 I  SH_REFR  4619901 [CatalogCache-0] "Refreshed cached collection","attr":{"namespace":"test_reshard.reshard_coll","newVersion":{"chunkVersion":{"0":{"$timestamp":{"t":2,"i":2}},"1":{"$oid":"600f79e68d07bbaf181e3b42"}},"forcedRefreshSequenceNum":1,"epochDisambiguatingSequenceNum":1},"oldVersion":{"chunkVersion":"None","forcedRefreshSequenceNum":0,"epochDisambiguatingSequenceNum":0},"durationMillis":3}
      [js_test:resharding_fuzzer-4c289-1611626796463-5] 2021-01-26T02:09:47.040+0000 d20028| 2021-01-26T02:09:47.038+00:00 I  STORAGE  20320   [ReshardingDonorService-0] "createCollection","attr":{"namespace":"config.localReshardingOperations.donor","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"450e099a-4dfc-48b2-ba80-f9d2d646a9d4"}},"options":{}}
      [js_test:resharding_fuzzer-4c289-1611626796463-5] 2021-01-26T02:09:47.073+0000 d20028| 2021-01-26T02:09:47.069+00:00 I  STORAGE  20320   [ShardServerCatalogCacheLoader::runCollAndChunksTasks] "createCollection","attr":{"namespace":"config.cache.chunks.test_reshard.reshard_coll","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"9ca3a2d3-2f67-4a13-8b02-cecb436a0e60"}},"options":{}}
      ...
      [js_test:resharding_fuzzer-4c289-1611626796463-5] 2021-01-26T02:09:47.343+0000 d20028| 2021-01-26T02:09:47.303+00:00 I  MIGRATE  5279505 [ReshardingDonorService-0] "Transition resharding donor state","attr":{"newState":"donating-initial-data","oldState":"preparing-to-donate","reshardingUUID":{"uuid":{"$uuid":"c67a9257-26ec-45f3-867a-bdf9d717f633"}}}
      [js_test:resharding_fuzzer-4c289-1611626796463-5] 2021-01-26T02:09:47.356+0000 d20030| 2021-01-26T02:09:47.329+00:00 I  MIGRATE  5279505 [ReshardingDonorService-0] "Transition resharding donor state","attr":{"newState":"donating-initial-data","oldState":"preparing-to-donate","reshardingUUID":{"uuid":{"$uuid":"c67a9257-26ec-45f3-867a-bdf9d717f633"}}}
      [js_test:resharding_fuzzer-4c289-1611626796463-5] 2021-01-26T02:09:48.020+0000 d20026| 2021-01-26T02:09:48.019+00:00 I  MIGRATE  5279506 [ReshardingRecipientService-0] "Transition resharding recipient state","attr":{"newState":"steady-state","oldState":"applying","reshardingUUID":{"uuid":{"$uuid":"c67a9257-26ec-45f3-867a-bdf9d717f633"}}}
      

      https://logkeeper.mongodb.org/lobster/build/58d1892f964e7d6658fd78c5f3211b2a/test/600f79debe07c40af53aafdf#bookmarks=0%2C34304%2C34305%2C34445%2C35138%2C35235%2C36672%2C54595%2C55641%2C59776&f~=000~%5C%5BResharding.%2AService&f~=000~%5C%5BResharding&f~=000~d20028%5C%7C&f~=100~d20028%5C%7C.%2AReshardingDonorService&l=1

        Attachments

          Activity

            People

            Assignee:
            blake.oler Blake Oler
            Reporter:
            max.hirschhorn Max Hirschhorn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: