decom: avoid skipping single delete markers for replication (#20836)

It is possible delete marker was received on old pool as decom
move in progress, this PR allows decom retry to ensure these
delete markers are moved to new pool so that decommission can
be completed.

Fixes #20819
This commit is contained in:
Poorna 2025-01-14 11:53:02 -08:00 committed by GitHub
parent 00b2ef2932
commit 4952bdb770
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -845,7 +845,7 @@ func (z *erasureServerPools) decommissionPool(ctx context.Context, idx int, pool
// to decommission, just skip it, this also includes // to decommission, just skip it, this also includes
// any other versions that have already expired. // any other versions that have already expired.
remainingVersions := len(fivs.Versions) - expired remainingVersions := len(fivs.Versions) - expired
if version.Deleted && remainingVersions == 1 { if version.Deleted && remainingVersions == 1 && rcfg == nil {
decommissioned++ decommissioned++
stopFn(version.Size, errors.New("DELETE marked object with no other non-current versions will be skipped")) stopFn(version.Size, errors.New("DELETE marked object with no other non-current versions will be skipped"))
continue continue