-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.5.13
-
Component/s: Replication, Storage
-
Fully Compatible
-
ALL
-
-
Storage 2017-12-04
A certain sequence of applyOps and convertToCapped operations issued through the mongo shell can cause secondaries to fassert because an insert command with an invalid UUID is replicated.
The repro is attached and can be run through the mongo shell: ./mongo --nodb nsnotfound.js Most of the repro script is boiler plate code, the commands themselves are on lines 98 to 122.
The content of the primary's oplog is also attached.
[js_test:nsnotfound] 2017-10-09T16:26:27.089-0400 d20014| 2017-10-09T16:26:27.089-0400 I STORAGE [repl writer worker 13] createCollection: vest.four with UUID: c8b153d4-0bc0-4b15-9d66-89bccfb51312 [js_test:nsnotfound] 2017-10-09T16:26:27.125-0400 d20014| 2017-10-09T16:26:27.125-0400 I COMMAND [repl writer worker 15] CMD: dropIndexes vest.two [js_test:nsnotfound] 2017-10-09T16:26:27.138-0400 d20014| 2017-10-09T16:26:27.138-0400 I COMMAND [repl writer worker 1] CMD: dropIndexes vest.two [js_test:nsnotfound] 2017-10-09T16:26:27.158-0400 d20014| 2017-10-09T16:26:27.157-0400 I STORAGE [repl writer worker 5] createCollection: vest.tmpCYoIr.convertToCapped.four with UUID: c02c8409-e28b-460f-84b5-2a47ccf5478a [js_test:nsnotfound] 2017-10-09T16:26:27.192-0400 d20014| 2017-10-09T16:26:27.192-0400 I STORAGE [repl writer worker 7] dropCollection: vest.four - renaming to drop-pending collection: vest.system.drop.1507580787i8t1.four with drop optime { ts: Timestamp 1507580787000|8, t: 1 } [js_test:nsnotfound] 2017-10-09T16:26:27.216-0400 d20014| 2017-10-09T16:26:27.215-0400 I REPL [replication-2] Completing collection drop for vest.system.drop.1507580787i8t1.four with drop optime { ts: Timestamp 1507580787000|8, t: 1 } (notification optime: { ts: Timestamp 1507580787000|8, t: 1 }) [js_test:nsnotfound] 2017-10-09T16:26:27.240-0400 d20014| 2017-10-09T16:26:27.239-0400 I STORAGE [repl writer worker 13] createCollection: test.three with UUID: 7623929c-e8ad-47cd-849d-895f6f57175e [js_test:nsnotfound] 2017-10-09T16:26:27.275-0400 d20014| 2017-10-09T16:26:27.275-0400 I STORAGE [repl writer worker 15] createCollection: vest.one with UUID: d3268af0-49a2-4818-a839-eafc20fbeb7a [js_test:nsnotfound] 2017-10-09T16:26:27.316-0400 d20014| 2017-10-09T16:26:27.310-0400 F REPL [repl writer worker 3] writer worker caught exception: NamespaceNotFound: Failed to apply operation due to missing collection (c8b153d4-0bc0-4b15-9d66-89bccfb51312): { ts: Timestamp 1507580787000|14, t: 1, h: -9013766507876488705, v: 2, op: "i", ns: "vest.four", ui: BinData(4, C8B153D40BC04B159D6689BCCFB51312), wall: new Date(1507580787298), o: { _id: "htH0MldB", d: "You must be the change you wish to see in the world.", a: { c: "Asking a working writer what he thinks about critics is like asking a lamppost how it feels about dogs." } } } on: { ts: Timestamp 1507580787000|14, t: 1, h: -9013766507876488705, v: 2, op: "i", ns: "vest.four", ui: BinData(4, C8B153D40BC04B159D6689BCCFB51312), wall: new Date(1507580787298), o: { _id: "htH0MldB", d: "You must be the change you wish to see in the world.", a: { c: "Asking a working writer what he thinks about critics is like asking a lamppost how it feels about dogs." } } } [js_test:nsnotfound] 2017-10-09T16:26:27.316-0400 d20014| 2017-10-09T16:26:27.310-0400 F - [repl writer worker 3] Fatal assertion 16359 NamespaceNotFound: Failed to apply operation due to missing collection (c8b153d4-0bc0-4b15-9d66-89bccfb51312): { ts: Timestamp 1507580787000|14, t: 1, h: -9013766507876488705, v: 2, op: "i", ns: "vest.four", ui: BinData(4, C8B153D40BC04B159D6689BCCFB51312), wall: new Date(1507580787298), o: { _id: "htH0MldB", d: "You must be the change you wish to see in the world.", a: { c: "Asking a working writer what he thinks about critics is like asking a lamppost how it feels about dogs." } } } at src/mongo/db/repl/sync_tail.cpp 1132 [js_test:nsnotfound] 2017-10-09T16:26:27.317-0400 d20014| 2017-10-09T16:26:27.310-0400 F - [repl writer worker 3] [js_test:nsnotfound] 2017-10-09T16:26:27.317-0400 d20014| [js_test:nsnotfound] 2017-10-09T16:26:27.317-0400 d20014| ***aborting after fassert() failure
- duplicates
-
SERVER-30830 applyOps should return NamespaceNotFound when applying a CRUD operation on a non-existent collection/database
- Closed