Skip to content

feat(indexer): add bounded write queue with fetch backpressure - #723

Merged
Akatenvictor merged 1 commit into
AudioBitsStellar:mainfrom
Enchanterme:feat/indexer-bounded-write-queue
Sep 30, 2026
Merged

Akatenvictor merged 1 commit into
AudioBitsStellar:mainfrom
Enchanterme:feat/indexer-bounded-write-queue

Conversation

@Enchanterme

Copy link
Copy Markdown

Add BoundedEventQueue between event fetch and Postgres writes. When the buffer is full, fetch pauses and drains a write batch first so bursts of on-chain events cannot pile up unbounded memory. Configurable via INDEXER_MAX_QUEUE_SIZE and INDEXER_WRITE_BATCH_SIZE.

Description

Please include a summary of the change and which issue is fixed.

Fixes # (issue)

Closes #264
Closes #263
Closes #262
Closes #265

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist:

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Add BoundedEventQueue between event fetch and Postgres writes.
When the buffer is full, fetch pauses and drains a write batch
first so bursts of on-chain events cannot pile up unbounded memory.
Configurable via INDEXER_MAX_QUEUE_SIZE and INDEXER_WRITE_BATCH_SIZE.
@drips-wave

drips-wave Bot commented Sep 30, 2026

Copy link
Copy Markdown

@Enchanterme Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Akatenvictor
Akatenvictor merged commit 9fde156 into AudioBitsStellar:main Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants