fix: CatalogChunk no longer needs to record a write when created from a MUB chunk
parent
7ccbab8c90
commit
649b467adb
|
@ -238,8 +238,7 @@ impl ChunkMetrics {
|
||||||
impl CatalogChunk {
|
impl CatalogChunk {
|
||||||
/// Creates a new open chunk from the provided MUB chunk.
|
/// Creates a new open chunk from the provided MUB chunk.
|
||||||
///
|
///
|
||||||
/// Panics if the provided chunk is empty, otherwise creates a new open chunk and records a
|
/// Panics if the provided chunk is empty, otherwise creates a new open chunk.
|
||||||
/// write at the current time.
|
|
||||||
pub(super) fn new_open(
|
pub(super) fn new_open(
|
||||||
addr: ChunkAddr,
|
addr: ChunkAddr,
|
||||||
chunk: mutable_buffer::chunk::MBChunk,
|
chunk: mutable_buffer::chunk::MBChunk,
|
||||||
|
@ -256,7 +255,7 @@ impl CatalogChunk {
|
||||||
.state
|
.state
|
||||||
.inc_with_labels(&[KeyValue::new("state", "open")]);
|
.inc_with_labels(&[KeyValue::new("state", "open")]);
|
||||||
|
|
||||||
let mut chunk = Self {
|
Self {
|
||||||
addr,
|
addr,
|
||||||
stage,
|
stage,
|
||||||
lifecycle_action: None,
|
lifecycle_action: None,
|
||||||
|
@ -264,9 +263,7 @@ impl CatalogChunk {
|
||||||
time_of_first_write: Some(first_write),
|
time_of_first_write: Some(first_write),
|
||||||
time_of_last_write: Some(last_write),
|
time_of_last_write: Some(last_write),
|
||||||
time_closed: None,
|
time_closed: None,
|
||||||
};
|
}
|
||||||
chunk.record_write();
|
|
||||||
chunk
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new RUB chunk from the provided RUB chunk and metadata
|
/// Creates a new RUB chunk from the provided RUB chunk and metadata
|
||||||
|
|
Loading…
Reference in New Issue