[SERVER-38953] Missing early return in merge_chunks_command.cpp Created: 11/Jan/19  Updated: 29/Oct/23  Resolved: 14/Jan/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.7

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

Issue Links:
Problem/Incident
is caused by SERVER-32198 Missing collection metadata on the sh... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2019-01-28
Participants:
Linked BF Score: 0

 Description   

To commit a mergeChunk, the shard merging the chunks sends _configsvrMergeChunkCommit to the CSRS, which atomically updates the chunks collection. If the response to this request is lost, the shard will retry, but may receive an error if the first attempt finished successfully. Because of this, the shard checks if the metadata was updated after getting a failed response.

Currently the shard logs a message in this case and will still throw with the failed response, but before the refactor in this commit for SERVER-32198, it returned Status::OK(). This change in behavior was likely unintentional and can be fixed by returning Status::OK() here.



 Comments   
Comment by Githook User [ 14/Jan/19 ]

Author:

{'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-38953 Add missing early return in merge_chunks_command.cpp
Branch: master
https://github.com/mongodb/mongo/commit/18c4eaee719779f709e965b7e9fa039ee18a746c

Comment by Kaloian Manassiev [ 11/Jan/19 ]

Just fix it - it's 1 line change

Generated at Thu Feb 08 04:50:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.