mirror of
https://github.com/openai/codex.git
synced 2026-06-01 19:02:59 +00:00
feat: move auto vaccum (#21378)
The initial vaccum is not needed anymore. We can consider all the DBs have been reclaimed by now
This commit is contained in:
@@ -300,10 +300,10 @@ WHERE id IN (
|
||||
return Ok(());
|
||||
};
|
||||
self.delete_logs_before(cutoff.timestamp()).await?;
|
||||
sqlx::query("PRAGMA wal_checkpoint(TRUNCATE)")
|
||||
.execute(self.logs_pool.as_ref())
|
||||
.await?;
|
||||
sqlx::query("PRAGMA incremental_vacuum")
|
||||
// Startup cleanup should not wait behind or block foreground work.
|
||||
// PASSIVE checkpoints copy whatever is immediately available and skip
|
||||
// frames that would require waiting on active readers or writers.
|
||||
sqlx::query("PRAGMA wal_checkpoint(PASSIVE)")
|
||||
.execute(self.logs_pool.as_ref())
|
||||
.await?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user