Repository navigation
Reduce time taken in decode jobs - #222
Merged
Merged
Conversation
serprex
marked this pull request as draft
October 19, 2026 13:41
serprex
self-requested a review
October 19, 2026 13:47
harshil-goel
force-pushed
the
harshil/perf
branch
2 times, most recently
from
October 19, 2026 15:24
4499ba1 to
8c83938
Compare
This was referenced Oct 19, 2026
Batch record dispatch and cut per-record work in the serial stage. `RecordSink::on_records` takes a whole batch so a composite allocates one boxed future per batch instead of per record; the default implementation loops, so only the sinks worth batching implement it. `Send` becomes a supertrait, which the default body needs to hold `&mut self` across an await. `DecoderXactPair` runs the decoder over the batch before the reorder sink, stronger than the per-record order it replaces and still correct because a commit only drains its own xact. `XactBuffer` counts live `stash_rfns` in an `Arc<AtomicU64>` outside the mutex, so the per-record stash check short-circuits the lock while no xact holds a candidate. `BufferingDecoderSink` holds it as an `Option`, and `None` keeps the unconditional locked check so an unwired construction site stays correct rather than silently skipping. Bump pg-clickhouse-c to main's 4fe6b70, which carries the pgvector and QBit encoding the oracle tests need; the branch had pinned an older commit, so CI built a bridge without them and `pgvector_fills_float_arrays_and_qbit` failed at the bridge worker. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGcL5hTwVJsoRbyTEops8m
1. don't serialize small in-memory transactions with spill format 2. group transaction registrations, row chunks, and placement counts across small transactions 3. reduce size of futures per transaction from 10KB to 3KB 4. skip copying index records before ignoring 5. give WAL processing task its own thread 6. optimistic parallel decoding which WAL processing can use as long as catalog didn't change 7. reduce per-record allocations 8. reuse table routing between transactions 9. batch WAL records written to shadow catalog
harshil-goel
force-pushed
the
harshil/perf
branch
from
October 20, 2026 01:05
d54463c to
91efc4d
Compare
harshil-goel
marked this pull request as ready for review
October 20, 2026 01:05
iskakaushik
approved these changes
Oct 20, 2026
This was referenced Oct 20, 2026
serprex
added a commit
that referenced
this pull request
Oct 20, 2026
Queue worker failures could leave streaming stalled without an error. Drain admission could wait forever for memory held by its own staged rows. Restore failure reporting and send staged rows before waiting, with an exit when pipeline fails. Run queue worker on shared runtime so backfills survive worker exit. Wait for segment writes and descriptor log cleanup before restarting a session. Bound replay staging, apply drain limits to large in-memory transactions, and account for column storage in memory plans. Restore attribution and warnings for unexpected skipped records. Remove misleading route counters and add regression coverage for failure, spill, grouping, and cleanup paths.
serprex
added a commit
that referenced
this pull request
Oct 20, 2026
Queue worker failures could leave streaming stalled without an error. Drain admission could wait forever for memory held by its own staged rows. Restore failure reporting and send staged rows before waiting, with an exit when pipeline fails. Run queue worker on shared runtime so backfills survive worker exit. Wait for segment writes and descriptor log cleanup before restarting a session. Bound replay staging, apply drain limits to large in-memory transactions, and account for column storage in memory plans. Restore attribution and warnings for unexpected skipped records. Remove misleading route counters and add regression coverage for failure, spill, grouping, and cleanup paths.
serprex
added a commit
that referenced
this pull request
Oct 20, 2026
Queue worker failures could leave streaming stalled without an error. Drain admission could wait forever for memory held by its own staged rows. Restore failure reporting and send staged rows before waiting, with an exit when pipeline fails. Run queue worker on shared runtime so backfills survive worker exit. Wait for segment writes and descriptor log cleanup before restarting a session. Bound replay staging, apply drain limits to large in-memory transactions, and account for column storage in memory plans. Restore attribution and warnings for unexpected skipped records. Remove misleading route counters and add regression coverage for failure, spill, grouping, and cleanup paths.
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.
No description provided.