Set default max checkpoint.

This commit is contained in:
Ben Johnson
2021-01-10 09:46:27 -07:00
parent 0abe09526d
commit 60cb2c97ca

2
db.go
View File

@@ -30,6 +30,7 @@ const (
DefaultMonitorInterval = 1 * time.Second DefaultMonitorInterval = 1 * time.Second
DefaultCheckpointInterval = 1 * time.Minute DefaultCheckpointInterval = 1 * time.Minute
DefaultMinCheckpointPageN = 1000 DefaultMinCheckpointPageN = 1000
DefaultMaxCheckpointPageN = 10000
) )
// DB represents a managed instance of a SQLite database in the file system. // DB represents a managed instance of a SQLite database in the file system.
@@ -91,6 +92,7 @@ func NewDB(path string) *DB {
notify: make(chan struct{}), notify: make(chan struct{}),
MinCheckpointPageN: DefaultMinCheckpointPageN, MinCheckpointPageN: DefaultMinCheckpointPageN,
MaxCheckpointPageN: DefaultMaxCheckpointPageN,
CheckpointInterval: DefaultCheckpointInterval, CheckpointInterval: DefaultCheckpointInterval,
MonitorInterval: DefaultMonitorInterval, MonitorInterval: DefaultMonitorInterval,
} }