ETT-316 issues with glacier expiration job#186
Open
moseshll wants to merge 3 commits into
Open
Conversation
- `BackupExpiration.pm` forks/execs worker processes to handle deletion in parallel. - Existing test suite left as intact as possible.
moseshll
commented
Jun 16, 2026
| my $exp = HTFeed::BackupExpiration->new(storage_name => $vars{storage_name}, dry_run => 0); | ||
| my $exp = HTFeed::BackupExpiration->new( | ||
| storage_name => $vars{storage_name}, | ||
| storage_config => $vars{storage_config}, |
Contributor
Author
There was a problem hiding this comment.
The only change here is to get storage config into the class under test, so it can pass it along (via YAML) to the worker processes that actually need it. Can't rely on patching the global config as we used to, when the work was being done in (or close to) the current process.
Contributor
Author
There was a problem hiding this comment.
The mere presence of storage_config passed to new is what prompts BackupExpiration to write the custom config to a file. I think it would be possible to just pass a flag that says in effect "this is custom config that won't be discoverable by a spawned process -- please write your config to a YAML file." But this is the mechanism that emerged, and it seems to work.
… be already there, maybe as a subdependency..
- `BackupExpiration`
- Set default number of `BackupExpiration` workers to 8
- Allow spawning worker while iterating versions (inner loop) instead of waiting until the end
- allows testing with a bunch of versions of one object
- Log some details on worker spawn and despawn
- Tests
- Add test for unknown storage throwing exception
- Add test with job size 1 so multiple workers are involved
- Fix brittle tests with potential collisions from `old_random_timestamp` and `new_random_timestamp`
- Now choose one and increment or decrement when looping
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.
expire_versions.plinvoked as workerBackupExpirationBatch.pmas core logic insideexpire_versions.plBackupExpirationfork/execworker processes to handle deletion in parallelBackupExpirationworkers to 8old_random_timestampandnew_random_timestamp