-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
Platforms 2017-10-02
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Seen here:
2017-09-20T14:36:56.665+0000 I COMMAND [conn44] CMD: drop pymongo_test.test_change_stream.TestChangeStream.test_iteration 2017-09-20T14:36:56.665+0000 I STORAGE [conn44] dropCollection: pymongo_test.test_change_stream.TestChangeStream.test_iteration - renaming to drop-pending collection: pymongo_test.system.drop.1505918216i32t2.test_change_stream.TestChangeStream.test_iteration with drop optime { ts: Timestamp 1505918216000|32, t: 2 } 2017-09-20T14:36:56.691+0000 I REPL [replication-0] Completing collection drop for pymongo_test.system.drop.1505918216i32t2.test_change_stream.TestChangeStream.test_iteration with drop optime { ts: Timestamp 1505918216000|32, t: 2 } (notification optime: { ts: Timestamp 1505918216000|32, t: 2 }) 2017-09-20T14:36:56.701+0000 I COMMAND [conn44] CMD: drop pymongo_test.test_change_stream.TestChangeStream.test_iteration 2017-09-20T14:36:56.732+0000 F - [conn44] Invariant failure pin == ErrorCodes::CursorNotFound src/mongo/db/cursor_manager.cpp 178 2017-09-20T14:36:56.732+0000 F - [conn44] ***aborting after invariant() failure 2017-09-20T14:36:56.741+0000 F - [conn44] Got signal: 6 (Aborted). mongod(_ZN5mongo13CursorManager29eraseCursorGlobalIfAuthorizedEPNS_16OperationContextEiPKc+0x48) [0x7f7977f88c38] mongod(_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE+0x1AB9) [0x7f7977a7bc19] mongod(_ZN5mongo19ServiceStateMachine15_processMessageERNS0_11ThreadGuardE+0xF0) [0x7f7977a83670] mongod(_ZN5mongo19ServiceStateMachine15_runNextInGuardERNS0_11ThreadGuardE+0x1B5) [0x7f7977a80665]
I think PyMongo is executing:
def test_iteration(self): with self.coll.watch(batch_size=2) as change_stream: num_inserted = 10 self.coll.insert_many([{} for _ in range(num_inserted)]) self.coll.drop() received = 0 for change in change_stream: received += 1
There may be a session bug in PyMongo right now that uses different lsids for the aggregate and getMore commands - this might or might not be related.
mongod.log attached