Skip to content

Wait for database update to become durable#4846

Merged
kim merged 3 commits intomasterfrom
kim/confirmed-database-updates
Apr 21, 2026
Merged

Wait for database update to become durable#4846
kim merged 3 commits intomasterfrom
kim/confirmed-database-updates

Conversation

@kim
Copy link
Copy Markdown
Contributor

@kim kim commented Apr 20, 2026

Confirmed reads applies only to subscription clients, calls to the the
HTTP API publish endpoint return a success response before the operation
is confirmed.

While we await scheduling of a new database, updates require to wait for
the update transaction to be confirmed. To allow this, the
TransactionOffset channel and the database's DurableOffset need to
be returned all the way up to the request handler.

Note that waiting for confirmation is almost always the right choice, so
can't be opted out of at the time of submission of this patch. Callers
may, however, extend the timeout after which waiting for confirmation is
cancelled.

Confirmed reads applies only to subscription clients, calls to the the
HTTP API publish endpoint return a success response before the operation
is confirmed.

While we await scheduling of a new database, updates require to wait for
the update transaction to be confirmed. To allow this, the
`TransactionOffset` channel and the database's `DurableOffset` need to
be returned all the way up to the request handler.

Note that waiting for confirmation is almost always the right choice, so
can't be opted out of at the time of submission of this patch. Callers
may, however, extend the timeout after which waiting for confirmation is
cancelled.
@kim kim requested review from Shubham8287 and gefjon April 20, 2026 13:22
Comment thread crates/core/src/host/wasm_common/module_host_actor.rs
Comment thread crates/client-api/src/routes/database.rs Outdated
Comment thread crates/client-api/src/routes/database.rs Outdated
Comment thread crates/core/src/host/wasm_common/module_host_actor.rs Outdated
Comment thread crates/core/src/host/wasm_common/module_host_actor.rs
@gefjon
Copy link
Copy Markdown
Contributor

gefjon commented Apr 20, 2026

Oh, something I forgot to include in my review: I agree that this is a reasonable behavior, and I don't see the need to make it more configurable than this.

@kim kim enabled auto-merge April 21, 2026 07:24
Copy link
Copy Markdown
Contributor

@Shubham8287 Shubham8287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@kim kim added this pull request to the merge queue Apr 21, 2026
Merged via the queue into master with commit 6f23b19 Apr 21, 2026
33 of 34 checks passed
@kim kim deleted the kim/confirmed-database-updates branch April 21, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants