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.
Description
This pull request introduces the concept of batch processing for garbage collection (GC) jobs in the
manager/config
package. The most important changes include adding a batch size parameter to the GC configuration, updating the validation logic to require this parameter, and implementing the batch deletion logic in the GC job.Configuration updates:
manager/config/config.go
: AddedBatchSize
parameter toGCConfig
struct and set its default value in theNew
function. Updated theValidate
function to check for the presence of theBatchSize
parameter. [1] [2] [3]manager/config/constants.go
: Defined theDefaultJobGCBatchSize
constant.Testing updates:
manager/config/config_test.go
: Updated tests to include theBatchSize
parameter and added a new test case to validate its presence. [1] [2]Implementation updates:
manager/job/gc.go
: Replaced single deletion logic withdeleteInBatches
function to handle batch deletions. [1] [2]Configuration file updates:
manager/config/testdata/manager.yaml
: AddedbatchSize
parameter to the GC job configuration.Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist