Skip to content

fix: Deploy does not queue a key already in jobQueue - #711

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fix-deployer-duplicate-jobqueue-entry
Oct 28, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fix-deployer-duplicate-jobqueue-entry

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

A request arriving while a key is in progress marks the key dirty. When the worker completes, storeResult moves the key from dirty to jobQueue. At that point the key is in jobQueue but no longer in dirty, so a further Deploy for the same key did not find it and appended a second jobQueue entry. Two workers then picked the two entries and processed the same key concurrently. CleanupEntries also removed only one of the entries.

Deploy now looks for the key in jobQueue too. If it is there, the entry is updated, as already done for dirty, and nothing is queued again.

Added unit tests for the key already in jobQueue, and for the full sequence (request while in progress, worker completes, request again).

A request arriving while a key is in progress marks the key dirty. When the
worker completes, storeResult moves the key from dirty to jobQueue. At that
point the key is in jobQueue but no longer in dirty, so a further Deploy for the
same key did not find it and appended a second jobQueue entry. Two workers then
picked the two entries and processed the same key concurrently. CleanupEntries
also removed only one of the entries.

Deploy now looks for the key in jobQueue too. If it is there, the entry is
updated, as already done for dirty, and nothing is queued again.

Added unit tests for the key already in jobQueue, and for the full sequence
(request while in progress, worker completes, request again).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gianlucam76
gianlucam76 force-pushed the fix-deployer-duplicate-jobqueue-entry branch from c152012 to 0893369 Compare October 28, 2026 11:17
@gianlucam76
gianlucam76 merged commit eb12e85 into projectsveltos:main Oct 28, 2026
4 checks passed
@gianlucam76
gianlucam76 deleted the fix-deployer-duplicate-jobqueue-entry branch October 28, 2026 11:31
gianlucam76 added a commit to gianlucam76/classifier that referenced this pull request Oct 28, 2026
This picks a [fix](projectsveltos/libsveltos#711) in worker queues
gianlucam76 added a commit to projectsveltos/addon-controller that referenced this pull request Oct 28, 2026
gianlucam76 added a commit to gianlucam76/healthcheck-manager that referenced this pull request Oct 28, 2026
gianlucam76 added a commit to projectsveltos/event-manager that referenced this pull request Oct 28, 2026
This picks a [fix](projectsveltos/libsveltos#711) in worker queues
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