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

Resharding can leave behind local collection on former primary shard that doesn't own any chunks

    XMLWordPrintable

    Details

    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Shuffle the allShardIds vector here in selectShardForNewDatabase() before to cycle on it.
      Simply remove the const specifier of the vector and add:

      std::random_shuffle(allShardIds.begin(), allShardIds.end());

      Show
      Shuffle the allShardIds vector here in selectShardForNewDatabase() before to cycle on it. Simply remove the const specifier of the vector and add: std::random_shuffle(allShardIds.begin(), allShardIds.end());
    • Story Points:
      2

      Description

      Original summary

      resharding_allowMigrations.js fails if primary shard of 'reshardingDb' is not the first shard

      Original description

      I've discovered this while working on SERVER-54230, the problem is that if we randomly choose the primary shard of newly created database the resharding_allowMigrations.js starts failing.

      More specifically I've discovered that this happen only if the primary shard is chosen among one of the donor shards that is not shard-0.

       This is an example of a failing run on evg.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding-emea Backlog - Sharding EMEA
              Reporter:
              tommaso.tocci Tommaso Tocci
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: