Skip to content

Commit

Permalink
Clean up unused flags (#30528)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: cf2060d70981a21923376158c0ff65aa3d594b27
  • Loading branch information
jordanhunt22 authored and Convex, Inc. committed Oct 9, 2024
1 parent 6dbc909 commit 734b7d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions crates/common/src/knobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,6 @@ pub static DOCUMENT_RETENTION_DELAY: LazyLock<Duration> = LazyLock::new(|| {
Duration::from_secs(env_config("DOCUMENT_RETENTION_DELAY", 60 * 60 * 24 * 90))
});

/// Resets DocumentRetentionConfirmedDeletedTimestamp to Timestamp::MIN
pub static RESET_DOCUMENT_RETENTION: LazyLock<bool> =
LazyLock::new(|| env_config("RESET_DOCUMENT_RETENTION", false));

/// The time backend should wait before it acquires the lease. This wait allows
/// for the backend to be added to service discovery, before it renders the
/// previous backends unusable.
Expand Down
10 changes: 0 additions & 10 deletions crates/database/src/retention.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ use common::{
INDEX_RETENTION_DELETE_CHUNK,
INDEX_RETENTION_DELETE_PARALLEL,
MAX_RETENTION_DELAY_SECONDS,
RESET_DOCUMENT_RETENTION,
RETENTION_DELETES_ENABLED,
RETENTION_DELETE_BATCH,
RETENTION_DOCUMENT_DELETES_ENABLED,
Expand Down Expand Up @@ -238,15 +237,6 @@ impl<RT: Runtime> LeaderRetentionManager<RT> {
snapshot_reader: Reader<SnapshotManager<RT>>,
follower_retention_manager: FollowerRetentionManager<RT>,
) -> anyhow::Result<LeaderRetentionManager<RT>> {
if *RESET_DOCUMENT_RETENTION {
persistence
.write_persistence_global(
PersistenceGlobalKey::DocumentRetentionConfirmedDeletedTimestamp,
ConvexValue::from(i64::from(Timestamp::MIN)).into(),
)
.await?;
}

let reader = persistence.reader();
let snapshot_ts = snapshot_reader.lock().latest_ts();
let min_snapshot_ts = snapshot_ts.prior_ts(
Expand Down

0 comments on commit 734b7d9

Please sign in to comment.