Remove min_interval_seconds from plugin workers; vacuum default to 17m (#8790)

remove min_interval_seconds from plugin workers and default vacuum interval to 17m

The worker-level min_interval_seconds was redundant with the admin-side
DetectionIntervalSeconds, complicating scheduling logic. Remove it from
vacuum, volume_balance, erasure_coding, and ec_balance handlers.

Also change the vacuum default DetectionIntervalSeconds from 2 hours to
17 minutes to match the previous default behavior.
This commit is contained in:
Chris Lu
2026-03-26 23:04:36 -07:00
committed by GitHub
parent f98d63fcd0
commit 2604ec7deb
12 changed files with 12 additions and 317 deletions

View File

@@ -87,9 +87,6 @@ func TestDeriveVacuumConfigAllowsZeroValues(t *testing.T) {
"min_volume_age_seconds": {
Kind: &plugin_pb.ConfigValue_Int64Value{Int64Value: 0},
},
"min_interval_seconds": {
Kind: &plugin_pb.ConfigValue_Int64Value{Int64Value: 0},
},
}
cfg := deriveVacuumConfig(values)
@@ -99,9 +96,6 @@ func TestDeriveVacuumConfigAllowsZeroValues(t *testing.T) {
if cfg.MinVolumeAgeSeconds != 0 {
t.Fatalf("expected min_volume_age_seconds 0, got %d", cfg.MinVolumeAgeSeconds)
}
if cfg.MinIntervalSeconds != 0 {
t.Fatalf("expected min_interval_seconds 0, got %d", cfg.MinIntervalSeconds)
}
}
func TestMasterAddressCandidates(t *testing.T) {
@@ -157,29 +151,6 @@ func TestVacuumHandlerRejectsUnsupportedJobType(t *testing.T) {
}
}
func TestVacuumHandlerDetectSkipsByMinInterval(t *testing.T) {
handler := NewVacuumHandler(nil, 0)
sender := &recordingDetectionSender{}
err := handler.Detect(context.Background(), &plugin_pb.RunDetectionRequest{
JobType: "vacuum",
LastSuccessfulRun: timestamppb.New(time.Now().Add(-3 * time.Second)),
WorkerConfigValues: map[string]*plugin_pb.ConfigValue{
"min_interval_seconds": {Kind: &plugin_pb.ConfigValue_Int64Value{Int64Value: 10}},
},
}, sender)
if err != nil {
t.Fatalf("detect returned err = %v", err)
}
if sender.proposals == nil {
t.Fatalf("expected proposals message")
}
if len(sender.proposals.Proposals) != 0 {
t.Fatalf("expected zero proposals, got %d", len(sender.proposals.Proposals))
}
if sender.complete == nil || !sender.complete.Success {
t.Fatalf("expected successful completion message")
}
}
func TestBuildExecutorActivity(t *testing.T) {
activity := BuildExecutorActivity("running", "vacuum in progress")