[SERVER-74776] Use several `ExecutorFuture` rather than future chain in `mergeAllChunksOnShardInTransaction` Created: 13/Mar/23  Updated: 29/Oct/23  Resolved: 16/Mar/23

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2023-03-20
Participants:

 Description   

This invariant is a safeguard to prevent creating unbounded future chains that can cause a stack overflow since the completion logic is recursive. It follows that when merging more than 32 contiguous sequences of chunks in mergeAllChunksOnShard this invariant is triggered.

Purpose of this ticket is to replace the future chain iteratively built within this loop with an ExecutorFuture list and then wait for all to succeed.



 Comments   
Comment by Githook User [ 16/Mar/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-74776 Use several `ExecutorFuture` rather than future chain in `mergeAllChunksOnShardInTransaction`
Branch: master
https://github.com/mongodb/mongo/commit/a475d35fb956e2f1b18539b4cb815ea0688812cd

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