The changes from SERVER-29136 made it so that the oplog entry for opType='d' in sharded cluster include the document's shard key. This means that the query planner may no longer use the IDHACK stage and instead must construct an actual ComparisonMatchExpression. Any errors that occur while initializing this ComparisonMatchExpression (for example) will cause secondaries to crash due to an error while attempting to find the document to remove.
[js_test:server31953] 2017-11-13T21:08:28.784-0500 d20011| 2017-11-13T21:08:28.783-0500 F REPL [repl writer worker 1] writer worker caught exception: BadValue: cannot compare to undefined on: { ts: Timestamp 1510625308000|12, t: 1, h: 409688109345307025, v: 2, op: "d", ns: "test.mycoll", ui: UUID("cd5b502a-f7e4-4078-8e65-23c718458e0b"), fromMigrate: true, wall: new Date(1510625308778), o: { x: undefined, _id: ObjectId('5a0a501bd5434448a509f0a5') } } [js_test:server31953] 2017-11-13T21:08:28.784-0500 d20011| 2017-11-13T21:08:28.784-0500 F - [repl writer worker 1] Fatal assertion 16359 BadValue: cannot compare to undefined at src/mongo/db/repl/sync_tail.cpp 1181 [js_test:server31953] 2017-11-13T21:08:28.785-0500 d20011| 2017-11-13T21:08:28.784-0500 F - [repl writer worker 1] [js_test:server31953] 2017-11-13T21:08:28.785-0500 d20011| [js_test:server31953] 2017-11-13T21:08:28.785-0500 d20011| ***aborting after fassert() failure
- is related to
-
SERVER-29136 Add shard key to oplog entries
- Closed