Repository navigation
fix: Deploy does not queue a key already in jobQueue - #711
Merged
gianlucam76 merged 1 commit intoOct 28, 2026
Merged
gianlucam76 merged 1 commit into
gianlucam76 merged 1 commit into
Conversation
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
force-pushed
the
fix-deployer-duplicate-jobqueue-entry
branch
from
October 28, 2026 11:17
c152012 to
0893369
Compare
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
This picks a [fix](projectsveltos/libsveltos#711) in worker queues
gianlucam76
added a commit
to gianlucam76/healthcheck-manager
that referenced
this pull request
Oct 28, 2026
This picks a [fix](projectsveltos/libsveltos#711) in worker queues
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).