[SERVER-46794] Usage of ScopedTaskExecutor::joinAsync() in scheduleLoseRaceWithShutdown test is race-prone Created: 11/Mar/20  Updated: 29/Oct/23  Resolved: 11/Mar/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
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-46395 Resumable range deleter can submit du... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Sharding 2020-03-23
Participants:
Linked BF Score: 0

 Description   

The changes from 82833b4 as part of SERVER-46395 made an incorrect expectation for the scheduleLoseRaceWithShutdown test case. When the scheduled task is canceled with ShutdownInProgress, there isn't a guarantee that _eraseAndNotifyIfNeeded() has been called, and for the future returned by joinAsync() to have become ready yet. The contract is that it will only eventually become ready.



 Comments   
Comment by Githook User [ 11/Mar/20 ]

Author:

{'name': 'Max Hirschhorn', 'username': 'visemet', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-46794 Fix usage of joinAsync() in scheduleLoseRaceWithShutdown.

When the scheduled task is canceled with ShutdownInProgress, there isn't
a guarantee that _eraseAndNotifyIfNeeded() has been called yet, and for
the future returned by joinAsync() to have become ready. The contract is
only that it will eventually become ready.

(cherry picked from commit befd497dc9db4c3ca563b3285ee57908b32e529a)
Branch: v4.4
https://github.com/mongodb/mongo/commit/3b71aed2e7027b02bacbf4cddbef830b4294f4b4

Comment by Githook User [ 11/Mar/20 ]

Author:

{'name': 'Max Hirschhorn', 'username': 'visemet', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-46794 Fix usage of joinAsync() in scheduleLoseRaceWithShutdown.

When the scheduled task is canceled with ShutdownInProgress, there isn't
a guarantee that _eraseAndNotifyIfNeeded() has been called yet, and for
the future returned by joinAsync() to have become ready. The contract is
only that it will eventually become ready.
Branch: master
https://github.com/mongodb/mongo/commit/befd497dc9db4c3ca563b3285ee57908b32e529a

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