From c0f2f84285502110e936b4acd9f5f291e8f7c02b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 24 Oct 2023 15:30:42 -0700 Subject: [PATCH] avoid racy replicationCount checks (#18311) resync status may not be upto-date by the time the resync is over due to how the timer is triggered. diff is sufficient to know if replication happened or not. --- .../replication/setup_2site_existing_replication.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/bucket/replication/setup_2site_existing_replication.sh b/docs/bucket/replication/setup_2site_existing_replication.sh index e4689b6fc..b07e976a9 100755 --- a/docs/bucket/replication/setup_2site_existing_replication.sh +++ b/docs/bucket/replication/setup_2site_existing_replication.sh @@ -86,8 +86,6 @@ sleep 1 ./mc replicate resync start sitea/bucket/ --remote-bucket "${remote_arn}" sleep 10s ## sleep for 10s idea is that we give 100ms per object. -count=$(./mc replicate resync status sitea/bucket --remote-bucket "${remote_arn}" --json | jq .resyncInfo.target[].replicationCount) - ./mc ls -r --versions sitea/bucket >/tmp/sitea.txt ./mc ls -r --versions siteb/bucket >/tmp/siteb.txt @@ -98,12 +96,6 @@ if [ $ret -ne 0 ]; then exit 1 fi -if [ $count -ne 12 ]; then - echo "resync not complete after 30s - unexpected failure" - ./mc diff sitea/bucket siteb/bucket - exit 1 -fi - ./mc cp /tmp/data/file_1.txt sitea/bucket/marker_new ./mc rm sitea/bucket/marker_new