SqliteCheckpointerConfig

org.llm4s.agent.graph.sqlite.SqliteCheckpointerConfig
See theSqliteCheckpointerConfig companion object
final case class SqliteCheckpointerConfig

How a SqliteCheckpointer uses its database connection.

busyTimeout is how long a write waits for the database's write lock while another connection - another store over the same file, in this process or another - holds it, before the call fails. SQLite allows one writer at a time per file, and every write here is short (one transaction per call), so a wait is brief; a call that still times out returns a ProcessingError and changes nothing. The stores in one process that write the same file take turns, first come first served, and a write waits up to busyTimeout for the writes queued ahead of it, then up to busyTimeout again for SQLite's lock, which another process may hold. A call also waits for the store's own earlier calls - one store is one connection - within the same first busyTimeout, so every call returns within twice busyTimeout plus the time its own SQL takes: the bound the Checkpointer contract asks a store to document (#1919). Keep that well inside ClaimPolicy.ttl - ClaimPolicy.renewEvery. It is rounded up to whole milliseconds, and must be positive and at most Int.MaxValue milliseconds: apply and the with* setters throw IllegalArgumentException otherwise, and SqliteCheckpointerConfig.of returns a ValidationError.

The journal mode and sync level are not configurable: the store always runs in WAL mode with synchronous = FULL, so readers never block the writer and a commit that returned survives a power loss.

Attributes

Companion
object
Source
SqliteCheckpointerConfig.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product