[SERVER-64552] Replace invariant with assertion for non-joinable rename collection participants Created: 16/Mar/22  Updated: 29/Oct/23  Resolved: 21/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.5, 5.2.1, 5.3.0-rc3
Fix Version/s: 5.3.2, 6.0.0-rc0, 5.0.7, 5.2.2

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.3, v5.2, v5.0
Sprint: Sharding EMEA 2022-04-04
Participants:

 Description   

Replace this invariant with an assertion in order not to bring down a node in case an old network request reaches a participant.



 Comments   
Comment by Githook User [ 05/Apr/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-64552 Replace invariant with assertion for non-joinable rename collection participants
Branch: v5.3
https://github.com/mongodb/mongo/commit/4f849e41dc7f4369cdc7e5892a60a4817800360d

Comment by Githook User [ 22/Mar/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-64552 Replace invariant with assertion for non-joinable rename collection participants
Branch: v5.2
https://github.com/mongodb/mongo/commit/462d3264fdded1859dab00cd96a7d585bcc5751b

Comment by Githook User [ 22/Mar/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-64552 Replace invariant with assertion for non-joinable rename collection participants
Branch: v5.0
https://github.com/mongodb/mongo/commit/e5f834ee98a4ab567da290b1ec29d5a844942407

Comment by Githook User [ 21/Mar/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-64552 Replace invariant with assertion for non-joinable rename collection participants
Branch: master
https://github.com/mongodb/mongo/commit/bfe598ccdd0aa29aec74daa2facf7063f6a50eda

Comment by Pierlauro Sciarelli [ 21/Mar/22 ]

The original description of this ticket was wrongly stating that the "phase" field of rename participant documents was part of the comparison performed to join an existing participant. This turns out not to be the case since the comparison happens only on the rename collection request.

I was misled because the invariant was hit with the following documents (the only difference is the phase):

{ to: \"test0_fsmdb0.rename_capped_collection_chain9_1\", dropTarget: false, stayTemp: false, _id: \"test0_fsmdb0.rename_capped_collection_chain9_0\", phase: \"blockCRUDAndSnapshotRangeDeletions\", forwardableOpMetadata: { impersonatedUserMetadata: { users: [ { user: \"__system\", db: \"local\" } ], roles: [] } }, sourceUUID: UUID(\"92c3882f-0830-4ac2-8dd8-f9eac26a91ce\") }
 
{ to: \"test0_fsmdb0.rename_capped_collection_chain9_1\", dropTarget: false, stayTemp: false, _id: \"test0_fsmdb0.rename_capped_collection_chain9_0\", phase: \"unset\", forwardableOpMetadata: { impersonatedUserMetadata: { users: [ { user: \"__system\", db: \"local\" } ], roles: [] } }, sourceUUID: UUID(\"92c3882f-0830-4ac2-8dd8-f9eac26a91ce\") }`

The real root of the problem, instead, is most probably SERVER-62432.

Generated at Thu Feb 08 06:00:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.