Skip to content

fix(pools): preserve ILM cleanup during migration - #276

Merged
Vonng merged 2 commits into
mainfrom
codex/fix-266-lifecycle-migration-integrity
Nov 2, 2026
Merged

Vonng merged 2 commits into
mainfrom
codex/fix-266-lifecycle-migration-integrity

Conversation

@Vonng

@Vonng Vonng commented Nov 2, 2026

Copy link
Copy Markdown
Member

This follow-up hardens the lifecycle-aware pool migration fix merged in #266.

Problem

#266 correctly distinguishes current-version expiration, version-only purge, and whole-object deletion, but the migration cleanup boundary still needed to preserve the contracts owned by normal ILM expiry:

  • a direct source purge could bypass delete replication;
  • tiered versions needed durable free-version cleanup when remote deletion failed;
  • a lifecycle configuration change between the walk and cleanup needed a fail-closed result;
  • DeleteAll actions needed an observable source-pool completion fence.

Changes

  • Run ILM-selected version deletes through the normal expiry path before source cleanup, including replication state and queued version purges.
  • Delete transitioned hot-tier metadata before remote tier deletion and preserve free-version retry records on remote failure.
  • Record the lifecycle configuration update time at the migration walk and refuse stale cleanup after a configuration change.
  • Apply whole-object expiry before retiring hot-tier source state and verify that source versions and free versions are gone before decommission completion.
  • Keep decommission and rebalance audit sources distinct.
  • Add regression coverage for delayed expiry, whole-object actions, lifecycle changes, ILM replication, and resumable decommission.

The original #266 commits remain in the merged history; this PR contains the maintainer follow-up only.

Validation:

  • go test ./cmd -count=1
  • go vet ./cmd
  • make build
  • git diff --check

@Vonng
Vonng merged commit 0fc5a0b into main Nov 2, 2026
8 checks passed
Vonng added a commit that referenced this pull request Nov 7, 2026
The migration follow-up for #265 (PR #276) made lifecycle-created
deletes replication-aware: the scanner, the expiry of a transitioned
version and the bulk noncurrent purge evaluated the delete replication
decision and queued a delete marker or a version purge for the targets.
That is the content of the still-open PR #240. It changes behavior for
every bucket whose replication rule replicates deletes or delete
markers, the mc default: a target with longer retention loses versions
on the source's schedule, and a purge keeps its space as a pending
tombstone until the target confirms. SILO, like S3, does not replicate
lifecycle deletes; an opt-in can come later. The release did not
replicate them.

Remove exactly the replication parts: the decision callbacks and the
post-delete scheduling in applyExpiryOnNonTransitionedObjects and
expireTransitionedObject, the scheduling in deleteObjectVersions, and
ilmPurgeToDelete; the scanner builds noncurrent entries as before. The
rest of #276 stays: the hot-tier delete before the remote one, the
free-version retry record, the lifecycle-change fence and the migration
completion checks. API deletes still replicate, and the replication heal
still handles persisted pending markers and purges. As in the release,
the replication heal also resyncs an empty-state marker when
existing-object replication applies to it.

The delete-all variant of the scheduling, which queued a task with an
empty decision, goes with it.

Tests: the scanner's noncurrent purge, run with replication configured,
deletes the version at once and queues nothing; an ILM marker carries
no replication state and the heal leaves it unless existing-object
replication applies, in which case it is resynced as before; an API
version delete still queues a purge. The cross-pool batch, dispatch and
decommission tests now assert no replication, and a decommission whose
expiry used to wait for the target completes in one run. Adding back the
scanner's decision makes the first two fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>

Vonng commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Post-20261026 resolution record.

Implemented: 0a546c7a7, 1bd0b1b04.

Recording the final disposition of this follow-up: its migration cleanup ordering, lifecycle-change fence, free-version retry ownership and completion checks remain. The later review removed the newly introduced ILM replication decisions and post-delete scheduling. That behavior had not been accepted from #240 and could apply a source's expiry schedule to a target intended to retain data longer.

Verification: TestILMNoncurrentPurgeNotReplicatedThroughScanner, TestILMExpiryDeleteMarkerNotReplicated, TestAPIVersionDeleteStillReplicated passed in the preserved 2026-11-08 validation at bb31c2618. This audit checked the pass records, log hashes and recorded exit codes.

Result: Lifecycle deletions are not newly scheduled for replication. API deletes and existing-object replication/healing retain their established behavior. This is not adoption of #240.

These changes are in public main. They are not part of the latest published server release, RELEASE.2026-10-26T00-00-00Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant