[SERVER-78470] Prevent multi-false UpdateStage/DeleteStage from provoking yield after having already written Created: 27/Jun/23  Updated: 29/Oct/23  Resolved: 28/Jun/23

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

Type: Task Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-77116 Checking shard version during restore... Closed
Related
is related to SERVER-77428 DeleteStage will omit returning delet... Closed
is related to SERVER-79408 Apply SERVER-77116 and SERVER-78470 t... Closed
is related to SERVER-80859 Reshuffle UpdateStage/DeleteStage's l... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-07-10
Participants:
Linked BF Score: 140

 Description   

SERVER-77116 is built on the idea that multi=false updates/deletes should not yield after having performed one write, since upon restore the sharding placement could have changed and that would bubble up a StaleConfig exception. However, SERVER-77116 missed one case: After performing the writes, UpdateStage/DeleteStage restore their children stages, which can potentially fail due to WT failing with a WCE which needs to be handled by yielding. This undermines SERVER-77116. To solve this, we can skip restoring the children stages once UpdateStage/DeleteStage has reached EOF, since the children stages won't be used anymore.



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

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-79408 Apply SERVER-77116 and SERVER-78470 to TimeseriesModifyStage
Branch: master
https://github.com/mongodb/mongo/commit/ff6797a6537808eb04976192fa98f81936c2493f

Comment by Githook User [ 03/Jul/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-78470 Do not restore UpdateStage/DeleteStage's children if the stage is done.
Branch: EVG-17874-taskgen-test
https://github.com/mongodb/mongo/commit/ea02a3fd807713713412ada93cbca77c5922e31d

Comment by Githook User [ 28/Jun/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-78470 Do not restore UpdateStage/DeleteStage's children if the stage is done.
Branch: master
https://github.com/mongodb/mongo/commit/ea02a3fd807713713412ada93cbca77c5922e31d

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