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

Race in hash_presplit.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.4.4, 2.5.0
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      The js test contains 3 tests running on the same cluster. The first test creates a hashed sharded collection. The second test will do the same with numInitialChunks at 500. At the time of the second test, the race will cause the moveChunk to fail and result in the chunks not being evenly distributed across the shards.

      The race condition is as follows:
      1. First test moves the minKey->maxKey chunk from shard0001 to shard0000.
      2. fromShard (shard0001) tells toShard (shard0000) to commit and toShard sets the state to commit. The separate thread in toShard that is actually running the migration should see this change and terminate the thread. However, since this is on another thread, there is no guarantee on when this will exactly happen.
      3. Second test tries to do a moveChunk from shard0001 to shard0000 but it fails because the shard0000 hasn't completely set the migration status to not active.

      Note: this was causing the cause of this failure - http://buildlogs.mongodb.org/V2.4%20Linux%2064-bit/builds/27/test/sharding/hash_presplit.js

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                renctan Randolph Tan
                Reporter:
                renctan Randolph Tan
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: