[SERVER-75188] Properly handle errors when processing data size action response for defragmentation Created: 23/Mar/23  Updated: 27/Oct/23  Resolved: 03/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.0.0-rc0, 6.0.5, 6.3.0-rc2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Allison Easton
Resolution: Works as Designed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-61727 Implement the "move and merge chunks"... Closed
Assigned Teams:
Sharding EMEA
Operating System: ALL
Sprint: Sharding EMEA 2023-04-17
Participants:

 Description   

In this line it is assumed that the response can be parsed as a StatusWith<DataSizeResponse>. However in case of errors it will be a simple Status.

This will trigger an unhandled std::exception crashing the server. A solution would be to adopt the approach currently followed to handle exceptions when trying to parse a StatusWith<NumMergedChunks>.



 Comments   
Comment by Pierlauro Sciarelli [ 03/Apr/23 ]

Closing the ticket because it turns out the issue was triggered by this test that was explicitly constructing a Status rather than a StatusWith. This was possible because the BalancerStreamActionResponse is a variant hence it is totally possible to compile/execute with a wrongly typed response.

SERVER-75520 corrected the code that was handling the test-induced issue.

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