storage-controller: respond to table appends before txn-wal apply#37443
Merged
Conversation
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>
63be862 to
9d14786
Compare
Contributor
Author
|
ready for review |
DAlperin
approved these changes
Jul 8, 2026
DAlperin
left a comment
Member
There was a problem hiding this comment.
LGTM. One thought is that this changes the semantics of the append_table_duration_seconds. We lose the coverage of actually applying. Probably fine, but might be worth a new metric.
709d9d8 to
ccb9bde
Compare
Contributor
Author
|
@DAlperin I added a commit with new metric. I'm not sure if this is too heavy-duty though. What's your opinion? |
Member
|
@def- (sorry forgot to hit enter) I think it's fine. Thank you! |
def-
added a commit
that referenced
this pull request
Jul 14, 2026
…ply (#37443) (#37631) This reverts commit 6c590b0. I tried to fix performance regression the change introduced in other benchmarks in #37627, but failed. This feels safer. It's too bad we lose the ~2.5x improvement the PR had though. Nightly perf. run shows us that we do lose some performance from reverting: https://buildkite.com/materialize/nightly/builds/17318
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
(with 1000 tables)