Skip to content

[FIXED] Deadlock when fetching keys from KV while messages are deleted/purged - #1824

Merged
piotrpio merged 1 commit into
mainfrom
watcher-timeout
Mar 20, 2025
Merged

[FIXED] Deadlock when fetching keys from KV while messages are deleted/purged#1824
piotrpio merged 1 commit into
mainfrom
watcher-timeout

Conversation

@piotrpio

Copy link
Copy Markdown
Collaborator

KV watcher will now send a nil marker if we've not reached 0 pending msgs and have not received any new key for more than JS timeout. This avoids a deadlock when messages are purged/deleted from the stream while e.g. listing keys.

Signed-off-by: Piotr Piotrowski piotr@synadia.com

…d/purged

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio
piotrpio requested a review from Jarema March 18, 2025 12:06
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 84.84% (-0.02%) from 84.855%
when pulling a6608dc on watcher-timeout
into 0f6e9ef on main.

@wallyqs wallyqs changed the title [FIXED] Deadlock when fetching keys from KV while messages are deleteted/purged [FIXED] Deadlock when fetching keys from KV while messages are deleted/purged Mar 18, 2025

@Jarema Jarema left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@piotrpio
piotrpio merged commit ba95fce into main Mar 20, 2025
@piotrpio
piotrpio deleted the watcher-timeout branch March 20, 2025 15:13
@piotrpio piotrpio mentioned this pull request Mar 24, 2025
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