Skip to content

Commit

Permalink
Removed start clean from the automation commands (#2005)
Browse files Browse the repository at this point in the history
* Removed start clean from the automation commands

* Fix for schema migration test

* Added a comment

* Kept start-clean in import data file
  • Loading branch information
shubham-yb authored Nov 28, 2024
1 parent 2715c27 commit 8731fc1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
6 changes: 0 additions & 6 deletions migtests/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ export_schema() {
--source-db-password ${SOURCE_DB_PASSWORD}
--source-db-name ${SOURCE_DB_NAME}
--send-diagnostics=false --yes
--start-clean t
"
if [ "${source_db_schema}" != "" ]
then
Expand Down Expand Up @@ -280,7 +279,6 @@ export_data() {
--disable-pb=true
--send-diagnostics=false
--yes
--start-clean 1
"
if [ "${TABLE_LIST}" != "" ]
then
Expand Down Expand Up @@ -371,7 +369,6 @@ import_schema() {
--target-db-name ${TARGET_DB_NAME}
--yes
--send-diagnostics=false
--start-clean 1
"

if [ "${SOURCE_DB_TYPE}" != "postgresql" ]
Expand All @@ -392,7 +389,6 @@ import_data() {
--target-db-name ${TARGET_DB_NAME}
--disable-pb true
--send-diagnostics=false
--start-clean 1
--truncate-splits true
--max-retries 1
"
Expand Down Expand Up @@ -436,7 +432,6 @@ import_data_to_source_replica() {
--source-replica-db-user ${SOURCE_REPLICA_DB_USER}
--source-replica-db-name ${SOURCE_REPLICA_DB_NAME}
--source-replica-db-password ${SOURCE_REPLICA_DB_PASSWORD}
--start-clean true
--disable-pb true
--send-diagnostics=false
--parallel-jobs 3
Expand Down Expand Up @@ -762,7 +757,6 @@ assess_migration() {
--source-db-password ${SOURCE_DB_PASSWORD}
--source-db-name ${SOURCE_DB_NAME}
--send-diagnostics=false --yes
--start-clean t
--iops-capture-interval 0
"
if [ "${SOURCE_DB_SCHEMA}" != "" ]
Expand Down
3 changes: 2 additions & 1 deletion migtests/scripts/run-schema-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ main() {
mv "${EXPORT_DIR}/schema/failed.sql" "${EXPORT_DIR}/schema/failed.sql.bak"
#replace_files
replace_files "${TEST_DIR}/replacement_dir" "${EXPORT_DIR}/schema"
import_schema
# --start-clean is required here since we are running the import command for the second time
import_schema --start-clean t

if [ -f "${EXPORT_DIR}/schema/failed.sql" ]
then
Expand Down
8 changes: 5 additions & 3 deletions migtests/tests/import-file/run-import-file-test
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ main() {

export TARGET_DB_SCHEMA='non_public'

# Kept --start-clean here to test the command for import data file. Can add proper validations for it once --truncate-tables is introduced here

step "Import data file: SMSA.txt -> smsa in a non-public schema"
import_data_file --data-dir ${TEST_DIR} --format text --delimiter '\t' \
--file-table-map "SMSA.txt:smsa" --start-clean true
--file-table-map "SMSA.txt:smsa" --start-clean true

#clean up the export dir as we will have public schema from this test which should be on fresh export-dir
rm -rf ${EXPORT_DIR}
Expand All @@ -53,7 +55,7 @@ main() {
#Default BATCH_SIZE_BYTES
step "Import data file: OneMRows.text -> one_m_rows"
import_data_file --data-dir ${TEST_DIR} --format text --delimiter '|' \
--file-table-map "OneMRows.text:one_m_rows" --start-clean true
--file-table-map "OneMRows.text:one_m_rows"


export MAX_BATCH_SIZE_BYTES=345643 #~300KB
Expand Down Expand Up @@ -276,7 +278,7 @@ main() {
if [ "${RUN_LARGE_IMPORT_DATA_FILE_TEST}" = true ] ; then

step "Run large sized import data file test"
import_data_file --data-dir "s3://yb-voyager-test-data" --delimiter "\t" --format "text" --file-table-map "accounts_350m_data.sql:accounts_large" --start-clean true --yes
import_data_file --data-dir "s3://yb-voyager-test-data" --delimiter "\t" --format "text" --file-table-map "accounts_350m_data.sql:accounts_large" --yes

fi

Expand Down

0 comments on commit 8731fc1

Please sign in to comment.