Skip to content

storage-controller: respond to table appends before txn-wal apply#37443

Open
def- wants to merge 1 commit into
MaterializeInc:mainfrom
def-:txn-wal-deferred-apply
Open

storage-controller: respond to table appends before txn-wal apply#37443
def- wants to merge 1 commit into
MaterializeInc:mainfrom
def-:txn-wal-deferred-apply

Conversation

@def-

@def- def- commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

The commit to the txns shard already makes a table write durable and linearized, so send the append response then and run the idempotent apply and compaction afterwards, off the caller's critical path. Reads of the just-written shards block until the apply happens, and a crash before applying is covered by the next append's apply_le.

NAME                                | TYPE            |      THIS       |      OTHER      |  UNIT  | THRESHOLD  |  Regression?  | 'THIS' is
--------------------------------------------------------------------------------------------------------------------------------------------------------
MultiTableTransactionCommit         | wallclock       |           0.038 |           0.098 |   s    |    10%     |      no       | better:  2.6 times faster

(with 1000 tables)

The commit to the txns shard already makes a table write durable and
linearized, so send the append response then and run the idempotent
apply and compaction afterwards, off the caller's critical path. Reads
of the just-written shards block until the apply happens, and a crash
before applying is covered by the next append's apply_le.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@def- def- force-pushed the txn-wal-deferred-apply branch from 63be862 to 9d14786 Compare July 5, 2026 11:42
@def- def- requested a review from DAlperin July 5, 2026 13:39
@def- def- marked this pull request as ready for review July 5, 2026 13:39
@def- def- requested a review from a team as a code owner July 5, 2026 13:39
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.

1 participant