Skip to content

Commit

Permalink
Log the start segment for object mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Oct 30, 2024
1 parent 0eaf4f1 commit 08a83f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/sc-consensus-subspace/src/archiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ impl CreateObjectMappings {

segment_index >= target_index
}

/// Returns true if object mappings will be created from a past or future segment index.
pub fn is_enabled(&self) -> bool {
matches!(self, CreateObjectMappings::Segment(_))
}
}

#[derive(Clone, Debug, Eq, PartialEq)]
Expand Down Expand Up @@ -959,6 +964,13 @@ where
AS: AuxStore + Send + Sync + 'static,
SO: SyncOracle + Send + Sync + 'static,
{
if !create_object_mappings.is_enabled() {
info!(
?create_object_mappings,
"Creating object mappings from the configured segment onwards"
);
}

let maybe_archiver = if segment_headers_store.max_segment_index().is_none() {
Some(initialize_archiver(
&segment_headers_store,
Expand Down

0 comments on commit 08a83f5

Please sign in to comment.