diff --git a/src/storage/backup/integration_tests/common.sh b/src/storage/backup/integration_tests/common.sh index d296fb7c829d7..68f37e5d67249 100644 --- a/src/storage/backup/integration_tests/common.sh +++ b/src/storage/backup/integration_tests/common.sh @@ -173,17 +173,13 @@ function get_total_sst_count() { } function get_max_committed_epoch_in_backup() { - local id - id=$1 - sed_str="s/.*\"state_table_info\":{\"${id}\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\1/p" + sed_str="s/.*\"state_table_info\":{\"[[:digit:]]*\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\1/p" ${BACKUP_TEST_MCLI} -C "${BACKUP_TEST_MCLI_CONFIG}" \ cat "hummock-minio/hummock001/backup/manifest.json" | sed -n "${sed_str}" } function get_safe_epoch_in_backup() { - local id - id=$1 - sed_str="s/.*\"state_table_info\":{\"${id}\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\2/p" + sed_str="s/.*\"state_table_info\":{\"[[:digit:]]*\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\2/p" ${BACKUP_TEST_MCLI} -C "${BACKUP_TEST_MCLI_CONFIG}" \ cat "hummock-minio/hummock001/backup/manifest.json" | sed -n "${sed_str}" } diff --git a/src/storage/backup/integration_tests/test_query_backup.sh b/src/storage/backup/integration_tests/test_query_backup.sh index 6cc162ea84bc5..dbba68c7e8564 100644 --- a/src/storage/backup/integration_tests/test_query_backup.sh +++ b/src/storage/backup/integration_tests/test_query_backup.sh @@ -24,9 +24,8 @@ select * from t1; job_id=$(backup) echo "${job_id}" -table_id=1 -backup_mce=$(get_max_committed_epoch_in_backup "${table_id}") -backup_safe_epoch=$(get_safe_epoch_in_backup "${table_id}") +backup_mce=$(get_max_committed_epoch_in_backup) +backup_safe_epoch=$(get_safe_epoch_in_backup) echo "backup MCE: ${backup_mce}" echo "backup safe_epoch: ${backup_safe_epoch}"