cleanup index part dependent

This commit is contained in:
Joonas Koivunen
2024-07-23 14:26:10 +00:00
parent 92deb0dfd7
commit 4222610233

View File

@@ -236,23 +236,16 @@ impl Attempt {
}
#[derive(Default)]
pub(crate) struct SharedStateBuilder {
inprogress: std::collections::HashSet<TimelineId>,
}
pub(crate) struct SharedStateBuilder {}
impl SharedStateBuilder {
/// While loading, visit a timelines persistent [`crate::tenant::IndexPart`] and record if it is being
/// detached.
pub(crate) fn record_loading_timeline(
&mut self,
timeline_id: &TimelineId,
index_part: &crate::tenant::IndexPart,
_timeline_id: &TimelineId,
_index_part: &crate::tenant::IndexPart,
) {
if index_part.ongoing_detach_ancestor.is_some() {
// if the loading a timeline fails, tenant loading must fail as it does right now, or
// something more elaborate needs to be done with this tracking
self.inprogress.insert(*timeline_id);
}
}
/// Merge the loaded not yet deleting in-progress to the existing datastructure.