Skip to content

[Query] Fix shared exchange account IDs and waiter cleanup - #6

Merged
ColinLeeo merged 1 commit into
exchange-fanin-budgetfrom
codex/fix-exchange-budget-cleanup
Oct 16, 2026
Merged

ColinLeeo merged 1 commit into
exchange-fanin-budgetfrom
codex/fix-exchange-budget-cleanup

Conversation

@ColinLeeo

Copy link
Copy Markdown
Owner

This follow-up targets exchange-fanin-budget for apache/iotdb#18869.

Eligible fragments registered shared exchange budgets with a query-qualified FI ID, while real exchange handles and cleanup used fragment.instance. Register the canonical handle account instead, fix the synthetic planner fixtures, and cover aggregate admission, wakeup, and complete cleanup with real SourceHandle instances.

FI teardown also scanned the global pending queue once per fragment. Add a per-FI waiter index and a sequence-ordered global index so cancellation removes relevant requests directly while preserving FIFO wakeups. Cancelled and completed requests leave both indexes; the retry after publishing a waiter and the existing allocation locks remain in place. Successful admission bypasses the waiter indexes. Ordered-map insertion/removal is confined to waiting requests.

Validation:

  • Three new regressions failed on the previous implementation: 2048 bytes granted against a 1024-byte INPUT budget, and 1,573,376 global waiter visits in each of two cleanup scenarios.
  • All 144 focused unit tests passed, including zero global waiter visits during indexed cleanup, unaffected unrelated waiters, FIFO after cancellation, and 32 rounds of concurrent cancel/grant cleanup.
  • All 9 IoTDBCollectFanInIT cases passed with three DataNodes and rebuilt node templates.
  • Full English reactor tests and Chinese reactor test compilation (including integration-test sources), Spotless, Checkstyle, license checks, and git diff --check passed.

@ColinLeeo
ColinLeeo merged commit 788a995 into exchange-fanin-budget Oct 16, 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

Development

Successfully merging this pull request may close these issues.

1 participant