feat: add noncurrent lifecycle engine - #1380
Conversation
Coverage Report for CI Build 34483126498Coverage increased (+0.2%) to 82.726%Details
Uncovered Changes
Coverage Regressions19 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - Coveralls |
a8c5eab to
4439d5e
Compare
There was a problem hiding this comment.
Beyond the inline finding, I also checked the unguarded pre-commit wakeTenant call in withLifecycleConfigurationTransaction (control-plane.ts) — since it runs before the transaction starts, a failure there just aborts the request with no side effects yet, unlike the post-commit call which is wrapped in try/catch because it runs after data is already committed. I also checked the new S3-backend startup validation that requires STORAGE_LIFECYCLE_CLAIM_LEASE_MS to exceed the S3 client timeout plus recovery grace when STORAGE_VERSIONING_ENABLED is on — this is an intentional safety gate against unsafe destructive-lifecycle configs on S3, not an accidental crash.
Extended reasoning...
One confirmed finding (the STORAGE_LIFECYCLE_ENABLED to STORAGE_VERSIONING_ENABLED rename with no back-compat alias) is already being posted inline, so this note only adds the ruled-out context. I re-read control-plane.ts and confirmed the pre-commit wakeTenant call is unguarded but runs before any transactional side effects occur, so a failure there is a clean abort rather than a partial-commit hazard — different in kind from the post-commit call, which is deliberately wrapped in try/catch because side effects are already committed by that point. I also read the config.ts validation block and confirmed the STORAGE_VERSIONING_ENABLED + S3 backend check is a deliberate startup guard (requiring a sane claim-lease/timeout relationship) rather than an unintended crash path.
Signed-off-by: Ferhat Elmas <elmas.ferhat@gmail.com>
4439d5e to
2472e7b
Compare
What kind of change does this PR introduce?
feature
What is the new behavior?
Adds shard schema, a deletion executor, and tighter lifecycle-config gates. Nothing in this process calls run(), so objects still do not expire.
• The API flag is STORAGE_VERSIONING_ENABLED, plus per-tenant objectVersioning.
• Tenant DBs get shard/journal tables and arm/commit SQL. Tests can expire supplied noncurrent versions on S3.
• PUT/DELETE run under a config deadline, restore the request abort signal, and wakeTenant in multitenant (no dispatcher consumes it).
• An armed journal blocks bucket delete.
• S3 HEAD can take a caller abort signal.
Additional context
Related to #1347