Package-level declarations

Types

Link copied to clipboard
class PostgresEventLog(dataSource: DataSource, context: String, val partitions: Int, dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher, options: PostgresEventLogOptions = PostgresEventLogOptions()) : EventLog, AccessWalks

The EventLog of one bounded context on PostgreSQL (documentation/designs/03-log-and-snapshot.md §2).

Link copied to clipboard
class PostgresEventLogOptions(val pollInterval: Duration = DEFAULT_POLL_INTERVAL, val maxPollInterval: Duration = DEFAULT_MAX_POLL_INTERVAL, val tailBatch: Int = DEFAULT_TAIL_BATCH, val ddl: Ddl = Ddl.AUTO, val arraysAbove: Int = PostgresBatches.ARRAYS_ABOVE, val stallWarning: Duration = DEFAULT_STALL_WARNING)

The settings of a PostgresEventLog: how its tails poll, and how it manages its tables. An immutable value with the defaults a host starts from; the store builds it once from its configuration (PostgresStoreProvider), and the log takes it whole. The MongoDB log takes its own, MongoEventLogOptions, of the same shape.

Link copied to clipboard

How long a store's calls to PostgreSQL may wait for a reply (JDBC's network timeout, the socket's read timeout in pgjdbc) on PostgreSQL: without one, a reply lost on the way blocks its caller forever, pgjdbc's socket reads having no timeout by default. Every connection a store borrows has OPERATION unless its store sets another (wow.postgres.operation-timeout) or the application's pool sets a shorter one; the schema's statements (format records, tables, indexes) have DDL, as an index built over a large table may take minutes. A call that times out loses its connection (pgjdbc closes it, the pool replaces it) and fails as an I/O error: a transient failure, a write's outcome unknown. The queries keep their own budget (statement_timeout) on the connections of their own data source.