[SERVER-16473] Attempting to create index on local database on replica set member in state REMOVED causes invariant failure Created: 09/Dec/14  Updated: 03/Mar/15  Resolved: 23/Feb/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.8.0-rc2
Fix Version/s: 2.8.0-rc3

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Siyuan Zhou
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Create a replica set with two nodes, A and B. Reconfigure the set to remove node B after B has joined the set. Connect to node B, and attempt to create any index on a collection in the local database.

Sprint: RPL 0 3/13/15
Participants:

 Description   

Backtrace:

 mongod(_ZN5mongo15printStackTraceERSo+0x27) [0x19352de]
 mongod(_ZN5mongo10logContextEPKc+0x71) [0x18e7511]
 mongod(_ZN5mongo15invariantFailedEPKcS1_j+0xB2) [0x18d36e9]
 mongod(_ZNK5mongo4repl16ReplicaSetConfig11getMemberAtEm+0x4C) [0x165c36e]
 mongod(_ZN5mongo4repl26ReplicationCoordinatorImpl13buildsIndexesEv+0x46) [0x162d1c4]
 mongod(_ZNK5mongo12IndexCatalog9_isSpecOkERKNS_7BSONObjE+0x7D6) [0x12a4dee]
 mongod(_ZNK5mongo12IndexCatalog20prepareSpecForCreateEPNS_16OperationContextERKNS_7BSONObjE+0x30) [0x12a331e]
 mongod(_ZNK5mongo15MultiIndexBlock21removeExistingIndexesEPSt6vectorINS_7BSONObjESaIS2_EE+0x63) [0x12ae209]
 mongod(_ZN5mongo14CmdCreateIndex3runEPNS_16OperationContextERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0xB0A) [0x12d7b20]
 mongod(_ZN5mongo12_execCommandEPNS_16OperationContextEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x96) [0x1360c09]
 mongod(_ZN5mongo7Command11execCommandEPNS_16OperationContextEPS0_iPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0xBD1) [0x1361bb9]
 mongod(_ZN5mongo12_runCommandsEPNS_16OperationContextEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x491) [0x136249b]
 mongod(+0x1165AD6) [0x1565ad6]
 mongod(_ZN5mongo8runQueryEPNS_16OperationContextERNS_7MessageERNS_12QueryMessageERNS_5CurOpES3_b+0x39A) [0x15677e4]
 mongod(+0x106BE15) [0x146be15]
 mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortEb+0x470) [0x146cf27]
 mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x102) [0x116d59a]
 mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x4D6) [0x18fba43]
 libpthread.so.0(+0x8182) [0x7fe772801182]
 libc.so.6(clone+0x6D) [0x7fe771901efd]



 Comments   
Comment by Eric Milkie [ 23/Feb/15 ]

Thanks for reviewing the behavior!

Comment by Andy Schwerin [ 09/Dec/14 ]

Kind of a corner case, but I just noticed it was possible and repro'd it while auditing uses of getReplicationMode().

Generated at Thu Feb 08 03:41:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.