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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.1.2
    • 2.0.3
    • Sharding
    • None
    • ALL

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: