[SERVER-30173] moveChunk reports deletion errors inconsistently Created: 17/Jul/17  Updated: 30/Oct/23  Resolved: 20/Jul/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.10
Fix Version/s: 4.1.1

Type: Bug Priority: Major - P3
Reporter: Nathan Myers Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: ShardingTechDebt, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-07-30
Participants:
Linked BF Score: 0

 Description   

At the end of moveChunk, when deleting the orphaned range, if deletion fails, the failure is reported differently depending on when it is noticed. If the deletion fails immediately, it will produce a "warning" in the log, and moveChunk will return normally. If it fails while moveChunk waits for deletion to complete, moveChunk will throw and catch an exception and conduct a "Severe error occurred while running moveChunk command" in the response to the moveChunk command. Finally, if it fails after moveChunk has returned, the failure may be reported solely in background as a normal log entry, and probably again, later, on a manual cleanupOrphans command or when a chunk is being moved into the vacated range..

(The code in question has moved to db/s/migration_source_manager.cpp.) Probably what should change is the case when deletion fails immediately; it probably should be reported as a failure of the command, similarly to the waitForDelete case, even though the chunk has successfully moved; but wrapped in a message explaining that the move was successful and the failure is only about cleanup. The waitForDelete case should report later deletion failure the same way, and not (as now) as a failure of the whole operation.



 Comments   
Comment by Githook User [ 20/Jul/18 ]

Author:

{'username': 'cheahuychou', 'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com'}

Message: SERVER-30173 Make moveChunk report orphaned range deletion errors consistently
Branch: master
https://github.com/mongodb/mongo/commit/146adc8a45d015e25517db97c757976a4336c192

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