Conversation
Workers start on the first batch of tiles-deletion tasks while later batches
are still being enqueued, and job-tracker completed the job as soon as the
enqueued tasks were done, so later batches were rejected with 409 and the
cache was left partially deleted.
- create the job with raster-shared's CacheDeletionJobParams
({ ingestionJobId, tasksCreationCompleted }); a job whose tasks all fit in
the first batch (always the case for swap-update) is created with the flag
already set
- after the last batch is enqueued, set tasksCreationCompleted to true with
the full parameters object (job-manager overwrites parameters on update);
job-tracker completes the job
- drop ingestionJobType from the job parameters
- rename the creator input interface to CreateCacheDeletionJobParams to avoid
clashing with the shared type
- bump @map-colonies/raster-shared to 9.0.0-alpha.2
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:
The cache deletion job is created with its first batch of
tiles-deletiontasks (statusIN_PROGRESS) and later batches are appended viaPOST /jobs/:jobId/tasks. Workers start immediately, job-tracker completed the job once the enqueued tasks were done, and the next batch was rejected with 409 (Cannot perform the requested operation on job with final state status: Completed) — the cache was left partially deleted.Overseer now tells job-tracker when it has finished creating tasks, via raster-shared's
CacheDeletionJobParams:parameters: { ingestionJobId, tasksCreationCompleted }. A job whose tasks all fit in the first batch (always the case for swap-update's single wipe task) is created with the flag alreadytrue— no follow-up update.tasksCreationCompleted: true, sending the full parameters object since job-manager'supdateJoboverwritesparametersrather than merging.failPartialJobstill marks the job Failed.ingestionJobTypeis no longer sent (not part of the shared schema).CacheDeletionJobParams→CreateCacheDeletionJobParamsto avoid clashing with the shared type.@map-colonies/raster-sharedto9.0.0-alpha.2.Deployment: pairs with MapColonies/job-tracker#78, which completes the job only once the flag is set. Deploy this first/together.
Known, accepted gap: if every task completes before the flag is written (flag update slow/retried, or overseer crashing in between), the job stays In Progress at 100%. Very unlikely under normal load.