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.
- duplicates
-
SERVER-4874 unrecognized command: setShardVersion
- Closed
- is duplicated by
-
SERVER-3568 MongoException "norepl" is thrown when data is inserted in a sharded environment using WriteConcern "ReplicasSafe".
- Closed
-
SERVER-8950 Getlasterror call return wrong result when the previous write op has chunk splitt
- Closed
- is related to
-
SERVER-4267 getLastError "n" is 0 if previous writes goes through writebackListener
- Closed