Skip to content

Commit

Permalink
keep pruner_lo
Browse files Browse the repository at this point in the history
  • Loading branch information
wlmyng committed Oct 17, 2024
1 parent da6a0c0 commit c51ca8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ CREATE TABLE watermarks
-- be dropped. The pruner uses this column to determine whether to prune or wait long enough
-- that all in-flight reads complete or timeout before it acts on an updated watermark.
timestamp_ms BIGINT NOT NULL,
-- Column used by the pruner to track its true progress. Data at and below this watermark can
-- be immediately pruned.
pruner_lo BIGINT,
PRIMARY KEY (entity)
);
3 changes: 3 additions & 0 deletions crates/sui-indexer/src/models/watermarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pub struct StoredWatermark {
/// be dropped. The pruner uses this column to determine whether to prune or wait long enough
/// that all in-flight reads complete or timeout before it acts on an updated watermark.
pub timestamp_ms: i64,
/// Column used by the pruner to track its true progress. Data at and below this watermark can
/// be immediately pruned.
pub pruner_lo: Option<i64>,
}

impl StoredWatermark {
Expand Down
1 change: 1 addition & 0 deletions crates/sui-indexer/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ diesel::table! {
tx_hi_inclusive -> Int8,
reader_lo -> Int8,
timestamp_ms -> Int8,
pruner_lo -> Nullable<Int8>,
}
}

Expand Down

0 comments on commit c51ca8d

Please sign in to comment.