-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cloud_storage: fix segment materialisation race
In order to create a new materialised segment, one needs to grab units from `materialized_resources` first. This is an async operation. By the time units are acquired, said segment might have already been via a different code path, resulting in the assertion in `remote_partition::materialize_segment` triggering. `remote_partition::aborted_transactions` was particularly susceptible to this. This patch fixes the issue by checking for the existence of the segment and creating a segment (if needed) in the same scheduling task. Functionally, for the read path, nothing should change.
- Loading branch information
Vlad Lazar
committed
Sep 29, 2023
1 parent
5176601
commit fc1c08a
Showing
2 changed files
with
33 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters