-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.2, 2.3.1
-
Component/s: Sharding
-
None
-
ALL
-
When doing an insert into a sharded collection because of SERVER-4381 but in attached testcase it does not properly set "err:" field and "code:" field when writeback listeners are involved.
Before fix for SERVER-4532 and SERVER-7958 the attached code would set err: but not code: fields (so it would fail in the first failed asserts before split/migration) however testing it with both of those fixes now it returns proper GLE before split/migrate but after returns:
assert failed : Insert of a duplicate record after split/migrate did not create correct GLE{
"singleShard" : "localhost:30000",
"n" : 0,
"connectionId" : 21,
"err" : null,
"ok" : 1,
"code" : 11000,
"writebackGLE" :
,
"initialGLEHost" : "localhost:30000",
"initialGLE" : {
"err" : "E11000 duplicate key error index: test.trans.$owner_1 dup key: { : 1234567890 }",
"code" : 11000,
"n" : 0,
"connectionId" : 16,
"ok" : 1
}
}
- duplicates
-
SERVER-7958 GLE on sharded cluster can return previous operation's lastError
- Closed
- related to
-
SERVER-8097 Inserts don't increment writebacksSince
- Closed