Checkpoint busy timeout to 250 milliseconds

This commit is contained in:
Philip O'Toole
2026-01-09 01:16:50 -05:00
committed by GitHub
parent cfcbe992b6
commit e6e6e8859b
2 changed files with 12 additions and 7 deletions

View File

@@ -1,3 +1,7 @@
## v9.3.14 (unreleased)
### Implementation changes and bug fixes
- [PR #2444](https://github.com/rqlite/rqlite/pull/2444): Increase WAL Checkpoint busy timeout to 250ms.
## v9.3.13 (January 8th 2026)
### Implementation changes and bug fixes
- [PR #2443](https://github.com/rqlite/rqlite/pull/2443): Don't scan for rows if zero columns returned by query. Fixes issue [#2441](https://github.com/rqlite/rqlite/issues/2441).

View File

@@ -25,11 +25,12 @@ import (
)
const (
SQLiteHeaderSize = 32
bkDelay = 250
durToOpenLog = 2 * time.Second
OptimizeDefault = 0xFFFE
OptimizeAll = 0x10002
SQLiteHeaderSize = 32
bkDelay = 250 * time.Millisecond
checkpointBusyTimeout = 250 * time.Millisecond
durToOpenLog = 2 * time.Second
OptimizeDefault = 0xFFFE
OptimizeAll = 0x10002
)
const (
@@ -659,7 +660,7 @@ func (db *DB) BusyTimeout() (rwMs, roMs int, err error) {
// Checkpoint checkpoints the WAL file. If the WAL file is not enabled, this
// function is a no-op.
func (db *DB) Checkpoint(mode CheckpointMode) (*CheckpointMeta, error) {
return db.CheckpointWithTimeout(mode, 1000)
return db.CheckpointWithTimeout(mode, checkpointBusyTimeout)
}
// CheckpointWithTimeout performs a WAL checkpoint. If the checkpoint does not
@@ -1741,7 +1742,7 @@ func copyDatabaseConnection(dst, src *sqlite3.SQLiteConn) error {
break
}
stats.Add(numBackupSleeps, 1)
time.Sleep(bkDelay * time.Millisecond)
time.Sleep(bkDelay)
}
return bk.Finish()
}