Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
Fully Compatible
-
ALL
-
v4.2, v4.0, v3.6
-
Repl 2020-01-27, Repl 2020-02-10
-
6
Description
The following error can happen when inserting a document like
{_id: 0, a: [{0: 1}]}
|
into a collection with an index on {"a.0": 1}:
> db.foo.ensureIndex({"a.0": 1})
|
{
|
"createdCollectionAutomatically" : false,
|
"numIndexesBefore" : 2,
|
"numIndexesAfter" : 3,
|
"ok" : 1
|
}
|
> db.foo.insert({a: [{0: 1}]})
|
WriteResult({
|
"nInserted" : 0,
|
"writeError" : {
|
"code" : 16746,
|
"errmsg" : "Ambiguous field name found in array (do not use numeric field names in embedded elements in an array), field: '0' for array: { 0: { 0: 1.0 } }"
|
}
|
})
|
When finishing initial sync and applying oplog entries that happened during the sync, this error should be ignored. Like a unique index constraint violation, this should eventually be resolved during oplog application, either by a another operation deleting the document, or by another oplog entry dropping the index.
Attachments
Issue Links
- is depended on by
-
SERVER-33946 Decrease number of initial sync attempts in tests to 1
-
- Blocked
-
- is related to
-
SERVER-45827 Expand initial sync fuzzer grammar to include all CRUD document shapes and index DDL ops
-
- Backlog
-
-
SERVER-45830 Add failpoint to allow InitialSyncTest fixture to pause initial syncing node after cloning some documents
-
- Backlog
-