diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go index d92bdc074..6da7e6091 100644 --- a/cmd/xl-storage.go +++ b/cmd/xl-storage.go @@ -1547,7 +1547,7 @@ func (s *xlStorage) ReadVersion(ctx context.Context, volume, path, versionID str } } - if !skipAccessChecks(volume) && !opts.Healing && fi.TransitionStatus == "" && !fi.InlineData() && len(fi.Data) == 0 && fi.DataDir != "" && fi.DataDir != emptyUUID { + if !skipAccessChecks(volume) && !opts.Healing && fi.TransitionStatus == "" && !fi.InlineData() && len(fi.Data) == 0 && fi.DataDir != "" && fi.DataDir != emptyUUID && fi.VersionPurgeStatus().Empty() { // Verify if the dataDir is present or not when the data // is not inlined to make sure we return correct errors // during HeadObject(). diff --git a/docs/site-replication/run-multi-site-ldap.sh b/docs/site-replication/run-multi-site-ldap.sh index e42e809b2..df1b84bd9 100755 --- a/docs/site-replication/run-multi-site-ldap.sh +++ b/docs/site-replication/run-multi-site-ldap.sh @@ -242,6 +242,19 @@ if [ "${expected_checksum}" != "${actual_checksum}" ]; then fi rm ./lrgfile +./mc rm -r --versions --force minio1/newbucket/lrgfile +if [ $? -ne 0 ]; then + echo "expected object to be present, exiting.." + exit_1 +fi + +sleep 5 +./mc stat minio1/newbucket/lrgfile +if [ $? -eq 0 ]; then + echo "expected object to be deleted permanently after replication, exiting.." + exit_1 +fi + vID=$(./mc stat minio2/newbucket/README.md --json | jq .versionID) if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." diff --git a/docs/site-replication/run-multi-site-minio-idp.sh b/docs/site-replication/run-multi-site-minio-idp.sh index d75d450ed..eccfeacf4 100755 --- a/docs/site-replication/run-multi-site-minio-idp.sh +++ b/docs/site-replication/run-multi-site-minio-idp.sh @@ -229,6 +229,19 @@ if [ "${expected_checksum}" != "${actual_checksum}" ]; then fi rm ./lrgfile +./mc rm -r --versions --force minio1/newbucket/lrgfile +if [ $? -ne 0 ]; then + echo "expected object to be present, exiting.." + exit_1 +fi + +sleep 5 +./mc stat minio1/newbucket/lrgfile +if [ $? -eq 0 ]; then + echo "expected object to be deleted permanently after replication, exiting.." + exit_1 +fi + vID=$(./mc stat minio2/newbucket/README.md --json | jq .versionID) if [ $? -ne 0 ]; then echo "expecting object to be present. exiting.." diff --git a/docs/site-replication/run-multi-site-oidc.sh b/docs/site-replication/run-multi-site-oidc.sh index 2e537a603..2add4695b 100755 --- a/docs/site-replication/run-multi-site-oidc.sh +++ b/docs/site-replication/run-multi-site-oidc.sh @@ -229,6 +229,19 @@ if [ "${expected_checksum}" != "${actual_checksum}" ]; then fi rm ./lrgfile +./mc rm -r --versions --force minio1/newbucket/lrgfile +if [ $? -ne 0 ]; then + echo "expected object to be present, exiting.." + exit_1 +fi + +sleep 5 +./mc stat minio1/newbucket/lrgfile +if [ $? -eq 0 ]; then + echo "expected object to be deleted permanently after replication, exiting.." + exit_1 +fi + ./mc mb --with-lock minio3/newbucket-olock sleep 5