[SERVER-48194] Compare exhaust iters before erasing Created: 13/May/20  Updated: 29/Oct/23  Resolved: 14/May/20

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

Type: Bug Priority: Major - P3
Reporter: Janna Golden Assignee: Janna Golden
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:
v4.4
Sprint: Sharding 2020-05-18
Participants:
Linked BF Score: 11

 Description   

When running the callback function for an exhaust task, the thread pool task executor currently erases this task from its queue using an iterator and then checks to see if this iterator is equal to another. The iterator may be invalidated after erasing, so we should compare the iters before erasing. The order of the two does not actually matter as all of this happens while holding a mutex.



 Comments   
Comment by Janna Golden [ 26/May/20 ]

Adding this manually:

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-48149 Compare exhaust iters before erasing

(cherry picked from commit 06cfa3bd798b0328ae4b8e8fd18b11f7e8c554cf)
Branch: master
https://github.com/mongodb/mongo/commit/06cfa3bd798b0328ae4b8e8fd18b11f7e8c554cf

Comment by Janna Golden [ 14/May/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-48149 Compare exhaust iters before erasing

(cherry picked from commit 06cfa3bd798b0328ae4b8e8fd18b11f7e8c554cf)
Branch: v4.4
https://github.com/mongodb/mongo/commit/8590fdee72160a4ef6a8a5c72ce3d8a3eb5492e9

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