Skip to content

Commit

Permalink
Test using adaptive parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Oct 16, 2024
1 parent 903c31a commit d79e931
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions migtests/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,27 @@ import_data_to_source_replica() {
}

import_data_file() {
yb-voyager import data file --export-dir ${EXPORT_DIR} \
--target-db-host ${TARGET_DB_HOST} \
--target-db-port ${TARGET_DB_PORT} \
--target-db-user ${TARGET_DB_USER} \
--target-db-password ${TARGET_DB_PASSWORD:-''} \
--target-db-schema ${TARGET_DB_SCHEMA:-''} \
--target-db-name ${TARGET_DB_NAME} \
--disable-pb true \
--send-diagnostics=false \
$* || {
cat ${EXPORT_DIR}/metainfo/dataFileDescriptor.json
exit 1
}
args="
--export-dir ${EXPORT_DIR}
--target-db-host ${TARGET_DB_HOST}
--target-db-port ${TARGET_DB_PORT}
--target-db-user ${TARGET_DB_USER}
--target-db-password ${TARGET_DB_PASSWORD:-''}
--target-db-schema ${TARGET_DB_SCHEMA:-''}
--target-db-name ${TARGET_DB_NAME}
--disable-pb true
--send-diagnostics=false
"

# Check if RUN_USING_ADAPTIVE_PARALLELISM is true
if [ "${RUN_USING_ADAPTIVE_PARALLELISM}" = "true" ]; then
args="${args} --enable-adaptive-parallelism true"
fi

yb-voyager import data file ${args} $*
}


archive_changes() {
ENABLE=$(shuf -i 0-1 -n 1)
echo "archive changes ENABLE=${ENABLE}"
Expand Down

0 comments on commit d79e931

Please sign in to comment.