chore: do not clean the DB anymore (#10232)

This commit is contained in:
jif-oai 2026-01-30 18:23:00 +01:00 committed by GitHub
parent 09d25e91e9
commit 887bec0dee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 7 deletions

View file

@ -428,7 +428,7 @@ impl RolloutRecorder {
}
},
Err(e) => {
warn!("failed to parse rollout line: {v:?}, error: {e}");
warn!("failed to parse rollout line: {e}");
parse_errors = parse_errors.saturating_add(1);
}
}

View file

@ -33,12 +33,6 @@ pub(crate) async fn init_if_enabled(
) -> Option<StateDbHandle> {
let state_path = config.codex_home.join(STATE_DB_FILENAME);
if !config.features.enabled(Feature::Sqlite) {
// We delete the file on best effort basis to maintain retro-compatibility in the future.
let wal_path = state_path.with_extension("sqlite-wal");
let shm_path = state_path.with_extension("sqlite-shm");
for path in [state_path.as_path(), wal_path.as_path(), shm_path.as_path()] {
tokio::fs::remove_file(path).await.ok();
}
return None;
}
let existed = tokio::fs::try_exists(&state_path).await.unwrap_or(false);