[SERVER-60489] Handle potential exceptions in balancer recovery phase Created: 06/Oct/21  Updated: 29/Oct/23  Resolved: 19/Oct/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.2.0, 5.1.0-rc2

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1
Sprint: Sharding EMEA 2021-10-18, Sharding EMEA 2021-11-01
Participants:
Linked BF Score: 142

 Description   

The recovering phase of the CSRS balancer may throw the InterruptedDueToReplStateChange exception which is unexpected (unhandled) and causes a process crash.

This is a regression introduced on August 29th, where part of the server logic has been changed to index collections using their UUID instead of namespace (ref. to SERVER-59052).

After a deep analysis of the impacted implementations, the functions that must be addresses are the following:



 Comments   
Comment by Githook User [ 19/Oct/21 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-60489 Handle potential exceptions in balancer recovery phase
Branch: v5.1
https://github.com/mongodb/mongo/commit/9747e790b50e147997994e45599eba4e19d96d01

Comment by Githook User [ 19/Oct/21 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-60489 Fix function to return a NamespaceString reference instead of a copy
Branch: master
https://github.com/mongodb/mongo/commit/1085c5f5cbb031840640e773a7e723777087915e

Comment by Githook User [ 18/Oct/21 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-60489 Handle potential exceptions in balancer recovery phase
Branch: master
https://github.com/mongodb/mongo/commit/01cb4a206af83bf49da4fa750aba4a3f4aeaea10

Comment by Antonio Fuschetto [ 06/Oct/21 ]

Details of the technical analysis are available in getCollection function calls introduced on SERVER-59052.

Generated at Thu Feb 08 05:49:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.