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

mongos will route getLastError command to the config server when last insert triggered a split

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

      Steps to reproduce:

      1. Setup a sharded cluster (to make this easier to reproduce, set chunk size to 1).
      2. Keep on doing inserts and call get last error with a w parameter for each insert.

      Eventually (specifically, right when an auto-split occurred), the shards field for the getLastError result would contain the config server and will have a corresponding object that looks like:

      {
      	"n" : 0,
      	"connectionId" : 8,
      	"wnote" : "no replication has been enabled, so w=2+ won't work",
      	"err" : "norepl",
      	"ok" : 1
      }
      

      Some of drivers treat a non-null err field as an error and would throw an exception, which is bad.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: