Skip to content

fix: clean up landedOrderCounters on coordinator close#187

Merged
johannesjo merged 1 commit into
johannesjo:mainfrom
xbrxr03:fix/landed-order-counters-leak
Jun 23, 2026
Merged

fix: clean up landedOrderCounters on coordinator close#187
johannesjo merged 1 commit into
johannesjo:mainfrom
xbrxr03:fix/landed-order-counters-leak

Conversation

@xbrxr03

@xbrxr03 xbrxr03 commented Jun 22, 2026

Copy link
Copy Markdown

The landedOrderCounters Map accumulates entries keyed by coordinatorTaskId but never deletes them when a coordinator closes. Over a long session with many coordinator cycles, these stale entries grow without bound — a slow memory leak.

Every other Map in the same cleanup path (coordinators, activeSignalWaitCounts, etc.) is already cleaned up on coordinator close. landedOrderCounters was just missed.

One line: add this.landedOrderCounters.delete(coordinatorTaskId) next to the existing this.coordinators.delete(coordinatorTaskId) call.

landedOrderCounters entries were never deleted when a coordinator
task completed. While each entry is small (a task ID string → a
number), long-running sessions with many coordinator cycles would
accumulate stale entries indefinitely.

Add landedOrderCounters.delete() alongside the existing
coordinators.delete() in the coordinator cleanup path.
@johannesjo

Copy link
Copy Markdown
Owner

Thank you very much! <3

@johannesjo johannesjo merged commit e2f4d8e into johannesjo:main Jun 23, 2026
1 check passed
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.

3 participants