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

IndexBuildsCoordinator::_runIndexBuild() hangs while transitioning from SECONDARY to PRIMARY

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2019-02-11

      This depends on code in SERVER-39329 that is not enabled in master and affects sharded configurations only.

      This issue may be reproduced using the JS test jstests/sharding/shard_collection_basic.js.

      On stepping up to a primary, a secondary may hang while building an index on the config.chunks collection:

      [js_test:shard_collection_basic] 2019-02-01T13:30:26.932-0500 c20022| 2019-02-01T13:30:26.932-0500 I ELECTION [replexec-0] election succeeded, assuming primary role in term 1
      [js_test:shard_collection_basic] 2019-02-01T13:30:26.933-0500 c20022| 2019-02-01T13:30:26.932-0500 I REPL     [replexec-0] transition to PRIMARY from SECONDARY
      [js_test:shard_collection_basic] 2019-02-01T13:30:26.933-0500 c20022| 2019-02-01T13:30:26.932-0500 I REPL     [replexec-0] Resetting sync source to empty, which was :27017
      [js_test:shard_collection_basic] 2019-02-01T13:30:26.933-0500 c20022| 2019-02-01T13:30:26.932-0500 I REPL     [replexec-0] Entering primary catch-up mode.
      [js_test:shard_collection_basic] 2019-02-01T13:30:26.933-0500 c20022| 2019-02-01T13:30:26.932-0500 I REPL     [replexec-0] Exited primary catch-up mode.
      [js_test:shard_collection_basic] 2019-02-01T13:30:26.933-0500 c20022| 2019-02-01T13:30:26.932-0500 I REPL     [replexec-0] Stopping replication producer
      [js_test:shard_collection_basic] 2019-02-01T13:30:28.903-0500 c20022| 2019-02-01T13:30:28.903-0500 I STORAGE  [rsSync-0] createCollection: config.chunks with provided UUID: adc2cada-d023-43b1-b9fb-8b067e8599cb
      [js_test:shard_collection_basic] 2019-02-01T13:30:28.934-0500 c20022| 2019-02-01T13:30:28.934-0500 I INDEX    [rsSync-0] index build: done building index _id_ on ns config.chunks
      [js_test:shard_collection_basic] 2019-02-01T13:30:28.934-0500 c20022| 2019-02-01T13:30:28.934-0500 I INDEX    [rsSync-0] Registering index build: 735e14b6-8fc4-4200-846c-32f1a70075fa
      [js_test:shard_collection_basic] 2019-02-01T13:30:28.934-0500 c20022| 2019-02-01T13:30:28.934-0500 I INDEX    [rsSync-0] Waiting for index build to complete: 735e14b6-8fc4-4200-846c-32f1a70075fa
      [js_test:shard_collection_basic] 2019-02-01T13:30:28.934-0500 c20022| 2019-02-01T13:30:28.934-0500 I STORAGE  [IndexBuildsCoordinatorMongod-0] Index builds manager starting: 735e14b6-8fc4-4200-846c-32f1a70075fa: config.chunks (adc2cada-d023-43b1-b9fb-8b067e8599cb)
      (no further progress)
      

      See attached backtrace.txt for thread state.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: