Skip to content

Commit 8bfc4ee

Browse files
Matthew FisherMatthew Fisher
authored andcommitted
fix(contrib): allow 5 or 6 backups
If we're checking how many backups are available in the middle of a backup, we may end up with N+1 backups because the old one has not yet been deleted. This is an acceptable case, however the better fix would be to add checks in the integration tests to determine if a backup is occurring before checking the number of backups available.
1 parent f502600 commit 8bfc4ee

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

contrib/ci/test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ docker exec $PG_JOB is_running
7777
puts-step "checking if minio has 5 backups"
7878
BACKUPS="$(docker exec $MINIO_JOB ls /home/minio/dbwal/basebackups_005/ | grep json)"
7979
NUM_BACKUPS="$(docker exec $MINIO_JOB ls /home/minio/dbwal/basebackups_005/ | grep -c json)"
80-
if [[ ! "$NUM_BACKUPS" -eq "5" ]]; then
81-
puts-error "did not find 5 base backups, which is the default (found $NUM_BACKUPS)"
80+
# NOTE (bacongobbler): the BACKUP_FREQUENCY is only 1 second, so we could technically be checking
81+
# in the middle of a backup. Instead of failing, let's consider N+1 backups an acceptable case
82+
if [[ ! "$NUM_BACKUPS" -eq "5" && ! "$NUM_BACKUPS" -eq "6" ]]; then
83+
puts-error "did not find 5 or 6 base backups. 5 is the default, but 6 may exist if a backup is currently in progress (found $NUM_BACKUPS)"
8284
puts-error "$BACKUPS"
8385
exit 1
8486
fi

0 commit comments

Comments
 (0)