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

Sharded getLastError doesn't wait for all writes to go to all shards

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • ALL

      If do a lot of inserts to a sharded collection really fast, then call getLastError, there can still be some inserts that haven't been processed yet. I have attached a test that reproduces the error, but it is very flaky. So far I haven't been able to make a test that's consistently reproducible. The test is entirely taken from sharding/auth.js, but with all other parts of the test (including all uses of authentication) removed.

      http://buildbot.mongodb.org/builders/Linux%2064-bit%20Legacy/builds/3958/steps/test_3/logs/stdio has the output from a run of sharding/auth.js that failed b/c of this.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: