SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
feat(s3/lifecycle): enable scheduler by default (#9492)
Chris Lu813f1351f8df
diff --git a/weed/worker/tasks/s3_lifecycle/handler.go b/weed/worker/tasks/s3_lifecycle/handler.goindex 3b4aad99fe..caaf125b7a 100644--- a/weed/worker/tasks/s3_lifecycle/handler.go+++ b/weed/worker/tasks/s3_lifecycle/handler.go@@ -143,6 +143,15 @@ func (h *Handler) Descriptor() *plugin_pb.JobTypeDescriptor {},},AdminRuntimeDefaults: &plugin_pb.AdminRuntimeDefaults{+ // On by default: S3 lifecycle is a standard bucket feature+ // (PutBucketLifecycleConfiguration is part of the S3 API),+ // and a bucket with rules set but no worker running silently+ // retains data past its declared expiration. Operators who+ // want the worker off can still disable it in the admin UI;+ // the default error is "data lingers" not "worker burns CPU+ // on empty rule sets" (the worker fast-exits with no+ // configured rules).+ Enabled: true,DetectionIntervalMinutes: 24 * 60, // dailyDetectionTimeoutSeconds: 60,MaxJobsPerDetection: 1,diff --git a/weed/worker/tasks/s3_lifecycle/handler_test.go b/weed/worker/tasks/s3_lifecycle/handler_test.goindex 1ea8331fc5..5ed1beca49 100644--- a/weed/worker/tasks/s3_lifecycle/handler_test.go+++ b/weed/worker/tasks/s3_lifecycle/handler_test.go@@ -348,6 +348,20 @@ func TestDescriptor_AdminRuntimeDefaultsDailyCadence(t *testing.T) {assert.Equal(t, int32(1), d.AdminRuntimeDefaults.MaxJobsPerDetection)}+func TestDescriptor_AdminRuntimeDefaultsEnabledByDefault(t *testing.T) {+ // S3 lifecycle is a standard bucket feature — operators set+ // PutBucketLifecycleConfiguration expecting it to actually fire.+ // Default-off would silently retain data past declared expiration+ // until an operator notices and flips it on. Document the choice+ // here so a future change to disabled-by-default fails the test+ // and surfaces a conscious revisit.+ h := NewHandler(nil)+ d := h.Descriptor()+ require.NotNil(t, d.AdminRuntimeDefaults)+ assert.True(t, d.AdminRuntimeDefaults.Enabled,+ "s3_lifecycle defaults must enable the scheduler so configured rules fire without operator opt-in")+}+// ---------- Execute ----------// recordingExecSender captures Execute-side messages. The Execute path