Repository navigation
Conversation
…rges ILM expiry created delete markers and purged noncurrent versions without a delete replication decision: the S3 DELETE path evaluates the replication decision while deleting, but the scanner and lifecycle expiry paths never did. ILM-created deletions therefore carried no replication state, were skipped by the heal path (which only queues markers with a Pending/Failed status), and never reached replication targets or site-replication peers - versioned buckets with ILM rules silently diverged from their replicas. - evaluate the delete replication decision for ILM expiry deletes (scanner applyExpiryOnNonTransitionedObjects and transitioned-object expiry) and queue the resulting marker/purge replication, audited as replicate:ilm:delete - attach the pending version purge state to noncurrent versions removed by ILM so their purge replicates and converges like API purges Expiry of restored copies and DeleteAll (prefix) expiry stay local by design. Signed-off-by: Julien Laurenceau <[email protected]>
Review findings on the ILM delete replication change: - DeleteVersionAction also reaches applyExpiryOnNonTransitionedObjects from the decommission and heal paths via the expiry queue, not only through the scanner's bulk noncurrent expiry; the replication decision gate must cover it or those purges would skip replication. - the noncurrent purge test captured the version ID of the second upload, purging the latest version instead of the noncurrent one; capture the first upload's version ID. - the test replication pool helper left the replaced global pool in place after the test; restore the previous singleton. Signed-off-by: Julien Laurenceau <[email protected]>
Signed-off-by: Julien Laurenceau <[email protected]>
3 tasks
Member
|
Thank you for the patch and tests. This is not included in 20261018000000; keeping it open for next-cycle review. Before merge, we need to confirm the intended ILM replication policy and validate marker creation, noncurrent-version purges, Object Lock, retries/offline recovery, and concurrent expiry at multiple sites against current main. Passing CI alone does not settle those behavior changes. #217 remains a separate follow-up. |
6 of 12 tasks
This was referenced Oct 31, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
ILM-created deletions never replicated. When ILM expiry deleted an object on a versioned bucket with replication configured, the created delete marker (or the noncurrent version purge) carried no delete replication state:
DELETEpath evaluatescheckReplicateDeletewhile deleting (viaEvalMetadataFn) and queues replication when the decision says so;applyExpiryOnNonTransitionedObjects), transitioned-object expiry (expireTransitionedObject) and the noncurrent-version bulk path (deleteObjectVersions) never did any of that.Result: markers were persisted with an empty replication state and the heal path skipped them (
queueReplicationHealonly queues markers whose stored status isPending/Failed, and a queued delete with an empty state is a no-op becauseparseReplicateDecision("")yields no targets). Versioned buckets with ILM rules silently diverged from their replication targets and from site-replication peers: expired objects stayed alive on replicas and expired noncurrent versions were never purged there.Matches the item "ILM-created delete markers are excluded from replication" in the MinIO AIStor release notes; the defect is inherited from the common upstream base.
Changes
applyExpiryOnNonTransitionedObjects(scanner) andexpireTransitionedObject(transitioned/restored expiry) now evaluate the delete replication decision while deleting and queue the resulting marker/purge replication — exactly what the DELETE handler does for API-originated deletes. New audit eventreplicate:ilm:delete. The decision gate covers bothDeleteActionandDeleteVersionAction, since the decommission and heal paths also deliver noncurrent expiries through the expiry queue.ilmPurgeToDelete), so their removal is tombstoned with replication state, queued, and converges like API purges (including the Completed → version freed semantics).DeleteAll(prefix) expiry stay local by design.Testing
TestReplicateILMExpiryDeleteMarker: ILM expiry on a versioned bucket with a replication target creates a marker withPENDINGstate, queues areplicate:ilm:deletetask, replicates to the target and converges toCOMPLETED.TestReplicateILMExpiryNoncurrentPurge: noncurrent version removal carriesPENDINGpurge state, replicates the purge and frees the version on both sides.Notes
ReplicationStatusfor a completed delete marker can report empty (the upstreamgetInternalReplicationStatemaps the replication timestamp into the replica timestamp and the composite then returns the empty replica status). Display-only quirk, identical in upstream; tests assert the raw per-target state instead. Out of scope here.Signed-off-by: Julien Laurenceau [email protected]