[SERVER-76335] assertRetryableCommandWorked should check command results Created: 20/Apr/23  Updated: 29/Oct/23  Resolved: 21/Apr/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc1

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

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-72820 Retry disable and enable of balancer ... Closed
Related
is related to SERVER-75999 Fail point utils should retry configu... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Sharding EMEA 2023-05-01
Participants:
Linked BF Score: 30

 Description   

SERVER-72820 introduced a javascript helper, assertRetyableCommandWorked, which would retry a command automatically on retriable errors until the command succeeded or failed with a non-retriable error.

SERVER-75999 used this helper throughout the configureFailPoint helper.

However, it seems that this helper is not actually asserting that the command worked in the try statement. This means that it will never throw and it is actually swallowing errors in the commands it is running.



 Comments   
Comment by Githook User [ 27/Apr/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-76335 assertRetryableCommandWorked should check command results

(cherry picked from commit 80f7c41df008178c3b3c92ecaff72addd2c843f0)
Branch: v7.0
https://github.com/mongodb/mongo/commit/b9197dbe26e73c8ccad167f8ca76fd25ec08aeae

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-76335 assertRetryableCommandWorked should check command results
Branch: master
https://github.com/mongodb/mongo/commit/80f7c41df008178c3b3c92ecaff72addd2c843f0

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