Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1388

Handle embedded "ns not found" errmsg from mongos

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.13.0, 3.0.0
    • Affects Version/s: None
    • Component/s: Error Handling
    • Labels:
      None

      When running deleteIndexes command against a mongos on a non-existing collection, mongos returns:

      {
      	"raw" : {
      		"shard02/new-host-4.home:27021,new-host-4.home:27022,new-host-4.home:27023" : {
      			"ok" : 0,
      			"errmsg" : "ns not found"
      		}
      	},
      	"ok" : 0,
      	"errmsg" : "{ shard02/new-host-4.home:27021,new-host-4.home:27022,new-host-4.home:27023: \"ns not found\" }"
      }
      

      Currently the driver is unable to swallow that error, as it does against a mongod, which just returns:

      { "ok" : 0, "errmsg" : "ns not found" }
      

      because the driver is simply looking for an errmsg that equals "ns not found".

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: