Take the good improvements from node-go pruner #1041
Merged
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.
Add CountDeletable configuration option to prune.Executor.Run method and modify pruning loop termination logic to stop when batch deletes fewer rows than BatchSize
CountDeletableboolean field toconfig.PruneConfigstruct with CLI flag and environment variable support in pkg/config/pruneOptions.goprune.Executor.Runmethod to conditionally count deletable envelopes based onCountDeletableconfiguration and changes loop termination to stop when batch deletes fewer rows thanBatchSizein pkg/prune/prune.goCapturingWriteSyncerandCapturingLoggertest utilities for in-memory log capture in pkg/testutils/log.goTestExecutor_PruneCountWorksto verify counting functionality in pkg/prune/prune_test.go📍Where to Start
Start with the
prune.Executor.Runmethod in pkg/prune/prune.go to understand the core pruning logic changes and how the newCountDeletableconfiguration affects execution flow.Macroscope summarized 792cd72.