Skip to content

Fix: CloseQueueStrategy leaks queue on failed close-request write - #87

Draft
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:260724_free_resources_on_failed_close
Draft

Fix: CloseQueueStrategy leaks queue on failed close-request write#87
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:260724_free_resources_on_failed_close

Conversation

@678098

@678098 678098 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Problem

In handleConfigureStatus, after a successful configure response, the strategy sends the close-queue request. If that write fails, the queue was marked e_CLOSED but never removed from the active queue map (keyQueueIdMap), leaving a stuck entry. The URI could not be reopened afterwards.

Fix

On close-request write failure in the default scenario, call onFullyClosed() to remove the queue from the active maps (mirroring the success path in onCloseResponse). Late scenarios, where the queue is already removed, just mark it e_CLOSED.

@678098
678098 requested a review from pniedzielski July 24, 2026 17:22
@678098
678098 force-pushed the 260724_free_resources_on_failed_close branch from cfda449 to c737a69 Compare July 24, 2026 17:24
@678098 678098 changed the title Fix: CloseQueueStrategy leaks the queue when the close-request write … Fix: CloseQueueStrategy leaks queue on failed close-request write Jul 24, 2026
…fails

Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
@678098
678098 force-pushed the 260724_free_resources_on_failed_close branch from c737a69 to 0c62a61 Compare July 24, 2026 17:32
onFullyClosed();
if (genericResult.isNotConnected()) {
genericResult = GenericResult.SUCCESS;
}

@678098 678098 Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@678098
678098 removed the request for review from pniedzielski July 24, 2026 18:15
@678098
678098 marked this pull request as draft July 24, 2026 18:15
@678098 678098 self-assigned this Jul 24, 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.

2 participants