Conversation
Base automatically changed from
feat/MAPCO-11709-support-delete-cache-jobs
to
master
October 4, 2026 11:35
CL-SHLOMIKONCHA
requested changes
Oct 4, 2026
CL-SHLOMIKONCHA
left a comment
Contributor
There was a problem hiding this comment.
Looks good, but conflict should be resolve in order to re-view it
…ng tasks (MAPCO-11779) Overseer streams tiles-deletion tasks onto the cache deletion job in batches, so workers finish the first batch while later ones are still being enqueued. The job was completed as soon as completedTasks === taskCount, and job-manager then rejected the remaining batches with 409. - parse job parameters with raster-shared's cacheDeletionJobParamsSchema and complete the job only when tasksCreationCompleted is true; otherwise only update progress - reject invalid job parameters with BadRequestError - bump @map-colonies/raster-shared to 9.0.0-alpha.2 - move delete cache isJobCompleted tests to their own handler spec so the base handler spec tests only the base behaviour
almog8k
force-pushed
the
fix/MAPCO-11779-delete-cache-tasks-creation-flag
branch
from
October 4, 2026 11:59
50e581e to
3cd8e6e
Compare
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.
Related issues: MAPCO-11779
Further information:
Overseer streams
tiles-deletiontasks onto anUpdate_Delete_Cachejob in batches. Workers finish the first batch while later ones are still being enqueued, andDeleteCacheJobHandler.isJobCompleted()returnedtrueoncompletedTasks === taskCount, so the job was completed early and job-manager rejected the remaining batches with 409 — leaving the Redis cache partially deleted.DeleteCacheJobHandlerparsesjob.parameterswith raster-shared'scacheDeletionJobParamsSchemaand completes the job only when all tasks are done andtasksCreationCompletedistrue. When the flag isfalsethe existing no-next-task path just updates progress.BadRequestError(400), same pattern asValidationProceedRule.@map-colonies/raster-sharedto9.0.0-alpha.2.isJobCompletedmoved to its owndeleteCacheHandler.spec.ts, sobaseJobHandler.spec.tstests only the base behaviour (no job-type filtering). Integration tests cover the flag-false and invalid-parameters paths.Deployment: requires the matching overseer change (MapColonies/overseer,
fix/MAPCO-11779), which sets the flag. Cache deletion jobs created by an older overseer have no flag and will get a 400 here — deploy overseer first/together and let in-flight cache deletion jobs drain.Known, accepted gap: if every task completes before overseer writes the flag (flag update slow/retried, or overseer crashing in between), the job stays In Progress at 100%. Very unlikely under normal load (workers poll every 3s); overseer intentionally doesn't complete jobs itself.