remove Layer::is_incremental, and so on

This commit is contained in:
Joonas Koivunen
2023-08-22 00:34:49 +03:00
parent ecd13404ab
commit b7cb9f43b8
5 changed files with 0 additions and 38 deletions

View File

@@ -344,12 +344,6 @@ impl LayerAccessStats {
/// are used in (timeline).
#[async_trait::async_trait]
pub trait Layer: std::fmt::Debug + std::fmt::Display + Send + Sync + 'static {
/// Does this layer only contain some data for the key-range (incremental),
/// or does it contain a version of every page? This is important to know
/// for garbage collecting old layers: an incremental layer depends on
/// the previous non-incremental layer.
fn is_incremental(&self) -> bool;
///
/// Return data needed to reconstruct given page at LSN.
///

View File

@@ -254,10 +254,6 @@ impl Layer for DeltaLayer {
self.get_value_reconstruct_data(key, lsn_range, reconstruct_state, ctx)
.await
}
fn is_incremental(&self) -> bool {
self.is_incremental()
}
}
/// Boilerplate to implement the Layer trait, always use layer_desc for persistent layers.
impl std::fmt::Display for DeltaLayer {
@@ -390,10 +386,6 @@ impl DeltaLayer {
self.layer_desc().lsn_range.clone()
}
pub(crate) fn is_incremental(&self) -> bool {
self.layer_desc().is_incremental
}
pub(crate) fn local_path(&self) -> Option<PathBuf> {
Some(self.path())
}

View File

@@ -185,11 +185,6 @@ impl Layer for ImageLayer {
self.get_value_reconstruct_data(key, lsn_range, reconstruct_state, ctx)
.await
}
/// Boilerplate to implement the Layer trait, always use layer_desc for persistent layers.
fn is_incremental(&self) -> bool {
self.is_incremental()
}
}
/// Boilerplate to implement the Layer trait, always use layer_desc for persistent layers.
@@ -283,11 +278,6 @@ impl ImageLayer {
self.layer_desc().lsn_range.clone()
}
/// Boilerplate to implement the Layer trait, always use layer_desc for persistent layers.
pub(crate) fn is_incremental(&self) -> bool {
self.layer_desc().is_incremental
}
pub(crate) fn local_path(&self) -> Option<PathBuf> {
Some(self.path())
}

View File

@@ -111,11 +111,6 @@ impl InMemoryLayer {
self.start_lsn..self.end_lsn_or_max()
}
pub(crate) fn is_incremental(&self) -> bool {
// in-memory layer is always considered incremental.
true
}
/// debugging function to print out the contents of the layer
///
/// this is likely completly unused
@@ -218,10 +213,6 @@ impl InMemoryLayer {
#[async_trait::async_trait]
impl Layer for InMemoryLayer {
fn is_incremental(&self) -> bool {
self.is_incremental()
}
async fn get_value_reconstruct_data(
&self,
key: Key,

View File

@@ -94,11 +94,6 @@ impl Layer for RemoteLayer {
Ok(())
}
/// Boilerplate to implement the Layer trait, always use layer_desc for persistent layers.
fn is_incremental(&self) -> bool {
self.layer_desc().is_incremental
}
}
/// Boilerplate to implement the Layer trait, always use layer_desc for persistent layers.