-
Notifications
You must be signed in to change notification settings - Fork 313
syncer(dm): load dump schemas from object storage (#12846) #12849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
02fd941
08212f4
3dfcf98
7bcb9f5
f8a4d09
ef37698
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| use `s3_dumpling_lightning1`; | ||
| insert into t1 (id, name) values (15, '15'), (16, '16'); | ||
| insert into t1 (id, name) values (17, '17'), (18, '18'); | ||
| insert into t1 (id, name) values (17, '17'), (18, 'name-18'); | ||
| insert into t11 (id, name) values (115, '115'), (116, '116'); | ||
| insert into t11 (id, name) values (117, '117'), (118, '118'); | ||
| insert into t11 (id, name) values (117, '117'), (118, '118'); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| create database `s3_dumpling_lightning`; | ||
| use `s3_dumpling_lightning`; | ||
| -- Keep the same columns as the upstream tables, but reverse their physical | ||
| -- order to verify that Syncer uses the Dumpling schema for row events. | ||
| create table t (name varchar(20), id int, primary key(`id`)); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -559,6 +559,7 @@ function DM_COMPACT_CASE() { | |
| run_sql_source1 "delete from ${shardddl1}.${tb1} where a=$((i + 100))" | ||
| run_sql_source1 "insert into ${shardddl1}.${tb1}(a,b) values($i,$i)" | ||
| done | ||
| run_sql_tidb_with_retry_times "select count(1) from ${shardddl}.${tb};" "count(1): 100" 120 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win Guard bounded retries against When 🤖 Prompt for AI Agents |
||
| check_sync_diff $WORK_DIR $cur/conf/diff_config.toml 30 | ||
| compactCnt=$(cat $WORK_DIR/worker1/log/dm-worker.log $WORK_DIR/worker2/log/dm-worker.log | grep "finish to compact" | wc -l) | ||
| if [[ "$compactCnt" -le 100 ]]; then | ||
|
|
@@ -677,7 +678,7 @@ function DM_MULTIPLE_ROWS_CASE() { | |
| ($((i + 5)),$((i + 5))),($((i + 6)),$((i + 6))),($((i + 7)),$((i + 7))),($((i + 8)),$((i + 8))),($((i + 9)),$((i + 9)))" | ||
| done | ||
|
|
||
| run_sql_tidb_with_retry "select count(1) from ${shardddl}.${tb} where a>100 and a<=200;" "count(1): 100" | ||
| run_sql_tidb_with_retry_times "select count(1) from ${shardddl}.${tb} where a>100 and a<=200;" "count(1): 100" 60 | ||
| check_sync_diff $WORK_DIR $cur/conf/diff_config.toml 30 | ||
| insertMergeCnt=$(cat $WORK_DIR/worker1/log/dm-worker.log $WORK_DIR/worker2/log/dm-worker.log | grep '\[op=DMLInsert\]' | wc -l) | ||
| replaceMergeCnt=$(cat $WORK_DIR/worker1/log/dm-worker.log $WORK_DIR/worker2/log/dm-worker.log | grep '\[op=DMLReplace\]' | wc -l) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Quote the SQL fixture path.
On Line 120, Bash splits and expands
$cur/data/downstream.prepare.sqlwhen the checkout path contains whitespace or glob characters.run_sql_filethen receives invalid arguments and the integration case fails.Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 Shellcheck (0.11.0)
[info] 120-120: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 120-120: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 120-120: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 120-120: Double quote to prevent globbing and word splitting.
(SC2086)
🤖 Prompt for AI Agents
Source: Linters/SAST tools