-
Notifications
You must be signed in to change notification settings - Fork 5k
fix(tmq): modify the condition of checking vnode split finished #35273
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -82,12 +82,18 @@ def splitVgroups(self): | |
| tdSql.query(splitSql) | ||
|
|
||
| def checkSplitVgroups(self): | ||
| cnt = 0 | ||
| while True: | ||
| tdSql.query("select * from information_schema.ins_vnodes where db_name='dbt' and status='leader' and restored=true") | ||
| tdLog.info(tdSql.queryResult) | ||
| if tdSql.getRows() == 2: | ||
| cnt += 1 | ||
|
Comment on lines
86
to
+90
|
||
| else: | ||
| cnt = 0 | ||
| if cnt >= 10: | ||
|
Comment on lines
89
to
+93
|
||
| break | ||
| tdLog.info("wait vgroup split done...") | ||
| time.sleep(1) | ||
| time.sleep(2) | ||
| tdLog.info("splitSql ok") | ||
|
|
||
| def redistributeVgroups(self): | ||
|
|
||
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.
This loop logs
tdSql.queryResultat INFO on every poll; in this repo, raw queryResult dumps are typically logged at DEBUG to avoid noisy CI logs (seetest/new_test_framework/utils/clusterCommonCheck.pywheretdLog.debug(tdSql.queryResult)is used). Consider switching this totdLog.debug(...)and, since you only use the row count, queryingselect count(*)instead ofselect *to reduce output and query overhead.