mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
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.
This commit is contained in:
parent
069d118329
commit
c0f2f84285
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user