-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2020-05-04
Currently, the applyOps command for chunk operations doesn't include the optional alwaysUpsert field. It turns out that this field defaults to true inside the applyOps command, and that the "b" field for each individual operation can be overwritten by it. So if the oplog entry has an incorrect "o2" query field, we can end up trying to insert a new chunk doc instead of updating the existing doc in which case the chunk operation will fail with DuplicateKey error (see this test).
- related to
-
SERVER-47745 Make chunk query in ShardingCatalogManager compatible with chunks created in 3.4
- Closed