You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: drain pending tx queue in batches with durable ack (#3351)
* fix: drain pending tx queue in batches with durable ack
Resolves slow pending-tx drain caused by one-queue-entry-per-block
consumption and seen-on-enqueue dedup poisoning:
- single sequencer drains multiple queue entries per block up to
MaxBytes; WAL entries are deleted only on ack after block commit,
with retry before the next batch and startup reconciliation against
the last committed block (DropIncluded)
- tx dedup moves from the 30-min cache-manager tx cache into the batch
queue itself, keyed by sha256, released on ack; dead cache tx-seen
subsystem removed
- postponed txs are requeued durably during ack and stay deduped
- Load cleans duplicate/stale WAL entries so restarts cannot
resurrect committed txs
- reaper submits one scrape per interval and notifies the executor
only when new entries were actually queued (explicit pending count
wiring, immune to tracing wrappers)
* fix: address review findings in batch queue drain/ack path
- defer postponed entry requeue until ack fully succeeds so a drain
rollback after a failed ack neither loses nor duplicates postponed txs
- replace fmt.Printf with structured logging in BatchQueue
- use monotonic enqueue counter in reaper to detect new submissions
race-free against concurrent drain/ack
* chore: fix import grouping in reaping bench test
* fix: address PR review feedback on batch queue durability
- fail Load on datastore read errors instead of dropping txs
- detach rollback WAL cleanup from drain context so it runs on shutdown
- raise queue load timeout for large WAL backlogs
- merge postponed-tx collection into the filter loop
- document DropIncluded aliasing, SetPostponed contract, txSeen bound
- add tests: executor ack retry, reconcile crash recovery, bulk-prepend rollback
* chore: addressing PR feedback
* chore: pr feedback
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
## [Unreleased]
11
11
12
+
### Fixed
13
+
14
+
- Drain the pending tx queue in merged batches with a durable WAL-backed ack, fixing severe queue backlog under heavy tx load. Tx dedup moved from the reaper cache into the sequencer queue [#3351](https://github.com/evstack/ev-node/pull/3351)
0 commit comments