From 9d2f1a2f4b9855bf438db929dc98d24321307207 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sun, 14 Jul 2024 17:40:55 +0800 Subject: [PATCH 01/45] test: test ci --- Jenkinsfile2 | 2 +- tests/parallel_test/cases.task | 2942 ++++++++++++++++---------------- 2 files changed, 1472 insertions(+), 1472 deletions(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 7df465ab2a..5e71ed39d5 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -401,7 +401,7 @@ pipeline { } } stage('linux test') { - agent{label " slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_52 || slave1_59 || slave1_63 || worker03 || slave215 || slave217 || slave219 "} + agent{label "slave1_52 | slave217 || slave219 "} options { skipDefaultCheckout() } when { changeRequest() diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 4338187791..34289a27dc 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -1,668 +1,668 @@ -#Column Define -#caseID,rerunTimes,Run with Sanitizer,casePath,caseCommand -#NA,NA,y or n,script,./test.sh -f tsim/user/basic.sim +# #Column Define +# #caseID,rerunTimes,Run with Sanitizer,casePath,caseCommand +# #NA,NA,y or n,script,./test.sh -f tsim/user/basic.sim -#unit-test +# #unit-test -,,n,unit-test,bash test.sh +# ,,n,unit-test,bash test.sh -# -# army-test -# -,,y,army,./pytest.sh python3 ./test.py -f multi-level/mlevel_basic.py -N 3 -L 3 -D 2 -,,y,army,./pytest.sh python3 ./test.py -f db-encrypt/basic.py -,,n,army,python3 ./test.py -f s3/s3Basic.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f cluster/snapshot.py -N 3 -L 3 -D 2 -,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py -,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py -,,y,army,./pytest.sh python3 ./test.py -f query/test_compare.py -,,y,army,./pytest.sh python3 ./test.py -f insert/test_column_tag_boundary.py -,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_desc.py -N 3 -L 3 -D 2 -,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_null.py -,,y,army,./pytest.sh python3 ./test.py -f cluster/incSnapshot.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f query/query_basic.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f query/accuracy/test_query_accuracy.py -,,y,army,./pytest.sh python3 ./test.py -f insert/insert_basic.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f cluster/splitVgroupByLearner.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f authorith/authBasic.py -N 3 -,,n,army,python3 ./test.py -f cmdline/fullopt.py -,,n,army,python3 ./test.py -f query/show.py -N 3 -,,n,army,python3 ./test.py -f alter/alterConfig.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f query/subquery/subqueryBugs.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f storage/oneStageComp.py -N 3 -L 3 -D 1 -,,y,army,./pytest.sh python3 ./test.py -f storage/compressBasic.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f grant/grantBugs.py -N 3 -,,y,army,./pytest.sh python3 ./test.py -f query/queryBugs.py -N 3 +# # +# # army-test +# # +# ,,y,army,./pytest.sh python3 ./test.py -f multi-level/mlevel_basic.py -N 3 -L 3 -D 2 +# ,,y,army,./pytest.sh python3 ./test.py -f db-encrypt/basic.py +# ,,n,army,python3 ./test.py -f s3/s3Basic.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f cluster/snapshot.py -N 3 -L 3 -D 2 +# ,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py +# ,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py +# ,,y,army,./pytest.sh python3 ./test.py -f query/test_compare.py +# ,,y,army,./pytest.sh python3 ./test.py -f insert/test_column_tag_boundary.py +# ,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_desc.py -N 3 -L 3 -D 2 +# ,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_null.py +# ,,y,army,./pytest.sh python3 ./test.py -f cluster/incSnapshot.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f query/query_basic.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f query/accuracy/test_query_accuracy.py +# ,,y,army,./pytest.sh python3 ./test.py -f insert/insert_basic.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f cluster/splitVgroupByLearner.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f authorith/authBasic.py -N 3 +# ,,n,army,python3 ./test.py -f cmdline/fullopt.py +# ,,n,army,python3 ./test.py -f query/show.py -N 3 +# ,,n,army,python3 ./test.py -f alter/alterConfig.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f query/subquery/subqueryBugs.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f storage/oneStageComp.py -N 3 -L 3 -D 1 +# ,,y,army,./pytest.sh python3 ./test.py -f storage/compressBasic.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f grant/grantBugs.py -N 3 +# ,,y,army,./pytest.sh python3 ./test.py -f query/queryBugs.py -N 3 -# -# system test -# -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_multi_agg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_basic.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/scalar_function.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_session.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_state_window.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_state_window.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_session.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval_ext.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval_ext.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session_ext.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/partition_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/pause_resume_test.py -#,,n,system-test,python3 ./test.py -f 8-stream/vnode_restart.py -N 4 -#,,n,system-test,python3 ./test.py -f 8-stream/snode_restart.py -N 4 -,,n,system-test,python3 ./test.py -f 8-stream/snode_restart_with_checkpoint.py -N 4 +# # +# # system test +# # +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_multi_agg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_basic.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/scalar_function.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_session.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_state_window.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_state_window.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_session.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval_ext.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval_ext.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session_ext.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/partition_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/pause_resume_test.py +# #,,n,system-test,python3 ./test.py -f 8-stream/vnode_restart.py -N 4 +# #,,n,system-test,python3 ./test.py -f 8-stream/snode_restart.py -N 4 +# ,,n,system-test,python3 ./test.py -f 8-stream/snode_restart_with_checkpoint.py -N 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_error.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_varchar.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func_group.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_expr.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/project_group.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname_vgroup.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/compact-col.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tms_memleak.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb3.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/ins_topics_test.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxTopic.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqClientConsLog.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxGroupIds.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumeDiscontinuousData.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqOffset.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_primary_key.py -,,n,system-test,python3 ./test.py -f 7-tmq/tmqDropConsumer.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_error.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_varchar.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func_group.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_expr.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/project_group.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname_vgroup.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/compact-col.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tms_memleak.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb0.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb3.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/ins_topics_test.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxTopic.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqClientConsLog.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxGroupIds.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumeDiscontinuousData.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqOffset.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_primary_key.py +# ,,n,system-test,python3 ./test.py -f 7-tmq/tmqDropConsumer.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_stb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_stable.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stt_blocks_check.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_stb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_stable.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stt_blocks_check.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False -,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False -,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreMnode.py -N 5 -M 3 -i False -,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreQnode.py -N 5 -M 3 -i False +# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False +# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False +# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreMnode.py -N 5 -M 3 -i False +# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreQnode.py -N 5 -M 3 -i False -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb4.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb4.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilterWhere.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py -#,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py -,,n,system-test,python3 ./test.py -f 7-tmq/tmqConsumerGroup.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAlterSchema.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-multiCtb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_ts4563.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_replay.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSeekAndCommit.py -,,n,system-test,python3 ./test.py -f 7-tmq/tmq_offset.py -,,n,system-test,python3 ./test.py -f 7-tmq/tmqDataPrecisionUnit.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/raw_block_interface_test.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -i True -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 -i True -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db-removewal.py -N 2 -n 1 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb-removewal.py -N 6 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 2 -n 1 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 6 -n 3 -#,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db.py -N 6 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 2 -n 1 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata-false.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-false.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-false.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column-false.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db-false.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb4.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb4.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilterWhere.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py +# #,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py +# ,,n,system-test,python3 ./test.py -f 7-tmq/tmqConsumerGroup.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAlterSchema.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-1ctb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-multiCtb.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_ts4563.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_replay.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSeekAndCommit.py +# ,,n,system-test,python3 ./test.py -f 7-tmq/tmq_offset.py +# ,,n,system-test,python3 ./test.py -f 7-tmq/tmqDataPrecisionUnit.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/raw_block_interface_test.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -i True +# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 -i True +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db-removewal.py -N 2 -n 1 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb-removewal.py -N 6 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 2 -n 1 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 6 -n 3 +# #,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db.py -N 6 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 2 -n 1 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata-false.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-false.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-false.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column-false.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db-false.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeReplicate.py -M 3 -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3404.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3581.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3311.py -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3821.py +# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeReplicate.py -M 3 -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3404.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3581.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3311.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3821.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/telemetry.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/backquote_check.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosdMonitor.py -,,n,system-test,python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 -,,n,system-test,python3 ./test.py -f 0-others/udfTest.py -,,n,system-test,python3 ./test.py -f 0-others/udf_create.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_restart_taosd.py -,,n,system-test,python3 ./test.py -f 0-others/udf_cfg1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_cfg2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/cachemodel.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sysinfo.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_control.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_manage.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_show.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_all.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/fsync.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/multilevel.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttl.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttlChangeOnWrite.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/view/non_marterial_view/test_view.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_show_table_distributed.py -,,n,system-test,python3 ./test.py -f 0-others/compatibility.py -,,n,system-test,python3 ./test.py -f 0-others/tag_index_basic.py -,,n,system-test,python3 ./test.py -f 0-others/udfpy_main.py -,,n,system-test,python3 ./test.py -N 3 -f 0-others/walRetention.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 1 -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 1 -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 3 -,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/empty_identifier.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/telemetry.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/backquote_check.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosdMonitor.py +# ,,n,system-test,python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 +# ,,n,system-test,python3 ./test.py -f 0-others/udfTest.py +# ,,n,system-test,python3 ./test.py -f 0-others/udf_create.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_restart_taosd.py +# ,,n,system-test,python3 ./test.py -f 0-others/udf_cfg1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_cfg2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/cachemodel.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sysinfo.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_control.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_manage.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_show.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_all.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/fsync.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/multilevel.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttl.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttlChangeOnWrite.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/view/non_marterial_view/test_view.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_show_table_distributed.py +# ,,n,system-test,python3 ./test.py -f 0-others/compatibility.py +# ,,n,system-test,python3 ./test.py -f 0-others/tag_index_basic.py +# ,,n,system-test,python3 ./test.py -f 0-others/udfpy_main.py +# ,,n,system-test,python3 ./test.py -N 3 -f 0-others/walRetention.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 1 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 1 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 3 +# ,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/empty_identifier.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_create.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_insert.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_delete.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_replica.py -N 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_table.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/boundary.py -,,n,system-test,python3 ./test.py -f 1-insert/insertWithMoreVgroup.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_comment.py -#,,n,system-test,python3 ./test.py -f 1-insert/time_range_wise.py -#,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/block_wise.py -#,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/create_retentions.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/mutil_stage.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data_muti_rows.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/db_tb_name_check.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/InsertFuturets.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_wide_column.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_column_value.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_benchmark.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionUS.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionNS.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4219.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/ts-4272.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4295.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td27388.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4479.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29793.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_timestamp.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29157.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show_tag_index.py -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/information_schema.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -N 3 -n 3 -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/limit.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/orderBy.py -N 5 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaBasic.py -N 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sma_index.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml_TS-3724.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml-TD19291.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varbinary.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/tb_100w_data_order.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_childtable.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_normaltable.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_systable.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/keep_expired.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stmt_error.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py -,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py -N 3 -M 3 -i False -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/systable_func.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4382.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4403.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_td28163.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tagFilter.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts_3405_3398_3423.py -N 3 -n 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4348-td-27939.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/backslash_g.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4467.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/geometry.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_create.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_insert.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_delete.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_replica.py -N 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_table.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/boundary.py +# ,,n,system-test,python3 ./test.py -f 1-insert/insertWithMoreVgroup.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_comment.py +# #,,n,system-test,python3 ./test.py -f 1-insert/time_range_wise.py +# #,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/block_wise.py +# #,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/create_retentions.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/mutil_stage.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data_muti_rows.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/db_tb_name_check.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/InsertFuturets.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_wide_column.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_column_value.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_benchmark.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionUS.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionNS.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4219.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/ts-4272.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4295.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td27388.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4479.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29793.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_timestamp.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29157.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show_tag_index.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/information_schema.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -N 3 -n 3 -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/limit.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/orderBy.py -N 5 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaBasic.py -N 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sma_index.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml_TS-3724.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml-TD19291.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varbinary.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/tb_100w_data_order.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_childtable.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_normaltable.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_systable.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/keep_expired.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stmt_error.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py -N 3 -M 3 -i False -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/systable_func.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4382.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4403.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_td28163.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tagFilter.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts_3405_3398_3423.py -N 3 -n 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4348-td-27939.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/backslash_g.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4467.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/geometry.py +# ,,n,system-test,python3 ./test.py -f 2-query/queryQnode.py -,,n,system-test,python3 ./test.py -f 2-query/queryQnode.py ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode1mnode.py ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeStop.py -N 5 -M 3 @@ -676,7 +676,6 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 -n 3 - ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 6 -M 3 @@ -703,830 +702,831 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py -N 4 -M 1 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py -N 4 -M 1 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py -N 4 -M 1 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 4 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 4 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 4 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill_with_group.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/state_window.py -Q 3 -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 -,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py -,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insertMix.py -N 3 -,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/stt.py -N 3 -,,n,system-test,python3 ./test.py -f eco-system/meta/database/keep_time_offset.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 2 -#tsim test -,,y,script,./test.sh -f tsim/query/timeline.sim -,,y,script,./test.sh -f tsim/join/join.sim -,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim -,,y,script,./test.sh -f tsim/parser/where.sim -,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim -,,y,script,./test.sh -f tsim/parser/limit1.sim -,,y,script,./test.sh -f tsim/parser/union.sim -,,y,script,./test.sh -f tsim/parser/commit.sim -,,y,script,./test.sh -f tsim/parser/nestquery.sim -,,n,script,./test.sh -f tsim/valgrind/checkError7.sim -,,y,script,./test.sh -f tsim/parser/groupby.sim -,,y,script,./test.sh -f tsim/parser/sliding.sim -,,y,script,./test.sh -f tsim/dnode/balance2.sim -,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim -,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim -#,,y,script,./test.sh -f tsim/trans/create_db.sim -,,y,script,./test.sh -f tsim/dnode/balance3.sim -,,y,script,./test.sh -f tsim/vnode/replica3_many.sim -,,y,script,./test.sh -f tsim/stable/metrics_idx.sim -# ,,y,script,./test.sh -f tsim/db/alter_replica_13.sim -,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim -,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim -,,n,script,./test.sh -f tsim/valgrind/checkError6.sim +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 4 +# #,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 4 +# #,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 4 +# #,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -R +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill_with_group.py +# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/state_window.py -Q 3 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 +# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py +# ,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insertMix.py -N 3 +# ,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/stt.py -N 3 +# ,,n,system-test,python3 ./test.py -f eco-system/meta/database/keep_time_offset.py -,,y,script,./test.sh -f tsim/user/basic.sim -,,y,script,./test.sh -f tsim/user/password.sim -,,y,script,./test.sh -f tsim/user/whitelist.sim -,,y,script,./test.sh -f tsim/user/privilege_db.sim -,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim -,,y,script,./test.sh -f tsim/user/privilege_topic.sim -,,y,script,./test.sh -f tsim/user/privilege_table.sim -,,y,script,./test.sh -f tsim/user/privilege_create_db.sim -,,y,script,./test.sh -f tsim/db/alter_option.sim -# ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim -,,y,script,./test.sh -f tsim/db/basic1.sim -,,y,script,./test.sh -f tsim/db/basic2.sim -,,y,script,./test.sh -f tsim/db/basic3.sim -,,y,script,./test.sh -f tsim/db/basic4.sim -,,y,script,./test.sh -f tsim/db/basic5.sim -,,y,script,./test.sh -f tsim/db/basic6.sim -,,y,script,./test.sh -f tsim/db/commit.sim -,,y,script,./test.sh -f tsim/db/create_all_options.sim -,,y,script,./test.sh -f tsim/db/delete_reuse1.sim -,,y,script,./test.sh -f tsim/db/delete_reuse2.sim -,,y,script,./test.sh -f tsim/db/delete_reusevnode.sim -,,y,script,./test.sh -f tsim/db/delete_reusevnode2.sim -,,y,script,./test.sh -f tsim/db/delete_writing1.sim -,,y,script,./test.sh -f tsim/db/delete_writing2.sim -,,y,script,./test.sh -f tsim/db/error1.sim -,,y,script,./test.sh -f tsim/db/keep.sim -,,y,script,./test.sh -f tsim/db/len.sim -,,y,script,./test.sh -f tsim/db/repeat.sim -,,y,script,./test.sh -f tsim/db/show_create_db.sim -,,y,script,./test.sh -f tsim/db/show_create_table.sim -,,y,script,./test.sh -f tsim/db/tables.sim -,,y,script,./test.sh -f tsim/db/taosdlog.sim -,,y,script,./test.sh -f tsim/db/table_prefix_suffix.sim -,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim -,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim -,,y,script,./test.sh -f tsim/dnode/balance1.sim -,,y,script,./test.sh -f tsim/dnode/balancex.sim -,,y,script,./test.sh -f tsim/dnode/create_dnode.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim -,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim -,,y,script,./test.sh -f tsim/dnode/offline_reason.sim -,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim -,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim -,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim -,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim -,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim -,,y,script,./test.sh -f tsim/import/basic.sim -,,y,script,./test.sh -f tsim/import/commit.sim -,,y,script,./test.sh -f tsim/import/large.sim -,,y,script,./test.sh -f tsim/import/replica1.sim -,,y,script,./test.sh -f tsim/insert/backquote.sim -,,y,script,./test.sh -f tsim/insert/basic.sim -,,y,script,./test.sh -f tsim/insert/basic0.sim -,,y,script,./test.sh -f tsim/insert/basic1.sim -,,y,script,./test.sh -f tsim/insert/basic2.sim -,,y,script,./test.sh -f tsim/insert/commit-merge0.sim -,,y,script,./test.sh -f tsim/insert/insert_drop.sim -,,y,script,./test.sh -f tsim/insert/insert_select.sim -,,y,script,./test.sh -f tsim/insert/null.sim -,,y,script,./test.sh -f tsim/insert/query_block1_file.sim -,,y,script,./test.sh -f tsim/insert/query_block1_memory.sim -,,y,script,./test.sh -f tsim/insert/query_block2_file.sim -,,y,script,./test.sh -f tsim/insert/query_block2_memory.sim -,,y,script,./test.sh -f tsim/insert/query_file_memory.sim -,,y,script,./test.sh -f tsim/insert/query_multi_file.sim -,,y,script,./test.sh -f tsim/insert/tcp.sim -,,y,script,./test.sh -f tsim/insert/update0.sim -,,y,script,./test.sh -f tsim/insert/delete0.sim -,,y,script,./test.sh -f tsim/insert/update1_sort_merge.sim -,,y,script,./test.sh -f tsim/insert/update2.sim -,,y,script,./test.sh -f tsim/insert/insert_stb.sim -,,y,script,./test.sh -f tsim/parser/alter__for_community_version.sim -,,y,script,./test.sh -f tsim/parser/alter_column.sim -,,y,script,./test.sh -f tsim/parser/alter_stable.sim -,,y,script,./test.sh -f tsim/parser/alter.sim -,,y,script,./test.sh -f tsim/parser/alter1.sim -,,y,script,./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim -,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim -,,y,script,./test.sh -f tsim/parser/between_and.sim -,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim -,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim -,,y,script,./test.sh -f tsim/parser/columnValue_double.sim -,,y,script,./test.sh -f tsim/parser/columnValue_float.sim -,,y,script,./test.sh -f tsim/parser/columnValue_int.sim -,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim -,,y,script,./test.sh -f tsim/parser/columnValue_uint.sim -,,y,script,./test.sh -f tsim/parser/columnValue_timestamp.sim -,,y,script,./test.sh -f tsim/parser/columnValue_varchar.sim -,,y,script,./test.sh -f tsim/parser/columnValue_nchar.sim -,,y,script,./test.sh -f tsim/parser/columnValue_varbinary.sim -,,y,script,./test.sh -f tsim/parser/columnValue_json.sim -,,y,script,./test.sh -f tsim/parser/columnValue_geometry.sim -,,y,script,./test.sh -f tsim/parser/condition.sim -,,y,script,./test.sh -f tsim/parser/condition_scl.sim -,,y,script,./test.sh -f tsim/parser/constCol.sim -,,y,script,./test.sh -f tsim/parser/create_db.sim -,,y,script,./test.sh -f tsim/parser/create_mt.sim -,,y,script,./test.sh -f tsim/parser/create_tb_with_tag_name.sim -,,y,script,./test.sh -f tsim/parser/create_tb.sim -,,y,script,./test.sh -f tsim/parser/dbtbnameValidate.sim -,,y,script,./test.sh -f tsim/parser/distinct.sim -,,y,script,./test.sh -f tsim/parser/fill_us.sim -,,y,script,./test.sh -f tsim/parser/fill.sim -,,y,script,./test.sh -f tsim/parser/first_last.sim -,,y,script,./test.sh -f tsim/parser/fill_stb.sim -,,y,script,./test.sh -f tsim/parser/interp.sim -,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim -,,y,script,./test.sh -f tsim/parser/function.sim -,,y,script,./test.sh -f tsim/parser/groupby-basic.sim -,,y,script,./test.sh -f tsim/parser/having_child.sim -,,y,script,./test.sh -f tsim/parser/having.sim -,,y,script,./test.sh -f tsim/parser/import_commit1.sim -,,y,script,./test.sh -f tsim/parser/import_commit2.sim -,,y,script,./test.sh -f tsim/parser/import_commit3.sim -,,y,script,./test.sh -f tsim/parser/import_file.sim -,,y,script,./test.sh -f tsim/parser/import.sim -,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim -,,y,script,./test.sh -f tsim/parser/insert_tb.sim -,,y,script,./test.sh -f tsim/parser/join_multitables.sim -,,y,script,./test.sh -f tsim/parser/join_multivnode.sim -,,y,script,./test.sh -f tsim/parser/join.sim -,,y,script,./test.sh -f tsim/parser/last_cache.sim -,,y,script,./test.sh -f tsim/parser/last_both.sim -,,y,script,./test.sh -f tsim/parser/last_groupby.sim -,,y,script,./test.sh -f tsim/parser/lastrow.sim -,,y,script,./test.sh -f tsim/parser/lastrow2.sim -,,y,script,./test.sh -f tsim/parser/like.sim -,,y,script,./test.sh -f tsim/parser/limit.sim -,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim -,,y,script,./test.sh -f tsim/parser/nchar.sim -,,y,script,./test.sh -f tsim/parser/null_char.sim -,,y,script,./test.sh -f tsim/parser/precision_ns.sim -,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim -,,y,script,./test.sh -f tsim/parser/regex.sim -,,y,script,./test.sh -f tsim/parser/regressiontest.sim -,,y,script,./test.sh -f tsim/parser/select_across_vnodes.sim -,,y,script,./test.sh -f tsim/parser/select_distinct_tag.sim -,,y,script,./test.sh -f tsim/parser/select_from_cache_disk.sim -,,y,script,./test.sh -f tsim/parser/select_with_tags.sim -,,y,script,./test.sh -f tsim/parser/selectResNum.sim -,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim -,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim -,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim -,,y,script,./test.sh -f tsim/parser/slimit.sim -,,y,script,./test.sh -f tsim/parser/slimit1.sim -,,y,script,./test.sh -f tsim/parser/stableOp.sim -,,y,script,./test.sh -f tsim/parser/tags_dynamically_specifiy.sim -,,y,script,./test.sh -f tsim/parser/tags_filter.sim -,,y,script,./test.sh -f tsim/parser/tbnameIn.sim -,,y,script,./test.sh -f tsim/parser/timestamp.sim -,,y,script,./test.sh -f tsim/parser/top_groupby.sim -,,y,script,./test.sh -f tsim/parser/topbot.sim -,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim -,,y,script,./test.sh -f tsim/parser/slimit_limit.sim -,,y,script,./test.sh -f tsim/parser/table_merge_limit.sim -,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim -,,y,script,./test.sh -f tsim/query/charScalarFunction.sim -,,y,script,./test.sh -f tsim/query/explain.sim -,,y,script,./test.sh -f tsim/query/interval-offset.sim -,,y,script,./test.sh -f tsim/query/interval.sim -,,y,script,./test.sh -f tsim/query/scalarFunction.sim -,,y,script,./test.sh -f tsim/query/scalarNull.sim -,,y,script,./test.sh -f tsim/query/session.sim -,,y,script,./test.sh -f tsim/query/udf.sim -,,n,script,./test.sh -f tsim/query/udfpy.sim -,,y,script,./test.sh -f tsim/query/udf_with_const.sim -,,y,script,./test.sh -f tsim/query/join_interval.sim -,,y,script,./test.sh -f tsim/query/join_pk.sim -,,y,script,./test.sh -f tsim/query/join_order.sim -,,y,script,./test.sh -f tsim/query/count_spread.sim -,,y,script,./test.sh -f tsim/query/unionall_as_table.sim -,,y,script,./test.sh -f tsim/query/multi_order_by.sim -,,y,script,./test.sh -f tsim/query/sys_tbname.sim -,,y,script,./test.sh -f tsim/query/sort-pre-cols.sim -,,y,script,./test.sh -f tsim/query/groupby.sim -,,y,script,./test.sh -f tsim/query/groupby_distinct.sim -,,y,script,./test.sh -f tsim/query/event.sim -,,y,script,./test.sh -f tsim/query/forceFill.sim -,,y,script,./test.sh -f tsim/query/emptyTsRange.sim -,,y,script,./test.sh -f tsim/query/emptyTsRange_scl.sim -,,y,script,./test.sh -f tsim/query/partitionby.sim -,,y,script,./test.sh -f tsim/query/tableCount.sim -,,y,script,./test.sh -f tsim/query/show_db_table_kind.sim -,,y,script,./test.sh -f tsim/query/bi_star_table.sim -,,y,script,./test.sh -f tsim/query/bi_tag_scan.sim -,,y,script,./test.sh -f tsim/query/bi_tbname_col.sim -,,y,script,./test.sh -f tsim/query/tag_scan.sim -,,y,script,./test.sh -f tsim/query/nullColSma.sim -,,y,script,./test.sh -f tsim/query/bug3398.sim -,,y,script,./test.sh -f tsim/query/explain_tsorder.sim -,,y,script,./test.sh -f tsim/query/apercentile.sim -,,y,script,./test.sh -f tsim/query/query_count0.sim -,,y,script,./test.sh -f tsim/query/query_count_sliding0.sim -,,y,script,./test.sh -f tsim/query/union_precision.sim -,,y,script,./test.sh -f tsim/qnode/basic1.sim -,,y,script,./test.sh -f tsim/snode/basic1.sim -,,y,script,./test.sh -f tsim/mnode/basic1.sim -,,y,script,./test.sh -f tsim/mnode/basic2.sim -,,y,script,./test.sh -f tsim/mnode/basic3.sim -,,y,script,./test.sh -f tsim/mnode/basic4.sim -,,y,script,./test.sh -f tsim/mnode/basic5.sim -,,y,script,./test.sh -f tsim/show/basic.sim -,,y,script,./test.sh -f tsim/table/autocreate.sim -,,y,script,./test.sh -f tsim/table/basic1.sim -,,y,script,./test.sh -f tsim/table/basic2.sim -,,y,script,./test.sh -f tsim/table/basic3.sim -,,y,script,./test.sh -f tsim/table/bigint.sim -,,y,script,./test.sh -f tsim/table/binary.sim -,,y,script,./test.sh -f tsim/table/bool.sim -,,y,script,./test.sh -f tsim/table/column_name.sim -,,y,script,./test.sh -f tsim/table/column_num.sim -,,y,script,./test.sh -f tsim/table/column_value.sim -,,y,script,./test.sh -f tsim/table/column2.sim -,,y,script,./test.sh -f tsim/table/createmulti.sim -,,y,script,./test.sh -f tsim/table/date.sim -,,y,script,./test.sh -f tsim/table/db.table.sim -,,y,script,./test.sh -f tsim/table/delete_reuse1.sim -,,y,script,./test.sh -f tsim/table/delete_reuse2.sim -,,y,script,./test.sh -f tsim/table/delete_writing.sim -,,y,script,./test.sh -f tsim/table/describe.sim -,,y,script,./test.sh -f tsim/table/double.sim -,,y,script,./test.sh -f tsim/table/float.sim -,,y,script,./test.sh -f tsim/table/hash.sim -,,y,script,./test.sh -f tsim/table/int.sim -,,y,script,./test.sh -f tsim/table/limit.sim -,,y,script,./test.sh -f tsim/table/smallint.sim -,,y,script,./test.sh -f tsim/table/table_len.sim -,,y,script,./test.sh -f tsim/table/table.sim -,,y,script,./test.sh -f tsim/table/tinyint.sim -,,y,script,./test.sh -f tsim/table/vgroup.sim -,,n,script,./test.sh -f tsim/stream/basic0.sim -g -,,y,script,./test.sh -f tsim/stream/basic1.sim -,,y,script,./test.sh -f tsim/stream/basic2.sim -,,y,script,./test.sh -f tsim/stream/basic3.sim -,,y,script,./test.sh -f tsim/stream/basic4.sim -,,y,script,./test.sh -f tsim/stream/checkpointInterval0.sim -,,y,script,./test.sh -f tsim/stream/checkStreamSTable1.sim -,,y,script,./test.sh -f tsim/stream/checkStreamSTable.sim -,,y,script,./test.sh -f tsim/stream/count0.sim -,,y,script,./test.sh -f tsim/stream/count1.sim -,,y,script,./test.sh -f tsim/stream/count2.sim -,,y,script,./test.sh -f tsim/stream/count3.sim -,,y,script,./test.sh -f tsim/stream/countSliding0.sim -,,y,script,./test.sh -f tsim/stream/countSliding1.sim -,,y,script,./test.sh -f tsim/stream/countSliding2.sim -,,y,script,./test.sh -f tsim/stream/deleteInterval.sim -,,y,script,./test.sh -f tsim/stream/deleteScalar.sim -,,y,script,./test.sh -f tsim/stream/deleteSession.sim -,,y,script,./test.sh -f tsim/stream/deleteState.sim -,,y,script,./test.sh -f tsim/stream/distributeInterval0.sim -,,y,script,./test.sh -f tsim/stream/distributeIntervalRetrive0.sim -,,y,script,./test.sh -f tsim/stream/distributeMultiLevelInterval0.sim -,,y,script,./test.sh -f tsim/stream/distributeSession0.sim -,,y,script,./test.sh -f tsim/stream/drop_stream.sim -,,y,script,./test.sh -f tsim/stream/event0.sim -,,y,script,./test.sh -f tsim/stream/event1.sim -,,y,script,./test.sh -f tsim/stream/event2.sim -,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim -,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim -,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalDelete0.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalDelete1.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalLinear.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalPartitionBy.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext1.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalRange.sim -,,y,script,./test.sh -f tsim/stream/fillIntervalValue.sim -,,y,script,./test.sh -f tsim/stream/ignoreCheckUpdate.sim -,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim -,,y,script,./test.sh -f tsim/stream/partitionby1.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnOther.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim -,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim -,,y,script,./test.sh -f tsim/stream/partitionby.sim -,,y,script,./test.sh -f tsim/stream/pauseAndResume.sim -,,y,script,./test.sh -f tsim/stream/schedSnode.sim -,,y,script,./test.sh -f tsim/stream/session0.sim -,,y,script,./test.sh -f tsim/stream/session1.sim -,,y,script,./test.sh -f tsim/stream/sliding.sim -,,y,script,./test.sh -f tsim/stream/state0.sim -,,y,script,./test.sh -f tsim/stream/state1.sim -,,y,script,./test.sh -f tsim/stream/streamPrimaryKey0.sim -,,y,script,./test.sh -f tsim/stream/streamPrimaryKey1.sim -,,y,script,./test.sh -f tsim/stream/streamPrimaryKey2.sim -,,y,script,./test.sh -f tsim/stream/streamPrimaryKey3.sim -,,y,script,./test.sh -f tsim/stream/triggerInterval0.sim -,,y,script,./test.sh -f tsim/stream/triggerSession0.sim -,,y,script,./test.sh -f tsim/stream/udTableAndCol0.sim -,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim -,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim -,,y,script,./test.sh -f tsim/stream/udTableAndTag2.sim -,,y,script,./test.sh -f tsim/stream/windowClose.sim -,,y,script,./test.sh -f tsim/trans/lossdata1.sim -,,y,script,./test.sh -f tsim/tmq/basic1.sim -,,y,script,./test.sh -f tsim/tmq/basic2.sim -,,y,script,./test.sh -f tsim/tmq/basic3.sim -,,y,script,./test.sh -f tsim/tmq/basic4.sim -,,y,script,./test.sh -f tsim/tmq/basic1Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim -,,y,script,./test.sh -f tsim/tmq/topic.sim -,,y,script,./test.sh -f tsim/tmq/snapshot.sim -,,y,script,./test.sh -f tsim/tmq/snapshot1.sim -,,y,script,./test.sh -f tsim/stable/alter_comment.sim -,,y,script,./test.sh -f tsim/stable/alter_count.sim -,,y,script,./test.sh -f tsim/stable/alter_import.sim -,,y,script,./test.sh -f tsim/stable/alter_insert1.sim -,,y,script,./test.sh -f tsim/stable/alter_insert2.sim -,,y,script,./test.sh -f tsim/stable/alter_metrics.sim -,,y,script,./test.sh -f tsim/stable/column_add.sim -,,y,script,./test.sh -f tsim/stable/column_drop.sim -,,y,script,./test.sh -f tsim/stable/column_modify.sim -,,y,script,./test.sh -f tsim/stable/disk.sim -,,y,script,./test.sh -f tsim/stable/dnode3.sim -,,y,script,./test.sh -f tsim/stable/metrics.sim -,,y,script,./test.sh -f tsim/stable/refcount.sim -,,y,script,./test.sh -f tsim/stable/tag_add.sim -,,y,script,./test.sh -f tsim/stable/tag_drop.sim -,,y,script,./test.sh -f tsim/stable/tag_filter.sim -,,y,script,./test.sh -f tsim/stable/tag_modify.sim -,,y,script,./test.sh -f tsim/stable/tag_rename.sim -,,y,script,./test.sh -f tsim/stable/values.sim -,,y,script,./test.sh -f tsim/stable/vnode3.sim -,,n,script,./test.sh -f tsim/sma/drop_sma.sim -,,y,script,./test.sh -f tsim/sma/sma_leak.sim -,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim -,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim -,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQueryDelete.sim +# #tsim test +# ,,y,script,./test.sh -f tsim/query/timeline.sim +# ,,y,script,./test.sh -f tsim/join/join.sim +# ,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim +# ,,y,script,./test.sh -f tsim/parser/where.sim +# ,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim +# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim +# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim +# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim +# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim +# ,,y,script,./test.sh -f tsim/parser/limit1.sim +# ,,y,script,./test.sh -f tsim/parser/union.sim +# ,,y,script,./test.sh -f tsim/parser/commit.sim +# ,,y,script,./test.sh -f tsim/parser/nestquery.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError7.sim +# ,,y,script,./test.sh -f tsim/parser/groupby.sim +# ,,y,script,./test.sh -f tsim/parser/sliding.sim +# ,,y,script,./test.sh -f tsim/dnode/balance2.sim +# ,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim +# ,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim +# #,,y,script,./test.sh -f tsim/trans/create_db.sim +# ,,y,script,./test.sh -f tsim/dnode/balance3.sim +# ,,y,script,./test.sh -f tsim/vnode/replica3_many.sim +# ,,y,script,./test.sh -f tsim/stable/metrics_idx.sim +# # ,,y,script,./test.sh -f tsim/db/alter_replica_13.sim +# ,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim +# ,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError6.sim -### refactor stream backend, open case after rsma refactored -#,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim -,,y,script,./test.sh -f tsim/sync/vnodesnapshot-rsma-test.sim -,,n,script,./test.sh -f tsim/valgrind/checkError1.sim -,,n,script,./test.sh -f tsim/valgrind/checkError2.sim -,,n,script,./test.sh -f tsim/valgrind/checkError3.sim -,,n,script,./test.sh -f tsim/valgrind/checkError4.sim -,,n,script,./test.sh -f tsim/valgrind/checkError5.sim -,,n,script,./test.sh -f tsim/valgrind/checkError8.sim -,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim -,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim -,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim -,,y,script,./test.sh -f tsim/vnode/replica3_import.sim -,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim -,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim -,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim -,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim -,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim -,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim -,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim -,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim -,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim -,,y,script,./test.sh -f tsim/scalar/in.sim -,,y,script,./test.sh -f tsim/scalar/scalar.sim -,,y,script,./test.sh -f tsim/scalar/filter.sim -,,y,script,./test.sh -f tsim/scalar/caseWhen.sim -,,y,script,./test.sh -f tsim/scalar/tsConvert.sim -,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim -,,y,script,./test.sh -f tsim/alter/dnode.sim -,,y,script,./test.sh -f tsim/alter/table.sim -,,y,script,./test.sh -f tsim/cache/new_metrics.sim -,,y,script,./test.sh -f tsim/cache/restart_table.sim -,,y,script,./test.sh -f tsim/cache/restart_metrics.sim -,,y,script,./test.sh -f tsim/column/commit.sim -,,y,script,./test.sh -f tsim/column/metrics.sim -,,y,script,./test.sh -f tsim/column/table.sim -,,y,script,./test.sh -f tsim/compress/commitlog.sim -,,y,script,./test.sh -f tsim/compress/compress2.sim -,,y,script,./test.sh -f tsim/compress/compress.sim -,,y,script,./test.sh -f tsim/compress/compress_col.sim -,,y,script,./test.sh -f tsim/compress/uncompress.sim -,,y,script,./test.sh -f tsim/compute/avg.sim -,,y,script,./test.sh -f tsim/compute/block_dist.sim -,,y,script,./test.sh -f tsim/compute/bottom.sim -,,y,script,./test.sh -f tsim/compute/count.sim -,,y,script,./test.sh -f tsim/compute/diff.sim -,,y,script,./test.sh -f tsim/compute/diff2.sim -,,y,script,./test.sh -f tsim/compute/first.sim -,,y,script,./test.sh -f tsim/compute/interval.sim -,,y,script,./test.sh -f tsim/compute/last_row.sim -,,y,script,./test.sh -f tsim/compute/last.sim -,,y,script,./test.sh -f tsim/compute/leastsquare.sim -,,y,script,./test.sh -f tsim/compute/max.sim -,,y,script,./test.sh -f tsim/compute/min.sim -,,y,script,./test.sh -f tsim/compute/null.sim -,,y,script,./test.sh -f tsim/compute/percentile.sim -,,y,script,./test.sh -f tsim/compute/stddev.sim -,,y,script,./test.sh -f tsim/compute/sum.sim -,,y,script,./test.sh -f tsim/compute/top.sim -,,y,script,./test.sh -f tsim/field/2.sim -,,y,script,./test.sh -f tsim/field/3.sim -,,y,script,./test.sh -f tsim/field/4.sim -,,y,script,./test.sh -f tsim/field/5.sim -,,y,script,./test.sh -f tsim/field/6.sim -,,y,script,./test.sh -f tsim/field/binary.sim -,,y,script,./test.sh -f tsim/field/bigint.sim -,,y,script,./test.sh -f tsim/field/bool.sim -,,y,script,./test.sh -f tsim/field/double.sim -,,y,script,./test.sh -f tsim/field/float.sim -,,y,script,./test.sh -f tsim/field/int.sim -,,y,script,./test.sh -f tsim/field/single.sim -,,y,script,./test.sh -f tsim/field/smallint.sim -,,y,script,./test.sh -f tsim/field/tinyint.sim -,,y,script,./test.sh -f tsim/field/unsigined_bigint.sim -,,y,script,./test.sh -f tsim/vector/metrics_field.sim -,,y,script,./test.sh -f tsim/vector/metrics_mix.sim -,,y,script,./test.sh -f tsim/vector/metrics_query.sim -,,y,script,./test.sh -f tsim/vector/metrics_tag.sim -,,y,script,./test.sh -f tsim/vector/metrics_time.sim -,,y,script,./test.sh -f tsim/vector/multi.sim -,,y,script,./test.sh -f tsim/vector/single.sim -,,y,script,./test.sh -f tsim/vector/table_field.sim -,,y,script,./test.sh -f tsim/vector/table_mix.sim -,,y,script,./test.sh -f tsim/vector/table_query.sim -,,y,script,./test.sh -f tsim/vector/table_time.sim -,,y,script,./test.sh -f tsim/wal/kill.sim -,,y,script,./test.sh -f tsim/tag/3.sim -,,y,script,./test.sh -f tsim/tag/4.sim -,,y,script,./test.sh -f tsim/tag/5.sim -,,y,script,./test.sh -f tsim/tag/6.sim -,,y,script,./test.sh -f tsim/tag/add.sim -,,y,script,./test.sh -f tsim/tag/bigint.sim -,,y,script,./test.sh -f tsim/tag/binary_binary.sim -,,y,script,./test.sh -f tsim/tag/binary.sim -,,y,script,./test.sh -f tsim/tag/bool_binary.sim -,,y,script,./test.sh -f tsim/tag/bool_int.sim -,,y,script,./test.sh -f tsim/tag/bool.sim -,,y,script,./test.sh -f tsim/tag/change.sim -,,y,script,./test.sh -f tsim/tag/column.sim -,,y,script,./test.sh -f tsim/tag/commit.sim -,,y,script,./test.sh -f tsim/tag/create.sim -,,y,script,./test.sh -f tsim/tag/delete.sim -,,y,script,./test.sh -f tsim/tag/double.sim -,,y,script,./test.sh -f tsim/tag/filter.sim -,,y,script,./test.sh -f tsim/tag/float.sim -,,y,script,./test.sh -f tsim/tag/int_binary.sim -,,y,script,./test.sh -f tsim/tag/int_float.sim -,,y,script,./test.sh -f tsim/tag/int.sim -,,y,script,./test.sh -f tsim/tag/set.sim -,,y,script,./test.sh -f tsim/tag/smallint.sim -,,y,script,./test.sh -f tsim/tag/tinyint.sim -,,y,script,./test.sh -f tsim/tag/drop_tag.sim -,,y,script,./test.sh -f tsim/tag/tbNameIn.sim -,,y,script,./test.sh -f tmp/monitor.sim -,,y,script,./test.sh -f tsim/tagindex/add_index.sim -,,n,script,./test.sh -f tsim/tagindex/sma_and_tag_index.sim -,,y,script,./test.sh -f tsim/tagindex/indexOverflow.sim -,,y,script,./test.sh -f tsim/view/view.sim -,,y,script,./test.sh -f tsim/query/cache_last.sim -,,y,script,./test.sh -f tsim/query/const.sim -,,y,script,./test.sh -f tsim/query/nestedJoinView.sim +# ,,y,script,./test.sh -f tsim/user/basic.sim +# ,,y,script,./test.sh -f tsim/user/password.sim +# ,,y,script,./test.sh -f tsim/user/whitelist.sim +# ,,y,script,./test.sh -f tsim/user/privilege_db.sim +# ,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim +# ,,y,script,./test.sh -f tsim/user/privilege_topic.sim +# ,,y,script,./test.sh -f tsim/user/privilege_table.sim +# ,,y,script,./test.sh -f tsim/user/privilege_create_db.sim +# ,,y,script,./test.sh -f tsim/db/alter_option.sim +# # ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim +# ,,y,script,./test.sh -f tsim/db/basic1.sim +# ,,y,script,./test.sh -f tsim/db/basic2.sim +# ,,y,script,./test.sh -f tsim/db/basic3.sim +# ,,y,script,./test.sh -f tsim/db/basic4.sim +# ,,y,script,./test.sh -f tsim/db/basic5.sim +# ,,y,script,./test.sh -f tsim/db/basic6.sim +# ,,y,script,./test.sh -f tsim/db/commit.sim +# ,,y,script,./test.sh -f tsim/db/create_all_options.sim +# ,,y,script,./test.sh -f tsim/db/delete_reuse1.sim +# ,,y,script,./test.sh -f tsim/db/delete_reuse2.sim +# ,,y,script,./test.sh -f tsim/db/delete_reusevnode.sim +# ,,y,script,./test.sh -f tsim/db/delete_reusevnode2.sim +# ,,y,script,./test.sh -f tsim/db/delete_writing1.sim +# ,,y,script,./test.sh -f tsim/db/delete_writing2.sim +# ,,y,script,./test.sh -f tsim/db/error1.sim +# ,,y,script,./test.sh -f tsim/db/keep.sim +# ,,y,script,./test.sh -f tsim/db/len.sim +# ,,y,script,./test.sh -f tsim/db/repeat.sim +# ,,y,script,./test.sh -f tsim/db/show_create_db.sim +# ,,y,script,./test.sh -f tsim/db/show_create_table.sim +# ,,y,script,./test.sh -f tsim/db/tables.sim +# ,,y,script,./test.sh -f tsim/db/taosdlog.sim +# ,,y,script,./test.sh -f tsim/db/table_prefix_suffix.sim +# ,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim +# ,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim +# ,,y,script,./test.sh -f tsim/dnode/balance1.sim +# ,,y,script,./test.sh -f tsim/dnode/balancex.sim +# ,,y,script,./test.sh -f tsim/dnode/create_dnode.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim +# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim +# ,,y,script,./test.sh -f tsim/dnode/offline_reason.sim +# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim +# ,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim +# ,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim +# ,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim +# ,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim +# ,,y,script,./test.sh -f tsim/import/basic.sim +# ,,y,script,./test.sh -f tsim/import/commit.sim +# ,,y,script,./test.sh -f tsim/import/large.sim +# ,,y,script,./test.sh -f tsim/import/replica1.sim +# ,,y,script,./test.sh -f tsim/insert/backquote.sim +# ,,y,script,./test.sh -f tsim/insert/basic.sim +# ,,y,script,./test.sh -f tsim/insert/basic0.sim +# ,,y,script,./test.sh -f tsim/insert/basic1.sim +# ,,y,script,./test.sh -f tsim/insert/basic2.sim +# ,,y,script,./test.sh -f tsim/insert/commit-merge0.sim +# ,,y,script,./test.sh -f tsim/insert/insert_drop.sim +# ,,y,script,./test.sh -f tsim/insert/insert_select.sim +# ,,y,script,./test.sh -f tsim/insert/null.sim +# ,,y,script,./test.sh -f tsim/insert/query_block1_file.sim +# ,,y,script,./test.sh -f tsim/insert/query_block1_memory.sim +# ,,y,script,./test.sh -f tsim/insert/query_block2_file.sim +# ,,y,script,./test.sh -f tsim/insert/query_block2_memory.sim +# ,,y,script,./test.sh -f tsim/insert/query_file_memory.sim +# ,,y,script,./test.sh -f tsim/insert/query_multi_file.sim +# ,,y,script,./test.sh -f tsim/insert/tcp.sim +# ,,y,script,./test.sh -f tsim/insert/update0.sim +# ,,y,script,./test.sh -f tsim/insert/delete0.sim +# ,,y,script,./test.sh -f tsim/insert/update1_sort_merge.sim +# ,,y,script,./test.sh -f tsim/insert/update2.sim +# ,,y,script,./test.sh -f tsim/insert/insert_stb.sim +# ,,y,script,./test.sh -f tsim/parser/alter__for_community_version.sim +# ,,y,script,./test.sh -f tsim/parser/alter_column.sim +# ,,y,script,./test.sh -f tsim/parser/alter_stable.sim +# ,,y,script,./test.sh -f tsim/parser/alter.sim +# ,,y,script,./test.sh -f tsim/parser/alter1.sim +# ,,y,script,./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim +# ,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim +# ,,y,script,./test.sh -f tsim/parser/between_and.sim +# ,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_double.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_float.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_int.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_uint.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_timestamp.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_varchar.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_nchar.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_varbinary.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_json.sim +# ,,y,script,./test.sh -f tsim/parser/columnValue_geometry.sim +# ,,y,script,./test.sh -f tsim/parser/condition.sim +# ,,y,script,./test.sh -f tsim/parser/condition_scl.sim +# ,,y,script,./test.sh -f tsim/parser/constCol.sim +# ,,y,script,./test.sh -f tsim/parser/create_db.sim +# ,,y,script,./test.sh -f tsim/parser/create_mt.sim +# ,,y,script,./test.sh -f tsim/parser/create_tb_with_tag_name.sim +# ,,y,script,./test.sh -f tsim/parser/create_tb.sim +# ,,y,script,./test.sh -f tsim/parser/dbtbnameValidate.sim +# ,,y,script,./test.sh -f tsim/parser/distinct.sim +# ,,y,script,./test.sh -f tsim/parser/fill_us.sim +# ,,y,script,./test.sh -f tsim/parser/fill.sim +# ,,y,script,./test.sh -f tsim/parser/first_last.sim +# ,,y,script,./test.sh -f tsim/parser/fill_stb.sim +# ,,y,script,./test.sh -f tsim/parser/interp.sim +# ,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim +# ,,y,script,./test.sh -f tsim/parser/function.sim +# ,,y,script,./test.sh -f tsim/parser/groupby-basic.sim +# ,,y,script,./test.sh -f tsim/parser/having_child.sim +# ,,y,script,./test.sh -f tsim/parser/having.sim +# ,,y,script,./test.sh -f tsim/parser/import_commit1.sim +# ,,y,script,./test.sh -f tsim/parser/import_commit2.sim +# ,,y,script,./test.sh -f tsim/parser/import_commit3.sim +# ,,y,script,./test.sh -f tsim/parser/import_file.sim +# ,,y,script,./test.sh -f tsim/parser/import.sim +# ,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim +# ,,y,script,./test.sh -f tsim/parser/insert_tb.sim +# ,,y,script,./test.sh -f tsim/parser/join_multitables.sim +# ,,y,script,./test.sh -f tsim/parser/join_multivnode.sim +# ,,y,script,./test.sh -f tsim/parser/join.sim +# ,,y,script,./test.sh -f tsim/parser/last_cache.sim +# ,,y,script,./test.sh -f tsim/parser/last_both.sim +# ,,y,script,./test.sh -f tsim/parser/last_groupby.sim +# ,,y,script,./test.sh -f tsim/parser/lastrow.sim +# ,,y,script,./test.sh -f tsim/parser/lastrow2.sim +# ,,y,script,./test.sh -f tsim/parser/like.sim +# ,,y,script,./test.sh -f tsim/parser/limit.sim +# ,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim +# ,,y,script,./test.sh -f tsim/parser/nchar.sim +# ,,y,script,./test.sh -f tsim/parser/null_char.sim +# ,,y,script,./test.sh -f tsim/parser/precision_ns.sim +# ,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim +# ,,y,script,./test.sh -f tsim/parser/regex.sim +# ,,y,script,./test.sh -f tsim/parser/regressiontest.sim +# ,,y,script,./test.sh -f tsim/parser/select_across_vnodes.sim +# ,,y,script,./test.sh -f tsim/parser/select_distinct_tag.sim +# ,,y,script,./test.sh -f tsim/parser/select_from_cache_disk.sim +# ,,y,script,./test.sh -f tsim/parser/select_with_tags.sim +# ,,y,script,./test.sh -f tsim/parser/selectResNum.sim +# ,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim +# ,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim +# ,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim +# ,,y,script,./test.sh -f tsim/parser/slimit.sim +# ,,y,script,./test.sh -f tsim/parser/slimit1.sim +# ,,y,script,./test.sh -f tsim/parser/stableOp.sim +# ,,y,script,./test.sh -f tsim/parser/tags_dynamically_specifiy.sim +# ,,y,script,./test.sh -f tsim/parser/tags_filter.sim +# ,,y,script,./test.sh -f tsim/parser/tbnameIn.sim +# ,,y,script,./test.sh -f tsim/parser/timestamp.sim +# ,,y,script,./test.sh -f tsim/parser/top_groupby.sim +# ,,y,script,./test.sh -f tsim/parser/topbot.sim +# ,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim +# ,,y,script,./test.sh -f tsim/parser/slimit_limit.sim +# ,,y,script,./test.sh -f tsim/parser/table_merge_limit.sim +# ,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim +# ,,y,script,./test.sh -f tsim/query/charScalarFunction.sim +# ,,y,script,./test.sh -f tsim/query/explain.sim +# ,,y,script,./test.sh -f tsim/query/interval-offset.sim +# ,,y,script,./test.sh -f tsim/query/interval.sim +# ,,y,script,./test.sh -f tsim/query/scalarFunction.sim +# ,,y,script,./test.sh -f tsim/query/scalarNull.sim +# ,,y,script,./test.sh -f tsim/query/session.sim +# ,,y,script,./test.sh -f tsim/query/udf.sim +# ,,n,script,./test.sh -f tsim/query/udfpy.sim +# ,,y,script,./test.sh -f tsim/query/udf_with_const.sim +# ,,y,script,./test.sh -f tsim/query/join_interval.sim +# ,,y,script,./test.sh -f tsim/query/join_pk.sim +# ,,y,script,./test.sh -f tsim/query/join_order.sim +# ,,y,script,./test.sh -f tsim/query/count_spread.sim +# ,,y,script,./test.sh -f tsim/query/unionall_as_table.sim +# ,,y,script,./test.sh -f tsim/query/multi_order_by.sim +# ,,y,script,./test.sh -f tsim/query/sys_tbname.sim +# ,,y,script,./test.sh -f tsim/query/sort-pre-cols.sim +# ,,y,script,./test.sh -f tsim/query/groupby.sim +# ,,y,script,./test.sh -f tsim/query/groupby_distinct.sim +# ,,y,script,./test.sh -f tsim/query/event.sim +# ,,y,script,./test.sh -f tsim/query/forceFill.sim +# ,,y,script,./test.sh -f tsim/query/emptyTsRange.sim +# ,,y,script,./test.sh -f tsim/query/emptyTsRange_scl.sim +# ,,y,script,./test.sh -f tsim/query/partitionby.sim +# ,,y,script,./test.sh -f tsim/query/tableCount.sim +# ,,y,script,./test.sh -f tsim/query/show_db_table_kind.sim +# ,,y,script,./test.sh -f tsim/query/bi_star_table.sim +# ,,y,script,./test.sh -f tsim/query/bi_tag_scan.sim +# ,,y,script,./test.sh -f tsim/query/bi_tbname_col.sim +# ,,y,script,./test.sh -f tsim/query/tag_scan.sim +# ,,y,script,./test.sh -f tsim/query/nullColSma.sim +# ,,y,script,./test.sh -f tsim/query/bug3398.sim +# ,,y,script,./test.sh -f tsim/query/explain_tsorder.sim +# ,,y,script,./test.sh -f tsim/query/apercentile.sim +# ,,y,script,./test.sh -f tsim/query/query_count0.sim +# ,,y,script,./test.sh -f tsim/query/query_count_sliding0.sim +# ,,y,script,./test.sh -f tsim/query/union_precision.sim +# ,,y,script,./test.sh -f tsim/qnode/basic1.sim +# ,,y,script,./test.sh -f tsim/snode/basic1.sim +# ,,y,script,./test.sh -f tsim/mnode/basic1.sim +# ,,y,script,./test.sh -f tsim/mnode/basic2.sim +# ,,y,script,./test.sh -f tsim/mnode/basic3.sim +# ,,y,script,./test.sh -f tsim/mnode/basic4.sim +# ,,y,script,./test.sh -f tsim/mnode/basic5.sim +# ,,y,script,./test.sh -f tsim/show/basic.sim +# ,,y,script,./test.sh -f tsim/table/autocreate.sim +# ,,y,script,./test.sh -f tsim/table/basic1.sim +# ,,y,script,./test.sh -f tsim/table/basic2.sim +# ,,y,script,./test.sh -f tsim/table/basic3.sim +# ,,y,script,./test.sh -f tsim/table/bigint.sim +# ,,y,script,./test.sh -f tsim/table/binary.sim +# ,,y,script,./test.sh -f tsim/table/bool.sim +# ,,y,script,./test.sh -f tsim/table/column_name.sim +# ,,y,script,./test.sh -f tsim/table/column_num.sim +# ,,y,script,./test.sh -f tsim/table/column_value.sim +# ,,y,script,./test.sh -f tsim/table/column2.sim +# ,,y,script,./test.sh -f tsim/table/createmulti.sim +# ,,y,script,./test.sh -f tsim/table/date.sim +# ,,y,script,./test.sh -f tsim/table/db.table.sim +# ,,y,script,./test.sh -f tsim/table/delete_reuse1.sim +# ,,y,script,./test.sh -f tsim/table/delete_reuse2.sim +# ,,y,script,./test.sh -f tsim/table/delete_writing.sim +# ,,y,script,./test.sh -f tsim/table/describe.sim +# ,,y,script,./test.sh -f tsim/table/double.sim +# ,,y,script,./test.sh -f tsim/table/float.sim +# ,,y,script,./test.sh -f tsim/table/hash.sim +# ,,y,script,./test.sh -f tsim/table/int.sim +# ,,y,script,./test.sh -f tsim/table/limit.sim +# ,,y,script,./test.sh -f tsim/table/smallint.sim +# ,,y,script,./test.sh -f tsim/table/table_len.sim +# ,,y,script,./test.sh -f tsim/table/table.sim +# ,,y,script,./test.sh -f tsim/table/tinyint.sim +# ,,y,script,./test.sh -f tsim/table/vgroup.sim +# ,,n,script,./test.sh -f tsim/stream/basic0.sim -g +# ,,y,script,./test.sh -f tsim/stream/basic1.sim +# ,,y,script,./test.sh -f tsim/stream/basic2.sim +# ,,y,script,./test.sh -f tsim/stream/basic3.sim +# ,,y,script,./test.sh -f tsim/stream/basic4.sim +# ,,y,script,./test.sh -f tsim/stream/checkpointInterval0.sim +# ,,y,script,./test.sh -f tsim/stream/checkStreamSTable1.sim +# ,,y,script,./test.sh -f tsim/stream/checkStreamSTable.sim +# ,,y,script,./test.sh -f tsim/stream/count0.sim +# ,,y,script,./test.sh -f tsim/stream/count1.sim +# ,,y,script,./test.sh -f tsim/stream/count2.sim +# ,,y,script,./test.sh -f tsim/stream/count3.sim +# ,,y,script,./test.sh -f tsim/stream/countSliding0.sim +# ,,y,script,./test.sh -f tsim/stream/countSliding1.sim +# ,,y,script,./test.sh -f tsim/stream/countSliding2.sim +# ,,y,script,./test.sh -f tsim/stream/deleteInterval.sim +# ,,y,script,./test.sh -f tsim/stream/deleteScalar.sim +# ,,y,script,./test.sh -f tsim/stream/deleteSession.sim +# ,,y,script,./test.sh -f tsim/stream/deleteState.sim +# ,,y,script,./test.sh -f tsim/stream/distributeInterval0.sim +# ,,y,script,./test.sh -f tsim/stream/distributeIntervalRetrive0.sim +# ,,y,script,./test.sh -f tsim/stream/distributeMultiLevelInterval0.sim +# ,,y,script,./test.sh -f tsim/stream/distributeSession0.sim +# ,,y,script,./test.sh -f tsim/stream/drop_stream.sim +# ,,y,script,./test.sh -f tsim/stream/event0.sim +# ,,y,script,./test.sh -f tsim/stream/event1.sim +# ,,y,script,./test.sh -f tsim/stream/event2.sim +# ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim +# ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim +# ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalDelete0.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalDelete1.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalLinear.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalPartitionBy.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext1.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalRange.sim +# ,,y,script,./test.sh -f tsim/stream/fillIntervalValue.sim +# ,,y,script,./test.sh -f tsim/stream/ignoreCheckUpdate.sim +# ,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim +# ,,y,script,./test.sh -f tsim/stream/partitionby1.sim +# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim +# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnOther.sim +# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim +# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim +# ,,y,script,./test.sh -f tsim/stream/partitionby.sim +# ,,y,script,./test.sh -f tsim/stream/pauseAndResume.sim +# ,,y,script,./test.sh -f tsim/stream/schedSnode.sim +# ,,y,script,./test.sh -f tsim/stream/session0.sim +# ,,y,script,./test.sh -f tsim/stream/session1.sim +# ,,y,script,./test.sh -f tsim/stream/sliding.sim +# ,,y,script,./test.sh -f tsim/stream/state0.sim +# ,,y,script,./test.sh -f tsim/stream/state1.sim +# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey0.sim +# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey1.sim +# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey2.sim +# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey3.sim +# ,,y,script,./test.sh -f tsim/stream/triggerInterval0.sim +# ,,y,script,./test.sh -f tsim/stream/triggerSession0.sim +# ,,y,script,./test.sh -f tsim/stream/udTableAndCol0.sim +# ,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim +# ,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim +# ,,y,script,./test.sh -f tsim/stream/udTableAndTag2.sim +# ,,y,script,./test.sh -f tsim/stream/windowClose.sim +# ,,y,script,./test.sh -f tsim/trans/lossdata1.sim +# ,,y,script,./test.sh -f tsim/tmq/basic1.sim +# ,,y,script,./test.sh -f tsim/tmq/basic2.sim +# ,,y,script,./test.sh -f tsim/tmq/basic3.sim +# ,,y,script,./test.sh -f tsim/tmq/basic4.sim +# ,,y,script,./test.sh -f tsim/tmq/basic1Of2Cons.sim +# ,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim +# ,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim +# ,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim +# ,,y,script,./test.sh -f tsim/tmq/topic.sim +# ,,y,script,./test.sh -f tsim/tmq/snapshot.sim +# ,,y,script,./test.sh -f tsim/tmq/snapshot1.sim +# ,,y,script,./test.sh -f tsim/stable/alter_comment.sim +# ,,y,script,./test.sh -f tsim/stable/alter_count.sim +# ,,y,script,./test.sh -f tsim/stable/alter_import.sim +# ,,y,script,./test.sh -f tsim/stable/alter_insert1.sim +# ,,y,script,./test.sh -f tsim/stable/alter_insert2.sim +# ,,y,script,./test.sh -f tsim/stable/alter_metrics.sim +# ,,y,script,./test.sh -f tsim/stable/column_add.sim +# ,,y,script,./test.sh -f tsim/stable/column_drop.sim +# ,,y,script,./test.sh -f tsim/stable/column_modify.sim +# ,,y,script,./test.sh -f tsim/stable/disk.sim +# ,,y,script,./test.sh -f tsim/stable/dnode3.sim +# ,,y,script,./test.sh -f tsim/stable/metrics.sim +# ,,y,script,./test.sh -f tsim/stable/refcount.sim +# ,,y,script,./test.sh -f tsim/stable/tag_add.sim +# ,,y,script,./test.sh -f tsim/stable/tag_drop.sim +# ,,y,script,./test.sh -f tsim/stable/tag_filter.sim +# ,,y,script,./test.sh -f tsim/stable/tag_modify.sim +# ,,y,script,./test.sh -f tsim/stable/tag_rename.sim +# ,,y,script,./test.sh -f tsim/stable/values.sim +# ,,y,script,./test.sh -f tsim/stable/vnode3.sim +# ,,n,script,./test.sh -f tsim/sma/drop_sma.sim +# ,,y,script,./test.sh -f tsim/sma/sma_leak.sim +# ,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim +# ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim +# ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQueryDelete.sim + +# ### refactor stream backend, open case after rsma refactored +# #,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim +# ,,y,script,./test.sh -f tsim/sync/vnodesnapshot-rsma-test.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError1.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError2.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError3.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError4.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError5.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkError8.sim +# ,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim +# ,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim +# ,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim +# ,,y,script,./test.sh -f tsim/vnode/replica3_import.sim +# ,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim +# ,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim +# ,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim +# ,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim +# ,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim +# ,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim +# ,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim +# ,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim +# ,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim +# ,,y,script,./test.sh -f tsim/scalar/in.sim +# ,,y,script,./test.sh -f tsim/scalar/scalar.sim +# ,,y,script,./test.sh -f tsim/scalar/filter.sim +# ,,y,script,./test.sh -f tsim/scalar/caseWhen.sim +# ,,y,script,./test.sh -f tsim/scalar/tsConvert.sim +# ,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim +# ,,y,script,./test.sh -f tsim/alter/dnode.sim +# ,,y,script,./test.sh -f tsim/alter/table.sim +# ,,y,script,./test.sh -f tsim/cache/new_metrics.sim +# ,,y,script,./test.sh -f tsim/cache/restart_table.sim +# ,,y,script,./test.sh -f tsim/cache/restart_metrics.sim +# ,,y,script,./test.sh -f tsim/column/commit.sim +# ,,y,script,./test.sh -f tsim/column/metrics.sim +# ,,y,script,./test.sh -f tsim/column/table.sim +# ,,y,script,./test.sh -f tsim/compress/commitlog.sim +# ,,y,script,./test.sh -f tsim/compress/compress2.sim +# ,,y,script,./test.sh -f tsim/compress/compress.sim +# ,,y,script,./test.sh -f tsim/compress/compress_col.sim +# ,,y,script,./test.sh -f tsim/compress/uncompress.sim +# ,,y,script,./test.sh -f tsim/compute/avg.sim +# ,,y,script,./test.sh -f tsim/compute/block_dist.sim +# ,,y,script,./test.sh -f tsim/compute/bottom.sim +# ,,y,script,./test.sh -f tsim/compute/count.sim +# ,,y,script,./test.sh -f tsim/compute/diff.sim +# ,,y,script,./test.sh -f tsim/compute/diff2.sim +# ,,y,script,./test.sh -f tsim/compute/first.sim +# ,,y,script,./test.sh -f tsim/compute/interval.sim +# ,,y,script,./test.sh -f tsim/compute/last_row.sim +# ,,y,script,./test.sh -f tsim/compute/last.sim +# ,,y,script,./test.sh -f tsim/compute/leastsquare.sim +# ,,y,script,./test.sh -f tsim/compute/max.sim +# ,,y,script,./test.sh -f tsim/compute/min.sim +# ,,y,script,./test.sh -f tsim/compute/null.sim +# ,,y,script,./test.sh -f tsim/compute/percentile.sim +# ,,y,script,./test.sh -f tsim/compute/stddev.sim +# ,,y,script,./test.sh -f tsim/compute/sum.sim +# ,,y,script,./test.sh -f tsim/compute/top.sim +# ,,y,script,./test.sh -f tsim/field/2.sim +# ,,y,script,./test.sh -f tsim/field/3.sim +# ,,y,script,./test.sh -f tsim/field/4.sim +# ,,y,script,./test.sh -f tsim/field/5.sim +# ,,y,script,./test.sh -f tsim/field/6.sim +# ,,y,script,./test.sh -f tsim/field/binary.sim +# ,,y,script,./test.sh -f tsim/field/bigint.sim +# ,,y,script,./test.sh -f tsim/field/bool.sim +# ,,y,script,./test.sh -f tsim/field/double.sim +# ,,y,script,./test.sh -f tsim/field/float.sim +# ,,y,script,./test.sh -f tsim/field/int.sim +# ,,y,script,./test.sh -f tsim/field/single.sim +# ,,y,script,./test.sh -f tsim/field/smallint.sim +# ,,y,script,./test.sh -f tsim/field/tinyint.sim +# ,,y,script,./test.sh -f tsim/field/unsigined_bigint.sim +# ,,y,script,./test.sh -f tsim/vector/metrics_field.sim +# ,,y,script,./test.sh -f tsim/vector/metrics_mix.sim +# ,,y,script,./test.sh -f tsim/vector/metrics_query.sim +# ,,y,script,./test.sh -f tsim/vector/metrics_tag.sim +# ,,y,script,./test.sh -f tsim/vector/metrics_time.sim +# ,,y,script,./test.sh -f tsim/vector/multi.sim +# ,,y,script,./test.sh -f tsim/vector/single.sim +# ,,y,script,./test.sh -f tsim/vector/table_field.sim +# ,,y,script,./test.sh -f tsim/vector/table_mix.sim +# ,,y,script,./test.sh -f tsim/vector/table_query.sim +# ,,y,script,./test.sh -f tsim/vector/table_time.sim +# ,,y,script,./test.sh -f tsim/wal/kill.sim +# ,,y,script,./test.sh -f tsim/tag/3.sim +# ,,y,script,./test.sh -f tsim/tag/4.sim +# ,,y,script,./test.sh -f tsim/tag/5.sim +# ,,y,script,./test.sh -f tsim/tag/6.sim +# ,,y,script,./test.sh -f tsim/tag/add.sim +# ,,y,script,./test.sh -f tsim/tag/bigint.sim +# ,,y,script,./test.sh -f tsim/tag/binary_binary.sim +# ,,y,script,./test.sh -f tsim/tag/binary.sim +# ,,y,script,./test.sh -f tsim/tag/bool_binary.sim +# ,,y,script,./test.sh -f tsim/tag/bool_int.sim +# ,,y,script,./test.sh -f tsim/tag/bool.sim +# ,,y,script,./test.sh -f tsim/tag/change.sim +# ,,y,script,./test.sh -f tsim/tag/column.sim +# ,,y,script,./test.sh -f tsim/tag/commit.sim +# ,,y,script,./test.sh -f tsim/tag/create.sim +# ,,y,script,./test.sh -f tsim/tag/delete.sim +# ,,y,script,./test.sh -f tsim/tag/double.sim +# ,,y,script,./test.sh -f tsim/tag/filter.sim +# ,,y,script,./test.sh -f tsim/tag/float.sim +# ,,y,script,./test.sh -f tsim/tag/int_binary.sim +# ,,y,script,./test.sh -f tsim/tag/int_float.sim +# ,,y,script,./test.sh -f tsim/tag/int.sim +# ,,y,script,./test.sh -f tsim/tag/set.sim +# ,,y,script,./test.sh -f tsim/tag/smallint.sim +# ,,y,script,./test.sh -f tsim/tag/tinyint.sim +# ,,y,script,./test.sh -f tsim/tag/drop_tag.sim +# ,,y,script,./test.sh -f tsim/tag/tbNameIn.sim +# ,,y,script,./test.sh -f tmp/monitor.sim +# ,,y,script,./test.sh -f tsim/tagindex/add_index.sim +# ,,n,script,./test.sh -f tsim/tagindex/sma_and_tag_index.sim +# ,,y,script,./test.sh -f tsim/tagindex/indexOverflow.sim +# ,,y,script,./test.sh -f tsim/view/view.sim +# ,,y,script,./test.sh -f tsim/query/cache_last.sim +# ,,y,script,./test.sh -f tsim/query/const.sim +# ,,y,script,./test.sh -f tsim/query/nestedJoinView.sim -#develop test -,,n,develop-test,python3 ./test.py -f 2-query/table_count_scan.py -,,n,develop-test,python3 ./test.py -f 2-query/pseudo_column.py -,,n,develop-test,python3 ./test.py -f 2-query/ts-range.py -,,n,develop-test,python3 ./test.py -f 2-query/tag_scan.py -,,n,develop-test,python3 ./test.py -f 2-query/show_create_db.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/custom_col_tag.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/default_json.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insert_alltypes_json.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/invalid_commandline.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/json_tag.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/query_json.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sample_csv_json.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_json_alltypes.py -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/taosdemoTestQueryWithJson.py -R -,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/telnet_tcp.py -R +# #develop test +# ,,n,develop-test,python3 ./test.py -f 2-query/table_count_scan.py +# ,,n,develop-test,python3 ./test.py -f 2-query/pseudo_column.py +# ,,n,develop-test,python3 ./test.py -f 2-query/ts-range.py +# ,,n,develop-test,python3 ./test.py -f 2-query/tag_scan.py +# ,,n,develop-test,python3 ./test.py -f 2-query/show_create_db.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/custom_col_tag.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/default_json.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insert_alltypes_json.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/invalid_commandline.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/json_tag.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/query_json.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sample_csv_json.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_json_alltypes.py +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/taosdemoTestQueryWithJson.py -R +# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/telnet_tcp.py -R -#docs-examples test -,,n,docs-examples-test,bash python.sh -#,,n,docs-examples-test,bash node.sh -,,n,docs-examples-test,bash csharp.sh -,,n,docs-examples-test,bash jdbc.sh -,,n,docs-examples-test,bash go.sh -,,n,docs-examples-test,bash test_R.sh +# #docs-examples test +# ,,n,docs-examples-test,bash python.sh +# #,,n,docs-examples-test,bash node.sh +# ,,n,docs-examples-test,bash csharp.sh +# ,,n,docs-examples-test,bash jdbc.sh +# ,,n,docs-examples-test,bash go.sh +# ,,n,docs-examples-test,bash test_R.sh From b017c96e48d230dc0e78595c21de15455de13c54 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Sun, 14 Jul 2024 17:53:46 +0800 Subject: [PATCH 02/45] Update Jenkinsfile2 --- Jenkinsfile2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 5e71ed39d5..9374dc1bda 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -401,7 +401,7 @@ pipeline { } } stage('linux test') { - agent{label "slave1_52 | slave217 || slave219 "} + agent{label "slave1_52 | slave217 | slave219 "} options { skipDefaultCheckout() } when { changeRequest() From 2e73cb80aa8e18027cb6057265d369fc072bfc44 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sun, 14 Jul 2024 17:57:54 +0800 Subject: [PATCH 03/45] test: test ci --- tests/pytest/util/dnodes.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 2d3275d95e..1cebf08b4c 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -37,7 +37,8 @@ class TDSimClient: "charset": "UTF-8", "asyncLog": "0", "rpcDebugFlag": "135", - "tmrDebugFlag": "131", + "tmrDebugFlag": "135", + "dDebugFlag":"135", "cDebugFlag": "135", "uDebugFlag": "135", "jniDebugFlag": "135", @@ -129,21 +130,21 @@ class TDDnode: "maxShellConns": "30000", "locale": "en_US.UTF-8", "charset": "UTF-8", - "asyncLog": "0", + "asyncLog": "135", "mDebugFlag": "135", - "dDebugFlag": "131", - "vDebugFlag": "131", + "dDebugFlag": "135", + "vDebugFlag": "135", "tqDebugFlag": "135", "cDebugFlag": "135", "stDebugFlag": "135", "smaDebugFlag": "135", - "jniDebugFlag": "131", - "qDebugFlag": "131", + "jniDebugFlag": "135", + "qDebugFlag": "135", "rpcDebugFlag": "135", - "tmrDebugFlag": "131", - "uDebugFlag": "131", - "sDebugFlag": "131", - "wDebugFlag": "131", + "tmrDebugFlag": "135", + "uDebugFlag": "135", + "sDebugFlag": "135", + "wDebugFlag": "135", "numOfLogLines": "100000000", "statusInterval": "1", "enableQueryHb": "1", From dc0993bbf4dd75e96cc00565460780f04b35f484 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sun, 14 Jul 2024 18:00:15 +0800 Subject: [PATCH 04/45] test: test ci --- Jenkinsfile2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 9374dc1bda..f98f24e509 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -401,7 +401,7 @@ pipeline { } } stage('linux test') { - agent{label "slave1_52 | slave217 | slave219 "} + agent{label "slave1_52 || slave217 || slave219 "} options { skipDefaultCheckout() } when { changeRequest() From 2978b33e01d82ef7757bc7ccf184ab7fa0ea275c Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Sun, 14 Jul 2024 18:43:58 +0800 Subject: [PATCH 05/45] test: test ci --- tests/parallel_test/cases.task | 2942 ++++++++++++++++---------------- 1 file changed, 1471 insertions(+), 1471 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 34289a27dc..4338187791 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -1,668 +1,668 @@ -# #Column Define -# #caseID,rerunTimes,Run with Sanitizer,casePath,caseCommand -# #NA,NA,y or n,script,./test.sh -f tsim/user/basic.sim +#Column Define +#caseID,rerunTimes,Run with Sanitizer,casePath,caseCommand +#NA,NA,y or n,script,./test.sh -f tsim/user/basic.sim -# #unit-test +#unit-test -# ,,n,unit-test,bash test.sh +,,n,unit-test,bash test.sh -# # -# # army-test -# # -# ,,y,army,./pytest.sh python3 ./test.py -f multi-level/mlevel_basic.py -N 3 -L 3 -D 2 -# ,,y,army,./pytest.sh python3 ./test.py -f db-encrypt/basic.py -# ,,n,army,python3 ./test.py -f s3/s3Basic.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f cluster/snapshot.py -N 3 -L 3 -D 2 -# ,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py -# ,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py -# ,,y,army,./pytest.sh python3 ./test.py -f query/test_compare.py -# ,,y,army,./pytest.sh python3 ./test.py -f insert/test_column_tag_boundary.py -# ,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_desc.py -N 3 -L 3 -D 2 -# ,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_null.py -# ,,y,army,./pytest.sh python3 ./test.py -f cluster/incSnapshot.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f query/query_basic.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f query/accuracy/test_query_accuracy.py -# ,,y,army,./pytest.sh python3 ./test.py -f insert/insert_basic.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f cluster/splitVgroupByLearner.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f authorith/authBasic.py -N 3 -# ,,n,army,python3 ./test.py -f cmdline/fullopt.py -# ,,n,army,python3 ./test.py -f query/show.py -N 3 -# ,,n,army,python3 ./test.py -f alter/alterConfig.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f query/subquery/subqueryBugs.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f storage/oneStageComp.py -N 3 -L 3 -D 1 -# ,,y,army,./pytest.sh python3 ./test.py -f storage/compressBasic.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f grant/grantBugs.py -N 3 -# ,,y,army,./pytest.sh python3 ./test.py -f query/queryBugs.py -N 3 +# +# army-test +# +,,y,army,./pytest.sh python3 ./test.py -f multi-level/mlevel_basic.py -N 3 -L 3 -D 2 +,,y,army,./pytest.sh python3 ./test.py -f db-encrypt/basic.py +,,n,army,python3 ./test.py -f s3/s3Basic.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f cluster/snapshot.py -N 3 -L 3 -D 2 +,,y,army,./pytest.sh python3 ./test.py -f query/function/test_func_elapsed.py +,,y,army,./pytest.sh python3 ./test.py -f query/test_join.py +,,y,army,./pytest.sh python3 ./test.py -f query/test_compare.py +,,y,army,./pytest.sh python3 ./test.py -f insert/test_column_tag_boundary.py +,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_desc.py -N 3 -L 3 -D 2 +,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_null.py +,,y,army,./pytest.sh python3 ./test.py -f cluster/incSnapshot.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f query/query_basic.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f query/accuracy/test_query_accuracy.py +,,y,army,./pytest.sh python3 ./test.py -f insert/insert_basic.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f cluster/splitVgroupByLearner.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f authorith/authBasic.py -N 3 +,,n,army,python3 ./test.py -f cmdline/fullopt.py +,,n,army,python3 ./test.py -f query/show.py -N 3 +,,n,army,python3 ./test.py -f alter/alterConfig.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f query/subquery/subqueryBugs.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f storage/oneStageComp.py -N 3 -L 3 -D 1 +,,y,army,./pytest.sh python3 ./test.py -f storage/compressBasic.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f grant/grantBugs.py -N 3 +,,y,army,./pytest.sh python3 ./test.py -f query/queryBugs.py -N 3 -# # -# # system test -# # -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_multi_agg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_basic.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/scalar_function.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_session.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_state_window.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_state_window.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_session.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval_ext.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval_ext.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session_ext.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/partition_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/pause_resume_test.py -# #,,n,system-test,python3 ./test.py -f 8-stream/vnode_restart.py -N 4 -# #,,n,system-test,python3 ./test.py -f 8-stream/snode_restart.py -N 4 -# ,,n,system-test,python3 ./test.py -f 8-stream/snode_restart_with_checkpoint.py -N 4 +# +# system test +# +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_multi_agg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/stream_basic.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/scalar_function.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_session.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_state_window.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_state_window.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_session.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/at_once_interval_ext.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/max_delay_interval_ext.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/window_close_session_ext.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/partition_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 8-stream/pause_resume_test.py +#,,n,system-test,python3 ./test.py -f 8-stream/vnode_restart.py -N 4 +#,,n,system-test,python3 ./test.py -f 8-stream/snode_restart.py -N 4 +,,n,system-test,python3 ./test.py -f 8-stream/snode_restart_with_checkpoint.py -N 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_error.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_varchar.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func_group.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_expr.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/project_group.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname_vgroup.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/compact-col.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tms_memleak.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb0.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb3.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/ins_topics_test.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxTopic.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqClientConsLog.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxGroupIds.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumeDiscontinuousData.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqOffset.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_primary_key.py -# ,,n,system-test,python3 ./test.py -f 7-tmq/tmqDropConsumer.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_error.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_varchar.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pk_func_group.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_expr.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/project_group.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname_vgroup.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/compact-col.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tms_memleak.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stbJoin.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hint.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/para_tms2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_unit.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col_agg.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt_2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/func_to_char_timestamp.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_cache_scan.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tbname.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb3.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/ins_topics_test.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxTopic.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqParamsTest.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqClientConsLog.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqMaxGroupIds.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumeDiscontinuousData.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqOffset.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_primary_key.py +,,n,system-test,python3 ./test.py -f 7-tmq/tmqDropConsumer.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_stb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_stable.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stt_blocks_check.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_stb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_stable.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stt_blocks_check.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/database_pre_suf.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_str.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_math.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/select_null.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/like.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-28068.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_AlwaysReturnValue.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False -# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False -# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreMnode.py -N 5 -M 3 -i False -# ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreQnode.py -N 5 -M 3 -i False +,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False +,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False +,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreMnode.py -N 5 -M 3 -i False +,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreQnode.py -N 5 -M 3 -i False -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb4.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb4.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilterWhere.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py -# #,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py -# ,,n,system-test,python3 ./test.py -f 7-tmq/tmqConsumerGroup.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAlterSchema.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-1ctb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-multiCtb.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_ts4563.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_replay.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSeekAndCommit.py -# ,,n,system-test,python3 ./test.py -f 7-tmq/tmq_offset.py -# ,,n,system-test,python3 ./test.py -f 7-tmq/tmqDataPrecisionUnit.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/raw_block_interface_test.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -i True -# ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 -i True -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db-removewal.py -N 2 -n 1 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb-removewal.py -N 6 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 2 -n 1 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 6 -n 3 -# #,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db.py -N 6 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 2 -n 1 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata-false.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-false.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-false.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column-false.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db-false.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb4.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeStb4.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilterWhere.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py +#,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py +,,n,system-test,python3 ./test.py -f 7-tmq/tmqConsumerGroup.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAlterSchema.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDelete-multiCtb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dataFromTsdbNWal-multiCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_taosx.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_ts4563.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq_replay.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSeekAndCommit.py +,,n,system-test,python3 ./test.py -f 7-tmq/tmq_offset.py +,,n,system-test,python3 ./test.py -f 7-tmq/tmqDataPrecisionUnit.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/raw_block_interface_test.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -i True +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3 -i True +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db-removewal.py -N 2 -n 1 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb-removewal.py -N 6 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 2 -n 1 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-stb.py -N 6 -n 3 +#,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeTransform-db.py -N 6 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 2 -n 1 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-duplicatedata-false.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-select-false.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-stb-false.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-column-false.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeSplit-db-false.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeReplicate.py -M 3 -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3404.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3581.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3311.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3821.py +,,y,system-test,./pytest.sh python3 test.py -f 7-tmq/tmqVnodeReplicate.py -M 3 -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3404.py +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3581.py +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3311.py +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3821.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/telemetry.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/backquote_check.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosdMonitor.py -# ,,n,system-test,python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 -# ,,n,system-test,python3 ./test.py -f 0-others/udfTest.py -# ,,n,system-test,python3 ./test.py -f 0-others/udf_create.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_restart_taosd.py -# ,,n,system-test,python3 ./test.py -f 0-others/udf_cfg1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_cfg2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/cachemodel.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sysinfo.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_control.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_manage.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_show.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_all.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/fsync.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/multilevel.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttl.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttlChangeOnWrite.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/view/non_marterial_view/test_view.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_show_table_distributed.py -# ,,n,system-test,python3 ./test.py -f 0-others/compatibility.py -# ,,n,system-test,python3 ./test.py -f 0-others/tag_index_basic.py -# ,,n,system-test,python3 ./test.py -f 0-others/udfpy_main.py -# ,,n,system-test,python3 ./test.py -N 3 -f 0-others/walRetention.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 1 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 1 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 3 -# ,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/empty_identifier.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/telemetry.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/backquote_check.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosdMonitor.py +,,n,system-test,python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 +,,n,system-test,python3 ./test.py -f 0-others/udfTest.py +,,n,system-test,python3 ./test.py -f 0-others/udf_create.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_restart_taosd.py +,,n,system-test,python3 ./test.py -f 0-others/udf_cfg1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/udf_cfg2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/cachemodel.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sysinfo.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_control.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_manage.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_show.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege_all.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/fsync.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/multilevel.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttl.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ttlChangeOnWrite.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/compress_tsz2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/view/non_marterial_view/test_view.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_show_table_distributed.py +,,n,system-test,python3 ./test.py -f 0-others/compatibility.py +,,n,system-test,python3 ./test.py -f 0-others/tag_index_basic.py +,,n,system-test,python3 ./test.py -f 0-others/udfpy_main.py +,,n,system-test,python3 ./test.py -N 3 -f 0-others/walRetention.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 1 +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 1 +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 3 +,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/empty_identifier.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_create.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_insert.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_delete.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_replica.py -N 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_table.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/boundary.py -# ,,n,system-test,python3 ./test.py -f 1-insert/insertWithMoreVgroup.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_comment.py -# #,,n,system-test,python3 ./test.py -f 1-insert/time_range_wise.py -# #,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/block_wise.py -# #,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/create_retentions.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/mutil_stage.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data_muti_rows.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/db_tb_name_check.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/InsertFuturets.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_wide_column.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_column_value.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_benchmark.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionUS.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionNS.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4219.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/ts-4272.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4295.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td27388.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4479.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29793.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_timestamp.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29157.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show_tag_index.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/information_schema.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -N 3 -n 3 -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/limit.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/orderBy.py -N 5 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaBasic.py -N 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sma_index.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml_TS-3724.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml-TD19291.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varbinary.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/tb_100w_data_order.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_childtable.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_normaltable.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_systable.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/keep_expired.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stmt_error.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py -N 3 -M 3 -i False -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/systable_func.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4382.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4403.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_td28163.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tagFilter.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts_3405_3398_3423.py -N 3 -n 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4348-td-27939.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/backslash_g.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4467.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/geometry.py -# ,,n,system-test,python3 ./test.py -f 2-query/queryQnode.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_create.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_insert.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/composite_primary_key_delete.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_double.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_database.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_replica.py -N 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/opentsdb_json_taosc_insert.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_muti_insert_query.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_stmt_set_tbname_tag.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_stable.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/alter_table.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/boundary.py +,,n,system-test,python3 ./test.py -f 1-insert/insertWithMoreVgroup.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_comment.py +#,,n,system-test,python3 ./test.py -f 1-insert/time_range_wise.py +#,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/block_wise.py +#,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/create_retentions.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/mutil_stage.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/table_param_ttl.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data_muti_rows.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/db_tb_name_check.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/InsertFuturets.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_wide_column.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_column_value.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_benchmark.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_1.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_3.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/rowlength64k_4.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionUS.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/precisionNS.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4219.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/ts-4272.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4295.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td27388.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_ts4479.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29793.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/insert_timestamp.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/test_td29157.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show_tag_index.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/information_schema.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/and_or_for_byte.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/group_partition.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -N 3 -n 3 -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/histogram.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_and_last_row.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_3.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/limit.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/orderBy.py -N 5 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaBasic.py -N 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/smaTest.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/sma_index.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml_TS-3724.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml-TD19291.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varbinary.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sum.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/update_data.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/tb_100w_data_order.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_childtable.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_normaltable.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/delete_systable.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/keep_expired.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/stmt_error.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py +,,y,system-test,./pytest.sh python3 ./test.py -f 1-insert/drop.py -N 3 -M 3 -i False -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/systable_func.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4382.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4403.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_td28163.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tagFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts_3405_3398_3423.py -N 3 -n 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4348-td-27939.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/backslash_g.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/test_ts4467.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/geometry.py +,,n,system-test,python3 ./test.py -f 2-query/queryQnode.py ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode1mnode.py ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeStop.py -N 5 -M 3 @@ -676,6 +676,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 -n 3 + ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 6 -M 3 @@ -702,831 +703,830 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py -N 4 -M 1 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py -N 4 -M 1 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py -N 4 -M 1 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 4 +#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 4 +#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 4 +#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill_with_group.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/state_window.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py +,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insertMix.py -N 3 +,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/stt.py -N 3 +,,n,system-test,python3 ./test.py -f eco-system/meta/database/keep_time_offset.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/between.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/varchar.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ltrim.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/rtrim.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/char_length.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/upper.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/lower.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/join2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/substr.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/union1.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/concat_ws2.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/check_tsdb.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/spread.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/hyperloglog.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/explain.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timezone.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Now.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Today.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/min.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mode.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/first.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_iso8601.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/To_unixtimestamp.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/timetruncate.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/Timediff.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/json_tag.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/top.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/bottom.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/percentile.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/apercentile.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ceil.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/floor.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/round.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/log.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/pow.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sqrt.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sin.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cos.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tan.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arcsin.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arccos.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/arctan.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/query_cols_tags_and_or.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQueryInterval.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stablity_1.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/avg.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/elapsed.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/csum.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/mavg.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sample.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/cast.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_diff.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/unique.py -Q 4 -# #,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/stateduration.py -Q 4 -# #,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_stateduration.py -Q 4 -# #,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/statecount.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tail.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ttl_comment.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_count.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_max.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_min.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_sum.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_spread.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_apercentile.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_avg.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distribute_agg_stddev.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/twa.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/irate.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/function_null.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count_partition.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_partition.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_limit_interval.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_last_interval.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row_interval.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last_row.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsbsQuery.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/sml.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interp.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/case_when.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -R -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/projectionDesc.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/fill_with_group.py -# ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/state_window.py -Q 3 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 -# ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py -# ,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insertMix.py -N 3 -# ,,n,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/stt.py -N 3 -# ,,n,system-test,python3 ./test.py -f eco-system/meta/database/keep_time_offset.py +#tsim test +,,y,script,./test.sh -f tsim/query/timeline.sim +,,y,script,./test.sh -f tsim/join/join.sim +,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim +,,y,script,./test.sh -f tsim/parser/where.sim +,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim +,,y,script,./test.sh -f tsim/parser/limit1.sim +,,y,script,./test.sh -f tsim/parser/union.sim +,,y,script,./test.sh -f tsim/parser/commit.sim +,,y,script,./test.sh -f tsim/parser/nestquery.sim +,,n,script,./test.sh -f tsim/valgrind/checkError7.sim +,,y,script,./test.sh -f tsim/parser/groupby.sim +,,y,script,./test.sh -f tsim/parser/sliding.sim +,,y,script,./test.sh -f tsim/dnode/balance2.sim +,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim +,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim +#,,y,script,./test.sh -f tsim/trans/create_db.sim +,,y,script,./test.sh -f tsim/dnode/balance3.sim +,,y,script,./test.sh -f tsim/vnode/replica3_many.sim +,,y,script,./test.sh -f tsim/stable/metrics_idx.sim +# ,,y,script,./test.sh -f tsim/db/alter_replica_13.sim +,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim +,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim +,,n,script,./test.sh -f tsim/valgrind/checkError6.sim -# #tsim test -# ,,y,script,./test.sh -f tsim/query/timeline.sim -# ,,y,script,./test.sh -f tsim/join/join.sim -# ,,y,script,./test.sh -f tsim/tmq/basic2Of2ConsOverlap.sim -# ,,y,script,./test.sh -f tsim/parser/where.sim -# ,,y,script,./test.sh -f tsim/parser/join_manyblocks.sim -# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim -# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim -# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim -# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim -# ,,y,script,./test.sh -f tsim/parser/limit1.sim -# ,,y,script,./test.sh -f tsim/parser/union.sim -# ,,y,script,./test.sh -f tsim/parser/commit.sim -# ,,y,script,./test.sh -f tsim/parser/nestquery.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError7.sim -# ,,y,script,./test.sh -f tsim/parser/groupby.sim -# ,,y,script,./test.sh -f tsim/parser/sliding.sim -# ,,y,script,./test.sh -f tsim/dnode/balance2.sim -# ,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim -# ,,y,script,./test.sh -f tsim/parser/col_arithmetic_operation.sim -# #,,y,script,./test.sh -f tsim/trans/create_db.sim -# ,,y,script,./test.sh -f tsim/dnode/balance3.sim -# ,,y,script,./test.sh -f tsim/vnode/replica3_many.sim -# ,,y,script,./test.sh -f tsim/stable/metrics_idx.sim -# # ,,y,script,./test.sh -f tsim/db/alter_replica_13.sim -# ,,y,script,./test.sh -f tsim/sync/3Replica1VgElect.sim -# ,,y,script,./test.sh -f tsim/sync/3Replica5VgElect.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError6.sim +,,y,script,./test.sh -f tsim/user/basic.sim +,,y,script,./test.sh -f tsim/user/password.sim +,,y,script,./test.sh -f tsim/user/whitelist.sim +,,y,script,./test.sh -f tsim/user/privilege_db.sim +,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim +,,y,script,./test.sh -f tsim/user/privilege_topic.sim +,,y,script,./test.sh -f tsim/user/privilege_table.sim +,,y,script,./test.sh -f tsim/user/privilege_create_db.sim +,,y,script,./test.sh -f tsim/db/alter_option.sim +# ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim +,,y,script,./test.sh -f tsim/db/basic1.sim +,,y,script,./test.sh -f tsim/db/basic2.sim +,,y,script,./test.sh -f tsim/db/basic3.sim +,,y,script,./test.sh -f tsim/db/basic4.sim +,,y,script,./test.sh -f tsim/db/basic5.sim +,,y,script,./test.sh -f tsim/db/basic6.sim +,,y,script,./test.sh -f tsim/db/commit.sim +,,y,script,./test.sh -f tsim/db/create_all_options.sim +,,y,script,./test.sh -f tsim/db/delete_reuse1.sim +,,y,script,./test.sh -f tsim/db/delete_reuse2.sim +,,y,script,./test.sh -f tsim/db/delete_reusevnode.sim +,,y,script,./test.sh -f tsim/db/delete_reusevnode2.sim +,,y,script,./test.sh -f tsim/db/delete_writing1.sim +,,y,script,./test.sh -f tsim/db/delete_writing2.sim +,,y,script,./test.sh -f tsim/db/error1.sim +,,y,script,./test.sh -f tsim/db/keep.sim +,,y,script,./test.sh -f tsim/db/len.sim +,,y,script,./test.sh -f tsim/db/repeat.sim +,,y,script,./test.sh -f tsim/db/show_create_db.sim +,,y,script,./test.sh -f tsim/db/show_create_table.sim +,,y,script,./test.sh -f tsim/db/tables.sim +,,y,script,./test.sh -f tsim/db/taosdlog.sim +,,y,script,./test.sh -f tsim/db/table_prefix_suffix.sim +,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim +,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim +,,y,script,./test.sh -f tsim/dnode/balance1.sim +,,y,script,./test.sh -f tsim/dnode/balancex.sim +,,y,script,./test.sh -f tsim/dnode/create_dnode.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim +,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim +,,y,script,./test.sh -f tsim/dnode/offline_reason.sim +,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim +,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim +,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim +,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim +,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim +,,y,script,./test.sh -f tsim/import/basic.sim +,,y,script,./test.sh -f tsim/import/commit.sim +,,y,script,./test.sh -f tsim/import/large.sim +,,y,script,./test.sh -f tsim/import/replica1.sim +,,y,script,./test.sh -f tsim/insert/backquote.sim +,,y,script,./test.sh -f tsim/insert/basic.sim +,,y,script,./test.sh -f tsim/insert/basic0.sim +,,y,script,./test.sh -f tsim/insert/basic1.sim +,,y,script,./test.sh -f tsim/insert/basic2.sim +,,y,script,./test.sh -f tsim/insert/commit-merge0.sim +,,y,script,./test.sh -f tsim/insert/insert_drop.sim +,,y,script,./test.sh -f tsim/insert/insert_select.sim +,,y,script,./test.sh -f tsim/insert/null.sim +,,y,script,./test.sh -f tsim/insert/query_block1_file.sim +,,y,script,./test.sh -f tsim/insert/query_block1_memory.sim +,,y,script,./test.sh -f tsim/insert/query_block2_file.sim +,,y,script,./test.sh -f tsim/insert/query_block2_memory.sim +,,y,script,./test.sh -f tsim/insert/query_file_memory.sim +,,y,script,./test.sh -f tsim/insert/query_multi_file.sim +,,y,script,./test.sh -f tsim/insert/tcp.sim +,,y,script,./test.sh -f tsim/insert/update0.sim +,,y,script,./test.sh -f tsim/insert/delete0.sim +,,y,script,./test.sh -f tsim/insert/update1_sort_merge.sim +,,y,script,./test.sh -f tsim/insert/update2.sim +,,y,script,./test.sh -f tsim/insert/insert_stb.sim +,,y,script,./test.sh -f tsim/parser/alter__for_community_version.sim +,,y,script,./test.sh -f tsim/parser/alter_column.sim +,,y,script,./test.sh -f tsim/parser/alter_stable.sim +,,y,script,./test.sh -f tsim/parser/alter.sim +,,y,script,./test.sh -f tsim/parser/alter1.sim +,,y,script,./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim +,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim +,,y,script,./test.sh -f tsim/parser/between_and.sim +,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim +,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim +,,y,script,./test.sh -f tsim/parser/columnValue_double.sim +,,y,script,./test.sh -f tsim/parser/columnValue_float.sim +,,y,script,./test.sh -f tsim/parser/columnValue_int.sim +,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim +,,y,script,./test.sh -f tsim/parser/columnValue_uint.sim +,,y,script,./test.sh -f tsim/parser/columnValue_timestamp.sim +,,y,script,./test.sh -f tsim/parser/columnValue_varchar.sim +,,y,script,./test.sh -f tsim/parser/columnValue_nchar.sim +,,y,script,./test.sh -f tsim/parser/columnValue_varbinary.sim +,,y,script,./test.sh -f tsim/parser/columnValue_json.sim +,,y,script,./test.sh -f tsim/parser/columnValue_geometry.sim +,,y,script,./test.sh -f tsim/parser/condition.sim +,,y,script,./test.sh -f tsim/parser/condition_scl.sim +,,y,script,./test.sh -f tsim/parser/constCol.sim +,,y,script,./test.sh -f tsim/parser/create_db.sim +,,y,script,./test.sh -f tsim/parser/create_mt.sim +,,y,script,./test.sh -f tsim/parser/create_tb_with_tag_name.sim +,,y,script,./test.sh -f tsim/parser/create_tb.sim +,,y,script,./test.sh -f tsim/parser/dbtbnameValidate.sim +,,y,script,./test.sh -f tsim/parser/distinct.sim +,,y,script,./test.sh -f tsim/parser/fill_us.sim +,,y,script,./test.sh -f tsim/parser/fill.sim +,,y,script,./test.sh -f tsim/parser/first_last.sim +,,y,script,./test.sh -f tsim/parser/fill_stb.sim +,,y,script,./test.sh -f tsim/parser/interp.sim +,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim +,,y,script,./test.sh -f tsim/parser/function.sim +,,y,script,./test.sh -f tsim/parser/groupby-basic.sim +,,y,script,./test.sh -f tsim/parser/having_child.sim +,,y,script,./test.sh -f tsim/parser/having.sim +,,y,script,./test.sh -f tsim/parser/import_commit1.sim +,,y,script,./test.sh -f tsim/parser/import_commit2.sim +,,y,script,./test.sh -f tsim/parser/import_commit3.sim +,,y,script,./test.sh -f tsim/parser/import_file.sim +,,y,script,./test.sh -f tsim/parser/import.sim +,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim +,,y,script,./test.sh -f tsim/parser/insert_tb.sim +,,y,script,./test.sh -f tsim/parser/join_multitables.sim +,,y,script,./test.sh -f tsim/parser/join_multivnode.sim +,,y,script,./test.sh -f tsim/parser/join.sim +,,y,script,./test.sh -f tsim/parser/last_cache.sim +,,y,script,./test.sh -f tsim/parser/last_both.sim +,,y,script,./test.sh -f tsim/parser/last_groupby.sim +,,y,script,./test.sh -f tsim/parser/lastrow.sim +,,y,script,./test.sh -f tsim/parser/lastrow2.sim +,,y,script,./test.sh -f tsim/parser/like.sim +,,y,script,./test.sh -f tsim/parser/limit.sim +,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim +,,y,script,./test.sh -f tsim/parser/nchar.sim +,,y,script,./test.sh -f tsim/parser/null_char.sim +,,y,script,./test.sh -f tsim/parser/precision_ns.sim +,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim +,,y,script,./test.sh -f tsim/parser/regex.sim +,,y,script,./test.sh -f tsim/parser/regressiontest.sim +,,y,script,./test.sh -f tsim/parser/select_across_vnodes.sim +,,y,script,./test.sh -f tsim/parser/select_distinct_tag.sim +,,y,script,./test.sh -f tsim/parser/select_from_cache_disk.sim +,,y,script,./test.sh -f tsim/parser/select_with_tags.sim +,,y,script,./test.sh -f tsim/parser/selectResNum.sim +,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim +,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim +,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim +,,y,script,./test.sh -f tsim/parser/slimit.sim +,,y,script,./test.sh -f tsim/parser/slimit1.sim +,,y,script,./test.sh -f tsim/parser/stableOp.sim +,,y,script,./test.sh -f tsim/parser/tags_dynamically_specifiy.sim +,,y,script,./test.sh -f tsim/parser/tags_filter.sim +,,y,script,./test.sh -f tsim/parser/tbnameIn.sim +,,y,script,./test.sh -f tsim/parser/timestamp.sim +,,y,script,./test.sh -f tsim/parser/top_groupby.sim +,,y,script,./test.sh -f tsim/parser/topbot.sim +,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim +,,y,script,./test.sh -f tsim/parser/slimit_limit.sim +,,y,script,./test.sh -f tsim/parser/table_merge_limit.sim +,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim +,,y,script,./test.sh -f tsim/query/charScalarFunction.sim +,,y,script,./test.sh -f tsim/query/explain.sim +,,y,script,./test.sh -f tsim/query/interval-offset.sim +,,y,script,./test.sh -f tsim/query/interval.sim +,,y,script,./test.sh -f tsim/query/scalarFunction.sim +,,y,script,./test.sh -f tsim/query/scalarNull.sim +,,y,script,./test.sh -f tsim/query/session.sim +,,y,script,./test.sh -f tsim/query/udf.sim +,,n,script,./test.sh -f tsim/query/udfpy.sim +,,y,script,./test.sh -f tsim/query/udf_with_const.sim +,,y,script,./test.sh -f tsim/query/join_interval.sim +,,y,script,./test.sh -f tsim/query/join_pk.sim +,,y,script,./test.sh -f tsim/query/join_order.sim +,,y,script,./test.sh -f tsim/query/count_spread.sim +,,y,script,./test.sh -f tsim/query/unionall_as_table.sim +,,y,script,./test.sh -f tsim/query/multi_order_by.sim +,,y,script,./test.sh -f tsim/query/sys_tbname.sim +,,y,script,./test.sh -f tsim/query/sort-pre-cols.sim +,,y,script,./test.sh -f tsim/query/groupby.sim +,,y,script,./test.sh -f tsim/query/groupby_distinct.sim +,,y,script,./test.sh -f tsim/query/event.sim +,,y,script,./test.sh -f tsim/query/forceFill.sim +,,y,script,./test.sh -f tsim/query/emptyTsRange.sim +,,y,script,./test.sh -f tsim/query/emptyTsRange_scl.sim +,,y,script,./test.sh -f tsim/query/partitionby.sim +,,y,script,./test.sh -f tsim/query/tableCount.sim +,,y,script,./test.sh -f tsim/query/show_db_table_kind.sim +,,y,script,./test.sh -f tsim/query/bi_star_table.sim +,,y,script,./test.sh -f tsim/query/bi_tag_scan.sim +,,y,script,./test.sh -f tsim/query/bi_tbname_col.sim +,,y,script,./test.sh -f tsim/query/tag_scan.sim +,,y,script,./test.sh -f tsim/query/nullColSma.sim +,,y,script,./test.sh -f tsim/query/bug3398.sim +,,y,script,./test.sh -f tsim/query/explain_tsorder.sim +,,y,script,./test.sh -f tsim/query/apercentile.sim +,,y,script,./test.sh -f tsim/query/query_count0.sim +,,y,script,./test.sh -f tsim/query/query_count_sliding0.sim +,,y,script,./test.sh -f tsim/query/union_precision.sim +,,y,script,./test.sh -f tsim/qnode/basic1.sim +,,y,script,./test.sh -f tsim/snode/basic1.sim +,,y,script,./test.sh -f tsim/mnode/basic1.sim +,,y,script,./test.sh -f tsim/mnode/basic2.sim +,,y,script,./test.sh -f tsim/mnode/basic3.sim +,,y,script,./test.sh -f tsim/mnode/basic4.sim +,,y,script,./test.sh -f tsim/mnode/basic5.sim +,,y,script,./test.sh -f tsim/show/basic.sim +,,y,script,./test.sh -f tsim/table/autocreate.sim +,,y,script,./test.sh -f tsim/table/basic1.sim +,,y,script,./test.sh -f tsim/table/basic2.sim +,,y,script,./test.sh -f tsim/table/basic3.sim +,,y,script,./test.sh -f tsim/table/bigint.sim +,,y,script,./test.sh -f tsim/table/binary.sim +,,y,script,./test.sh -f tsim/table/bool.sim +,,y,script,./test.sh -f tsim/table/column_name.sim +,,y,script,./test.sh -f tsim/table/column_num.sim +,,y,script,./test.sh -f tsim/table/column_value.sim +,,y,script,./test.sh -f tsim/table/column2.sim +,,y,script,./test.sh -f tsim/table/createmulti.sim +,,y,script,./test.sh -f tsim/table/date.sim +,,y,script,./test.sh -f tsim/table/db.table.sim +,,y,script,./test.sh -f tsim/table/delete_reuse1.sim +,,y,script,./test.sh -f tsim/table/delete_reuse2.sim +,,y,script,./test.sh -f tsim/table/delete_writing.sim +,,y,script,./test.sh -f tsim/table/describe.sim +,,y,script,./test.sh -f tsim/table/double.sim +,,y,script,./test.sh -f tsim/table/float.sim +,,y,script,./test.sh -f tsim/table/hash.sim +,,y,script,./test.sh -f tsim/table/int.sim +,,y,script,./test.sh -f tsim/table/limit.sim +,,y,script,./test.sh -f tsim/table/smallint.sim +,,y,script,./test.sh -f tsim/table/table_len.sim +,,y,script,./test.sh -f tsim/table/table.sim +,,y,script,./test.sh -f tsim/table/tinyint.sim +,,y,script,./test.sh -f tsim/table/vgroup.sim +,,n,script,./test.sh -f tsim/stream/basic0.sim -g +,,y,script,./test.sh -f tsim/stream/basic1.sim +,,y,script,./test.sh -f tsim/stream/basic2.sim +,,y,script,./test.sh -f tsim/stream/basic3.sim +,,y,script,./test.sh -f tsim/stream/basic4.sim +,,y,script,./test.sh -f tsim/stream/checkpointInterval0.sim +,,y,script,./test.sh -f tsim/stream/checkStreamSTable1.sim +,,y,script,./test.sh -f tsim/stream/checkStreamSTable.sim +,,y,script,./test.sh -f tsim/stream/count0.sim +,,y,script,./test.sh -f tsim/stream/count1.sim +,,y,script,./test.sh -f tsim/stream/count2.sim +,,y,script,./test.sh -f tsim/stream/count3.sim +,,y,script,./test.sh -f tsim/stream/countSliding0.sim +,,y,script,./test.sh -f tsim/stream/countSliding1.sim +,,y,script,./test.sh -f tsim/stream/countSliding2.sim +,,y,script,./test.sh -f tsim/stream/deleteInterval.sim +,,y,script,./test.sh -f tsim/stream/deleteScalar.sim +,,y,script,./test.sh -f tsim/stream/deleteSession.sim +,,y,script,./test.sh -f tsim/stream/deleteState.sim +,,y,script,./test.sh -f tsim/stream/distributeInterval0.sim +,,y,script,./test.sh -f tsim/stream/distributeIntervalRetrive0.sim +,,y,script,./test.sh -f tsim/stream/distributeMultiLevelInterval0.sim +,,y,script,./test.sh -f tsim/stream/distributeSession0.sim +,,y,script,./test.sh -f tsim/stream/drop_stream.sim +,,y,script,./test.sh -f tsim/stream/event0.sim +,,y,script,./test.sh -f tsim/stream/event1.sim +,,y,script,./test.sh -f tsim/stream/event2.sim +,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim +,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim +,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalDelete0.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalDelete1.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalLinear.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalPartitionBy.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext1.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalRange.sim +,,y,script,./test.sh -f tsim/stream/fillIntervalValue.sim +,,y,script,./test.sh -f tsim/stream/ignoreCheckUpdate.sim +,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim +,,y,script,./test.sh -f tsim/stream/partitionby1.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnOther.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim +,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim +,,y,script,./test.sh -f tsim/stream/partitionby.sim +,,y,script,./test.sh -f tsim/stream/pauseAndResume.sim +,,y,script,./test.sh -f tsim/stream/schedSnode.sim +,,y,script,./test.sh -f tsim/stream/session0.sim +,,y,script,./test.sh -f tsim/stream/session1.sim +,,y,script,./test.sh -f tsim/stream/sliding.sim +,,y,script,./test.sh -f tsim/stream/state0.sim +,,y,script,./test.sh -f tsim/stream/state1.sim +,,y,script,./test.sh -f tsim/stream/streamPrimaryKey0.sim +,,y,script,./test.sh -f tsim/stream/streamPrimaryKey1.sim +,,y,script,./test.sh -f tsim/stream/streamPrimaryKey2.sim +,,y,script,./test.sh -f tsim/stream/streamPrimaryKey3.sim +,,y,script,./test.sh -f tsim/stream/triggerInterval0.sim +,,y,script,./test.sh -f tsim/stream/triggerSession0.sim +,,y,script,./test.sh -f tsim/stream/udTableAndCol0.sim +,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim +,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim +,,y,script,./test.sh -f tsim/stream/udTableAndTag2.sim +,,y,script,./test.sh -f tsim/stream/windowClose.sim +,,y,script,./test.sh -f tsim/trans/lossdata1.sim +,,y,script,./test.sh -f tsim/tmq/basic1.sim +,,y,script,./test.sh -f tsim/tmq/basic2.sim +,,y,script,./test.sh -f tsim/tmq/basic3.sim +,,y,script,./test.sh -f tsim/tmq/basic4.sim +,,y,script,./test.sh -f tsim/tmq/basic1Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim +,,y,script,./test.sh -f tsim/tmq/topic.sim +,,y,script,./test.sh -f tsim/tmq/snapshot.sim +,,y,script,./test.sh -f tsim/tmq/snapshot1.sim +,,y,script,./test.sh -f tsim/stable/alter_comment.sim +,,y,script,./test.sh -f tsim/stable/alter_count.sim +,,y,script,./test.sh -f tsim/stable/alter_import.sim +,,y,script,./test.sh -f tsim/stable/alter_insert1.sim +,,y,script,./test.sh -f tsim/stable/alter_insert2.sim +,,y,script,./test.sh -f tsim/stable/alter_metrics.sim +,,y,script,./test.sh -f tsim/stable/column_add.sim +,,y,script,./test.sh -f tsim/stable/column_drop.sim +,,y,script,./test.sh -f tsim/stable/column_modify.sim +,,y,script,./test.sh -f tsim/stable/disk.sim +,,y,script,./test.sh -f tsim/stable/dnode3.sim +,,y,script,./test.sh -f tsim/stable/metrics.sim +,,y,script,./test.sh -f tsim/stable/refcount.sim +,,y,script,./test.sh -f tsim/stable/tag_add.sim +,,y,script,./test.sh -f tsim/stable/tag_drop.sim +,,y,script,./test.sh -f tsim/stable/tag_filter.sim +,,y,script,./test.sh -f tsim/stable/tag_modify.sim +,,y,script,./test.sh -f tsim/stable/tag_rename.sim +,,y,script,./test.sh -f tsim/stable/values.sim +,,y,script,./test.sh -f tsim/stable/vnode3.sim +,,n,script,./test.sh -f tsim/sma/drop_sma.sim +,,y,script,./test.sh -f tsim/sma/sma_leak.sim +,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim +,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim +,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQueryDelete.sim -# ,,y,script,./test.sh -f tsim/user/basic.sim -# ,,y,script,./test.sh -f tsim/user/password.sim -# ,,y,script,./test.sh -f tsim/user/whitelist.sim -# ,,y,script,./test.sh -f tsim/user/privilege_db.sim -# ,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim -# ,,y,script,./test.sh -f tsim/user/privilege_topic.sim -# ,,y,script,./test.sh -f tsim/user/privilege_table.sim -# ,,y,script,./test.sh -f tsim/user/privilege_create_db.sim -# ,,y,script,./test.sh -f tsim/db/alter_option.sim -# # ,,y,script,./test.sh -f tsim/db/alter_replica_31.sim -# ,,y,script,./test.sh -f tsim/db/basic1.sim -# ,,y,script,./test.sh -f tsim/db/basic2.sim -# ,,y,script,./test.sh -f tsim/db/basic3.sim -# ,,y,script,./test.sh -f tsim/db/basic4.sim -# ,,y,script,./test.sh -f tsim/db/basic5.sim -# ,,y,script,./test.sh -f tsim/db/basic6.sim -# ,,y,script,./test.sh -f tsim/db/commit.sim -# ,,y,script,./test.sh -f tsim/db/create_all_options.sim -# ,,y,script,./test.sh -f tsim/db/delete_reuse1.sim -# ,,y,script,./test.sh -f tsim/db/delete_reuse2.sim -# ,,y,script,./test.sh -f tsim/db/delete_reusevnode.sim -# ,,y,script,./test.sh -f tsim/db/delete_reusevnode2.sim -# ,,y,script,./test.sh -f tsim/db/delete_writing1.sim -# ,,y,script,./test.sh -f tsim/db/delete_writing2.sim -# ,,y,script,./test.sh -f tsim/db/error1.sim -# ,,y,script,./test.sh -f tsim/db/keep.sim -# ,,y,script,./test.sh -f tsim/db/len.sim -# ,,y,script,./test.sh -f tsim/db/repeat.sim -# ,,y,script,./test.sh -f tsim/db/show_create_db.sim -# ,,y,script,./test.sh -f tsim/db/show_create_table.sim -# ,,y,script,./test.sh -f tsim/db/tables.sim -# ,,y,script,./test.sh -f tsim/db/taosdlog.sim -# ,,y,script,./test.sh -f tsim/db/table_prefix_suffix.sim -# ,,y,script,./test.sh -f tsim/dnode/balance_replica1.sim -# ,,y,script,./test.sh -f tsim/dnode/balance_replica3.sim -# ,,y,script,./test.sh -f tsim/dnode/balance1.sim -# ,,y,script,./test.sh -f tsim/dnode/balancex.sim -# ,,y,script,./test.sh -f tsim/dnode/create_dnode.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica1.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_vnode_replica3.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim -# ,,y,script,./test.sh -f tsim/dnode/drop_dnode_force.sim -# ,,y,script,./test.sh -f tsim/dnode/offline_reason.sim -# ,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica1.sim -# ,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim -# ,,y,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim -# ,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim -# ,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim -# ,,y,script,./test.sh -f tsim/import/basic.sim -# ,,y,script,./test.sh -f tsim/import/commit.sim -# ,,y,script,./test.sh -f tsim/import/large.sim -# ,,y,script,./test.sh -f tsim/import/replica1.sim -# ,,y,script,./test.sh -f tsim/insert/backquote.sim -# ,,y,script,./test.sh -f tsim/insert/basic.sim -# ,,y,script,./test.sh -f tsim/insert/basic0.sim -# ,,y,script,./test.sh -f tsim/insert/basic1.sim -# ,,y,script,./test.sh -f tsim/insert/basic2.sim -# ,,y,script,./test.sh -f tsim/insert/commit-merge0.sim -# ,,y,script,./test.sh -f tsim/insert/insert_drop.sim -# ,,y,script,./test.sh -f tsim/insert/insert_select.sim -# ,,y,script,./test.sh -f tsim/insert/null.sim -# ,,y,script,./test.sh -f tsim/insert/query_block1_file.sim -# ,,y,script,./test.sh -f tsim/insert/query_block1_memory.sim -# ,,y,script,./test.sh -f tsim/insert/query_block2_file.sim -# ,,y,script,./test.sh -f tsim/insert/query_block2_memory.sim -# ,,y,script,./test.sh -f tsim/insert/query_file_memory.sim -# ,,y,script,./test.sh -f tsim/insert/query_multi_file.sim -# ,,y,script,./test.sh -f tsim/insert/tcp.sim -# ,,y,script,./test.sh -f tsim/insert/update0.sim -# ,,y,script,./test.sh -f tsim/insert/delete0.sim -# ,,y,script,./test.sh -f tsim/insert/update1_sort_merge.sim -# ,,y,script,./test.sh -f tsim/insert/update2.sim -# ,,y,script,./test.sh -f tsim/insert/insert_stb.sim -# ,,y,script,./test.sh -f tsim/parser/alter__for_community_version.sim -# ,,y,script,./test.sh -f tsim/parser/alter_column.sim -# ,,y,script,./test.sh -f tsim/parser/alter_stable.sim -# ,,y,script,./test.sh -f tsim/parser/alter.sim -# ,,y,script,./test.sh -f tsim/parser/alter1.sim -# ,,y,script,./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim -# ,,y,script,./test.sh -f tsim/parser/auto_create_tb.sim -# ,,y,script,./test.sh -f tsim/parser/between_and.sim -# ,,y,script,./test.sh -f tsim/parser/binary_escapeCharacter.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_bigint.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_bool.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_double.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_float.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_int.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_smallint.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_tinyint.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_unsign.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_uint.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_timestamp.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_varchar.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_nchar.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_varbinary.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_json.sim -# ,,y,script,./test.sh -f tsim/parser/columnValue_geometry.sim -# ,,y,script,./test.sh -f tsim/parser/condition.sim -# ,,y,script,./test.sh -f tsim/parser/condition_scl.sim -# ,,y,script,./test.sh -f tsim/parser/constCol.sim -# ,,y,script,./test.sh -f tsim/parser/create_db.sim -# ,,y,script,./test.sh -f tsim/parser/create_mt.sim -# ,,y,script,./test.sh -f tsim/parser/create_tb_with_tag_name.sim -# ,,y,script,./test.sh -f tsim/parser/create_tb.sim -# ,,y,script,./test.sh -f tsim/parser/dbtbnameValidate.sim -# ,,y,script,./test.sh -f tsim/parser/distinct.sim -# ,,y,script,./test.sh -f tsim/parser/fill_us.sim -# ,,y,script,./test.sh -f tsim/parser/fill.sim -# ,,y,script,./test.sh -f tsim/parser/first_last.sim -# ,,y,script,./test.sh -f tsim/parser/fill_stb.sim -# ,,y,script,./test.sh -f tsim/parser/interp.sim -# ,,y,script,./test.sh -f tsim/parser/fourArithmetic-basic.sim -# ,,y,script,./test.sh -f tsim/parser/function.sim -# ,,y,script,./test.sh -f tsim/parser/groupby-basic.sim -# ,,y,script,./test.sh -f tsim/parser/having_child.sim -# ,,y,script,./test.sh -f tsim/parser/having.sim -# ,,y,script,./test.sh -f tsim/parser/import_commit1.sim -# ,,y,script,./test.sh -f tsim/parser/import_commit2.sim -# ,,y,script,./test.sh -f tsim/parser/import_commit3.sim -# ,,y,script,./test.sh -f tsim/parser/import_file.sim -# ,,y,script,./test.sh -f tsim/parser/import.sim -# ,,y,script,./test.sh -f tsim/parser/insert_multiTbl.sim -# ,,y,script,./test.sh -f tsim/parser/insert_tb.sim -# ,,y,script,./test.sh -f tsim/parser/join_multitables.sim -# ,,y,script,./test.sh -f tsim/parser/join_multivnode.sim -# ,,y,script,./test.sh -f tsim/parser/join.sim -# ,,y,script,./test.sh -f tsim/parser/last_cache.sim -# ,,y,script,./test.sh -f tsim/parser/last_both.sim -# ,,y,script,./test.sh -f tsim/parser/last_groupby.sim -# ,,y,script,./test.sh -f tsim/parser/lastrow.sim -# ,,y,script,./test.sh -f tsim/parser/lastrow2.sim -# ,,y,script,./test.sh -f tsim/parser/like.sim -# ,,y,script,./test.sh -f tsim/parser/limit.sim -# ,,y,script,./test.sh -f tsim/parser/mixed_blocks.sim -# ,,y,script,./test.sh -f tsim/parser/nchar.sim -# ,,y,script,./test.sh -f tsim/parser/null_char.sim -# ,,y,script,./test.sh -f tsim/parser/precision_ns.sim -# ,,y,script,./test.sh -f tsim/parser/projection_limit_offset.sim -# ,,y,script,./test.sh -f tsim/parser/regex.sim -# ,,y,script,./test.sh -f tsim/parser/regressiontest.sim -# ,,y,script,./test.sh -f tsim/parser/select_across_vnodes.sim -# ,,y,script,./test.sh -f tsim/parser/select_distinct_tag.sim -# ,,y,script,./test.sh -f tsim/parser/select_from_cache_disk.sim -# ,,y,script,./test.sh -f tsim/parser/select_with_tags.sim -# ,,y,script,./test.sh -f tsim/parser/selectResNum.sim -# ,,y,script,./test.sh -f tsim/parser/set_tag_vals.sim -# ,,y,script,./test.sh -f tsim/parser/single_row_in_tb.sim -# ,,y,script,./test.sh -f tsim/parser/slimit_alter_tags.sim -# ,,y,script,./test.sh -f tsim/parser/slimit.sim -# ,,y,script,./test.sh -f tsim/parser/slimit1.sim -# ,,y,script,./test.sh -f tsim/parser/stableOp.sim -# ,,y,script,./test.sh -f tsim/parser/tags_dynamically_specifiy.sim -# ,,y,script,./test.sh -f tsim/parser/tags_filter.sim -# ,,y,script,./test.sh -f tsim/parser/tbnameIn.sim -# ,,y,script,./test.sh -f tsim/parser/timestamp.sim -# ,,y,script,./test.sh -f tsim/parser/top_groupby.sim -# ,,y,script,./test.sh -f tsim/parser/topbot.sim -# ,,y,script,./test.sh -f tsim/parser/union_sysinfo.sim -# ,,y,script,./test.sh -f tsim/parser/slimit_limit.sim -# ,,y,script,./test.sh -f tsim/parser/table_merge_limit.sim -# ,,y,script,./test.sh -f tsim/query/tagLikeFilter.sim -# ,,y,script,./test.sh -f tsim/query/charScalarFunction.sim -# ,,y,script,./test.sh -f tsim/query/explain.sim -# ,,y,script,./test.sh -f tsim/query/interval-offset.sim -# ,,y,script,./test.sh -f tsim/query/interval.sim -# ,,y,script,./test.sh -f tsim/query/scalarFunction.sim -# ,,y,script,./test.sh -f tsim/query/scalarNull.sim -# ,,y,script,./test.sh -f tsim/query/session.sim -# ,,y,script,./test.sh -f tsim/query/udf.sim -# ,,n,script,./test.sh -f tsim/query/udfpy.sim -# ,,y,script,./test.sh -f tsim/query/udf_with_const.sim -# ,,y,script,./test.sh -f tsim/query/join_interval.sim -# ,,y,script,./test.sh -f tsim/query/join_pk.sim -# ,,y,script,./test.sh -f tsim/query/join_order.sim -# ,,y,script,./test.sh -f tsim/query/count_spread.sim -# ,,y,script,./test.sh -f tsim/query/unionall_as_table.sim -# ,,y,script,./test.sh -f tsim/query/multi_order_by.sim -# ,,y,script,./test.sh -f tsim/query/sys_tbname.sim -# ,,y,script,./test.sh -f tsim/query/sort-pre-cols.sim -# ,,y,script,./test.sh -f tsim/query/groupby.sim -# ,,y,script,./test.sh -f tsim/query/groupby_distinct.sim -# ,,y,script,./test.sh -f tsim/query/event.sim -# ,,y,script,./test.sh -f tsim/query/forceFill.sim -# ,,y,script,./test.sh -f tsim/query/emptyTsRange.sim -# ,,y,script,./test.sh -f tsim/query/emptyTsRange_scl.sim -# ,,y,script,./test.sh -f tsim/query/partitionby.sim -# ,,y,script,./test.sh -f tsim/query/tableCount.sim -# ,,y,script,./test.sh -f tsim/query/show_db_table_kind.sim -# ,,y,script,./test.sh -f tsim/query/bi_star_table.sim -# ,,y,script,./test.sh -f tsim/query/bi_tag_scan.sim -# ,,y,script,./test.sh -f tsim/query/bi_tbname_col.sim -# ,,y,script,./test.sh -f tsim/query/tag_scan.sim -# ,,y,script,./test.sh -f tsim/query/nullColSma.sim -# ,,y,script,./test.sh -f tsim/query/bug3398.sim -# ,,y,script,./test.sh -f tsim/query/explain_tsorder.sim -# ,,y,script,./test.sh -f tsim/query/apercentile.sim -# ,,y,script,./test.sh -f tsim/query/query_count0.sim -# ,,y,script,./test.sh -f tsim/query/query_count_sliding0.sim -# ,,y,script,./test.sh -f tsim/query/union_precision.sim -# ,,y,script,./test.sh -f tsim/qnode/basic1.sim -# ,,y,script,./test.sh -f tsim/snode/basic1.sim -# ,,y,script,./test.sh -f tsim/mnode/basic1.sim -# ,,y,script,./test.sh -f tsim/mnode/basic2.sim -# ,,y,script,./test.sh -f tsim/mnode/basic3.sim -# ,,y,script,./test.sh -f tsim/mnode/basic4.sim -# ,,y,script,./test.sh -f tsim/mnode/basic5.sim -# ,,y,script,./test.sh -f tsim/show/basic.sim -# ,,y,script,./test.sh -f tsim/table/autocreate.sim -# ,,y,script,./test.sh -f tsim/table/basic1.sim -# ,,y,script,./test.sh -f tsim/table/basic2.sim -# ,,y,script,./test.sh -f tsim/table/basic3.sim -# ,,y,script,./test.sh -f tsim/table/bigint.sim -# ,,y,script,./test.sh -f tsim/table/binary.sim -# ,,y,script,./test.sh -f tsim/table/bool.sim -# ,,y,script,./test.sh -f tsim/table/column_name.sim -# ,,y,script,./test.sh -f tsim/table/column_num.sim -# ,,y,script,./test.sh -f tsim/table/column_value.sim -# ,,y,script,./test.sh -f tsim/table/column2.sim -# ,,y,script,./test.sh -f tsim/table/createmulti.sim -# ,,y,script,./test.sh -f tsim/table/date.sim -# ,,y,script,./test.sh -f tsim/table/db.table.sim -# ,,y,script,./test.sh -f tsim/table/delete_reuse1.sim -# ,,y,script,./test.sh -f tsim/table/delete_reuse2.sim -# ,,y,script,./test.sh -f tsim/table/delete_writing.sim -# ,,y,script,./test.sh -f tsim/table/describe.sim -# ,,y,script,./test.sh -f tsim/table/double.sim -# ,,y,script,./test.sh -f tsim/table/float.sim -# ,,y,script,./test.sh -f tsim/table/hash.sim -# ,,y,script,./test.sh -f tsim/table/int.sim -# ,,y,script,./test.sh -f tsim/table/limit.sim -# ,,y,script,./test.sh -f tsim/table/smallint.sim -# ,,y,script,./test.sh -f tsim/table/table_len.sim -# ,,y,script,./test.sh -f tsim/table/table.sim -# ,,y,script,./test.sh -f tsim/table/tinyint.sim -# ,,y,script,./test.sh -f tsim/table/vgroup.sim -# ,,n,script,./test.sh -f tsim/stream/basic0.sim -g -# ,,y,script,./test.sh -f tsim/stream/basic1.sim -# ,,y,script,./test.sh -f tsim/stream/basic2.sim -# ,,y,script,./test.sh -f tsim/stream/basic3.sim -# ,,y,script,./test.sh -f tsim/stream/basic4.sim -# ,,y,script,./test.sh -f tsim/stream/checkpointInterval0.sim -# ,,y,script,./test.sh -f tsim/stream/checkStreamSTable1.sim -# ,,y,script,./test.sh -f tsim/stream/checkStreamSTable.sim -# ,,y,script,./test.sh -f tsim/stream/count0.sim -# ,,y,script,./test.sh -f tsim/stream/count1.sim -# ,,y,script,./test.sh -f tsim/stream/count2.sim -# ,,y,script,./test.sh -f tsim/stream/count3.sim -# ,,y,script,./test.sh -f tsim/stream/countSliding0.sim -# ,,y,script,./test.sh -f tsim/stream/countSliding1.sim -# ,,y,script,./test.sh -f tsim/stream/countSliding2.sim -# ,,y,script,./test.sh -f tsim/stream/deleteInterval.sim -# ,,y,script,./test.sh -f tsim/stream/deleteScalar.sim -# ,,y,script,./test.sh -f tsim/stream/deleteSession.sim -# ,,y,script,./test.sh -f tsim/stream/deleteState.sim -# ,,y,script,./test.sh -f tsim/stream/distributeInterval0.sim -# ,,y,script,./test.sh -f tsim/stream/distributeIntervalRetrive0.sim -# ,,y,script,./test.sh -f tsim/stream/distributeMultiLevelInterval0.sim -# ,,y,script,./test.sh -f tsim/stream/distributeSession0.sim -# ,,y,script,./test.sh -f tsim/stream/drop_stream.sim -# ,,y,script,./test.sh -f tsim/stream/event0.sim -# ,,y,script,./test.sh -f tsim/stream/event1.sim -# ,,y,script,./test.sh -f tsim/stream/event2.sim -# ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic1.sim -# ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic2.sim -# ,,y,script,./test.sh -f tsim/stream/fillHistoryBasic3.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalDelete0.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalDelete1.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalLinear.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalPartitionBy.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext1.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalPrevNext.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalRange.sim -# ,,y,script,./test.sh -f tsim/stream/fillIntervalValue.sim -# ,,y,script,./test.sh -f tsim/stream/ignoreCheckUpdate.sim -# ,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim -# ,,y,script,./test.sh -f tsim/stream/partitionby1.sim -# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim -# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnOther.sim -# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim -# ,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim -# ,,y,script,./test.sh -f tsim/stream/partitionby.sim -# ,,y,script,./test.sh -f tsim/stream/pauseAndResume.sim -# ,,y,script,./test.sh -f tsim/stream/schedSnode.sim -# ,,y,script,./test.sh -f tsim/stream/session0.sim -# ,,y,script,./test.sh -f tsim/stream/session1.sim -# ,,y,script,./test.sh -f tsim/stream/sliding.sim -# ,,y,script,./test.sh -f tsim/stream/state0.sim -# ,,y,script,./test.sh -f tsim/stream/state1.sim -# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey0.sim -# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey1.sim -# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey2.sim -# ,,y,script,./test.sh -f tsim/stream/streamPrimaryKey3.sim -# ,,y,script,./test.sh -f tsim/stream/triggerInterval0.sim -# ,,y,script,./test.sh -f tsim/stream/triggerSession0.sim -# ,,y,script,./test.sh -f tsim/stream/udTableAndCol0.sim -# ,,y,script,./test.sh -f tsim/stream/udTableAndTag0.sim -# ,,y,script,./test.sh -f tsim/stream/udTableAndTag1.sim -# ,,y,script,./test.sh -f tsim/stream/udTableAndTag2.sim -# ,,y,script,./test.sh -f tsim/stream/windowClose.sim -# ,,y,script,./test.sh -f tsim/trans/lossdata1.sim -# ,,y,script,./test.sh -f tsim/tmq/basic1.sim -# ,,y,script,./test.sh -f tsim/tmq/basic2.sim -# ,,y,script,./test.sh -f tsim/tmq/basic3.sim -# ,,y,script,./test.sh -f tsim/tmq/basic4.sim -# ,,y,script,./test.sh -f tsim/tmq/basic1Of2Cons.sim -# ,,y,script,./test.sh -f tsim/tmq/basic2Of2Cons.sim -# ,,y,script,./test.sh -f tsim/tmq/basic3Of2Cons.sim -# ,,y,script,./test.sh -f tsim/tmq/basic4Of2Cons.sim -# ,,y,script,./test.sh -f tsim/tmq/topic.sim -# ,,y,script,./test.sh -f tsim/tmq/snapshot.sim -# ,,y,script,./test.sh -f tsim/tmq/snapshot1.sim -# ,,y,script,./test.sh -f tsim/stable/alter_comment.sim -# ,,y,script,./test.sh -f tsim/stable/alter_count.sim -# ,,y,script,./test.sh -f tsim/stable/alter_import.sim -# ,,y,script,./test.sh -f tsim/stable/alter_insert1.sim -# ,,y,script,./test.sh -f tsim/stable/alter_insert2.sim -# ,,y,script,./test.sh -f tsim/stable/alter_metrics.sim -# ,,y,script,./test.sh -f tsim/stable/column_add.sim -# ,,y,script,./test.sh -f tsim/stable/column_drop.sim -# ,,y,script,./test.sh -f tsim/stable/column_modify.sim -# ,,y,script,./test.sh -f tsim/stable/disk.sim -# ,,y,script,./test.sh -f tsim/stable/dnode3.sim -# ,,y,script,./test.sh -f tsim/stable/metrics.sim -# ,,y,script,./test.sh -f tsim/stable/refcount.sim -# ,,y,script,./test.sh -f tsim/stable/tag_add.sim -# ,,y,script,./test.sh -f tsim/stable/tag_drop.sim -# ,,y,script,./test.sh -f tsim/stable/tag_filter.sim -# ,,y,script,./test.sh -f tsim/stable/tag_modify.sim -# ,,y,script,./test.sh -f tsim/stable/tag_rename.sim -# ,,y,script,./test.sh -f tsim/stable/values.sim -# ,,y,script,./test.sh -f tsim/stable/vnode3.sim -# ,,n,script,./test.sh -f tsim/sma/drop_sma.sim -# ,,y,script,./test.sh -f tsim/sma/sma_leak.sim -# ,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim -# ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim -# ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQueryDelete.sim - -# ### refactor stream backend, open case after rsma refactored -# #,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim -# ,,y,script,./test.sh -f tsim/sync/vnodesnapshot-rsma-test.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError1.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError2.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError3.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError4.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError5.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkError8.sim -# ,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim -# ,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim -# ,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim -# ,,y,script,./test.sh -f tsim/vnode/replica3_import.sim -# ,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim -# ,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim -# ,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim -# ,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim -# ,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim -# ,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim -# ,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim -# ,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim -# ,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim -# ,,y,script,./test.sh -f tsim/scalar/in.sim -# ,,y,script,./test.sh -f tsim/scalar/scalar.sim -# ,,y,script,./test.sh -f tsim/scalar/filter.sim -# ,,y,script,./test.sh -f tsim/scalar/caseWhen.sim -# ,,y,script,./test.sh -f tsim/scalar/tsConvert.sim -# ,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim -# ,,y,script,./test.sh -f tsim/alter/dnode.sim -# ,,y,script,./test.sh -f tsim/alter/table.sim -# ,,y,script,./test.sh -f tsim/cache/new_metrics.sim -# ,,y,script,./test.sh -f tsim/cache/restart_table.sim -# ,,y,script,./test.sh -f tsim/cache/restart_metrics.sim -# ,,y,script,./test.sh -f tsim/column/commit.sim -# ,,y,script,./test.sh -f tsim/column/metrics.sim -# ,,y,script,./test.sh -f tsim/column/table.sim -# ,,y,script,./test.sh -f tsim/compress/commitlog.sim -# ,,y,script,./test.sh -f tsim/compress/compress2.sim -# ,,y,script,./test.sh -f tsim/compress/compress.sim -# ,,y,script,./test.sh -f tsim/compress/compress_col.sim -# ,,y,script,./test.sh -f tsim/compress/uncompress.sim -# ,,y,script,./test.sh -f tsim/compute/avg.sim -# ,,y,script,./test.sh -f tsim/compute/block_dist.sim -# ,,y,script,./test.sh -f tsim/compute/bottom.sim -# ,,y,script,./test.sh -f tsim/compute/count.sim -# ,,y,script,./test.sh -f tsim/compute/diff.sim -# ,,y,script,./test.sh -f tsim/compute/diff2.sim -# ,,y,script,./test.sh -f tsim/compute/first.sim -# ,,y,script,./test.sh -f tsim/compute/interval.sim -# ,,y,script,./test.sh -f tsim/compute/last_row.sim -# ,,y,script,./test.sh -f tsim/compute/last.sim -# ,,y,script,./test.sh -f tsim/compute/leastsquare.sim -# ,,y,script,./test.sh -f tsim/compute/max.sim -# ,,y,script,./test.sh -f tsim/compute/min.sim -# ,,y,script,./test.sh -f tsim/compute/null.sim -# ,,y,script,./test.sh -f tsim/compute/percentile.sim -# ,,y,script,./test.sh -f tsim/compute/stddev.sim -# ,,y,script,./test.sh -f tsim/compute/sum.sim -# ,,y,script,./test.sh -f tsim/compute/top.sim -# ,,y,script,./test.sh -f tsim/field/2.sim -# ,,y,script,./test.sh -f tsim/field/3.sim -# ,,y,script,./test.sh -f tsim/field/4.sim -# ,,y,script,./test.sh -f tsim/field/5.sim -# ,,y,script,./test.sh -f tsim/field/6.sim -# ,,y,script,./test.sh -f tsim/field/binary.sim -# ,,y,script,./test.sh -f tsim/field/bigint.sim -# ,,y,script,./test.sh -f tsim/field/bool.sim -# ,,y,script,./test.sh -f tsim/field/double.sim -# ,,y,script,./test.sh -f tsim/field/float.sim -# ,,y,script,./test.sh -f tsim/field/int.sim -# ,,y,script,./test.sh -f tsim/field/single.sim -# ,,y,script,./test.sh -f tsim/field/smallint.sim -# ,,y,script,./test.sh -f tsim/field/tinyint.sim -# ,,y,script,./test.sh -f tsim/field/unsigined_bigint.sim -# ,,y,script,./test.sh -f tsim/vector/metrics_field.sim -# ,,y,script,./test.sh -f tsim/vector/metrics_mix.sim -# ,,y,script,./test.sh -f tsim/vector/metrics_query.sim -# ,,y,script,./test.sh -f tsim/vector/metrics_tag.sim -# ,,y,script,./test.sh -f tsim/vector/metrics_time.sim -# ,,y,script,./test.sh -f tsim/vector/multi.sim -# ,,y,script,./test.sh -f tsim/vector/single.sim -# ,,y,script,./test.sh -f tsim/vector/table_field.sim -# ,,y,script,./test.sh -f tsim/vector/table_mix.sim -# ,,y,script,./test.sh -f tsim/vector/table_query.sim -# ,,y,script,./test.sh -f tsim/vector/table_time.sim -# ,,y,script,./test.sh -f tsim/wal/kill.sim -# ,,y,script,./test.sh -f tsim/tag/3.sim -# ,,y,script,./test.sh -f tsim/tag/4.sim -# ,,y,script,./test.sh -f tsim/tag/5.sim -# ,,y,script,./test.sh -f tsim/tag/6.sim -# ,,y,script,./test.sh -f tsim/tag/add.sim -# ,,y,script,./test.sh -f tsim/tag/bigint.sim -# ,,y,script,./test.sh -f tsim/tag/binary_binary.sim -# ,,y,script,./test.sh -f tsim/tag/binary.sim -# ,,y,script,./test.sh -f tsim/tag/bool_binary.sim -# ,,y,script,./test.sh -f tsim/tag/bool_int.sim -# ,,y,script,./test.sh -f tsim/tag/bool.sim -# ,,y,script,./test.sh -f tsim/tag/change.sim -# ,,y,script,./test.sh -f tsim/tag/column.sim -# ,,y,script,./test.sh -f tsim/tag/commit.sim -# ,,y,script,./test.sh -f tsim/tag/create.sim -# ,,y,script,./test.sh -f tsim/tag/delete.sim -# ,,y,script,./test.sh -f tsim/tag/double.sim -# ,,y,script,./test.sh -f tsim/tag/filter.sim -# ,,y,script,./test.sh -f tsim/tag/float.sim -# ,,y,script,./test.sh -f tsim/tag/int_binary.sim -# ,,y,script,./test.sh -f tsim/tag/int_float.sim -# ,,y,script,./test.sh -f tsim/tag/int.sim -# ,,y,script,./test.sh -f tsim/tag/set.sim -# ,,y,script,./test.sh -f tsim/tag/smallint.sim -# ,,y,script,./test.sh -f tsim/tag/tinyint.sim -# ,,y,script,./test.sh -f tsim/tag/drop_tag.sim -# ,,y,script,./test.sh -f tsim/tag/tbNameIn.sim -# ,,y,script,./test.sh -f tmp/monitor.sim -# ,,y,script,./test.sh -f tsim/tagindex/add_index.sim -# ,,n,script,./test.sh -f tsim/tagindex/sma_and_tag_index.sim -# ,,y,script,./test.sh -f tsim/tagindex/indexOverflow.sim -# ,,y,script,./test.sh -f tsim/view/view.sim -# ,,y,script,./test.sh -f tsim/query/cache_last.sim -# ,,y,script,./test.sh -f tsim/query/const.sim -# ,,y,script,./test.sh -f tsim/query/nestedJoinView.sim +### refactor stream backend, open case after rsma refactored +#,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim +,,y,script,./test.sh -f tsim/sync/vnodesnapshot-rsma-test.sim +,,n,script,./test.sh -f tsim/valgrind/checkError1.sim +,,n,script,./test.sh -f tsim/valgrind/checkError2.sim +,,n,script,./test.sh -f tsim/valgrind/checkError3.sim +,,n,script,./test.sh -f tsim/valgrind/checkError4.sim +,,n,script,./test.sh -f tsim/valgrind/checkError5.sim +,,n,script,./test.sh -f tsim/valgrind/checkError8.sim +,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim +,,y,script,./test.sh -f tsim/vnode/replica3_basic.sim +,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim +,,y,script,./test.sh -f tsim/vnode/replica3_import.sim +,,y,script,./test.sh -f tsim/vnode/stable_balance_replica1.sim +,,y,script,./test.sh -f tsim/vnode/stable_dnode2_stop.sim +,,y,script,./test.sh -f tsim/vnode/stable_dnode2.sim +,,y,script,./test.sh -f tsim/vnode/stable_dnode3.sim +,,y,script,./test.sh -f tsim/vnode/stable_replica3_dnode6.sim +,,y,script,./test.sh -f tsim/vnode/stable_replica3_vnode3.sim +,,y,script,./test.sh -f tsim/sync/oneReplica1VgElect.sim +,,y,script,./test.sh -f tsim/sync/oneReplica5VgElect.sim +,,y,script,./test.sh -f tsim/catalog/alterInCurrent.sim +,,y,script,./test.sh -f tsim/scalar/in.sim +,,y,script,./test.sh -f tsim/scalar/scalar.sim +,,y,script,./test.sh -f tsim/scalar/filter.sim +,,y,script,./test.sh -f tsim/scalar/caseWhen.sim +,,y,script,./test.sh -f tsim/scalar/tsConvert.sim +,,y,script,./test.sh -f tsim/alter/cached_schema_after_alter.sim +,,y,script,./test.sh -f tsim/alter/dnode.sim +,,y,script,./test.sh -f tsim/alter/table.sim +,,y,script,./test.sh -f tsim/cache/new_metrics.sim +,,y,script,./test.sh -f tsim/cache/restart_table.sim +,,y,script,./test.sh -f tsim/cache/restart_metrics.sim +,,y,script,./test.sh -f tsim/column/commit.sim +,,y,script,./test.sh -f tsim/column/metrics.sim +,,y,script,./test.sh -f tsim/column/table.sim +,,y,script,./test.sh -f tsim/compress/commitlog.sim +,,y,script,./test.sh -f tsim/compress/compress2.sim +,,y,script,./test.sh -f tsim/compress/compress.sim +,,y,script,./test.sh -f tsim/compress/compress_col.sim +,,y,script,./test.sh -f tsim/compress/uncompress.sim +,,y,script,./test.sh -f tsim/compute/avg.sim +,,y,script,./test.sh -f tsim/compute/block_dist.sim +,,y,script,./test.sh -f tsim/compute/bottom.sim +,,y,script,./test.sh -f tsim/compute/count.sim +,,y,script,./test.sh -f tsim/compute/diff.sim +,,y,script,./test.sh -f tsim/compute/diff2.sim +,,y,script,./test.sh -f tsim/compute/first.sim +,,y,script,./test.sh -f tsim/compute/interval.sim +,,y,script,./test.sh -f tsim/compute/last_row.sim +,,y,script,./test.sh -f tsim/compute/last.sim +,,y,script,./test.sh -f tsim/compute/leastsquare.sim +,,y,script,./test.sh -f tsim/compute/max.sim +,,y,script,./test.sh -f tsim/compute/min.sim +,,y,script,./test.sh -f tsim/compute/null.sim +,,y,script,./test.sh -f tsim/compute/percentile.sim +,,y,script,./test.sh -f tsim/compute/stddev.sim +,,y,script,./test.sh -f tsim/compute/sum.sim +,,y,script,./test.sh -f tsim/compute/top.sim +,,y,script,./test.sh -f tsim/field/2.sim +,,y,script,./test.sh -f tsim/field/3.sim +,,y,script,./test.sh -f tsim/field/4.sim +,,y,script,./test.sh -f tsim/field/5.sim +,,y,script,./test.sh -f tsim/field/6.sim +,,y,script,./test.sh -f tsim/field/binary.sim +,,y,script,./test.sh -f tsim/field/bigint.sim +,,y,script,./test.sh -f tsim/field/bool.sim +,,y,script,./test.sh -f tsim/field/double.sim +,,y,script,./test.sh -f tsim/field/float.sim +,,y,script,./test.sh -f tsim/field/int.sim +,,y,script,./test.sh -f tsim/field/single.sim +,,y,script,./test.sh -f tsim/field/smallint.sim +,,y,script,./test.sh -f tsim/field/tinyint.sim +,,y,script,./test.sh -f tsim/field/unsigined_bigint.sim +,,y,script,./test.sh -f tsim/vector/metrics_field.sim +,,y,script,./test.sh -f tsim/vector/metrics_mix.sim +,,y,script,./test.sh -f tsim/vector/metrics_query.sim +,,y,script,./test.sh -f tsim/vector/metrics_tag.sim +,,y,script,./test.sh -f tsim/vector/metrics_time.sim +,,y,script,./test.sh -f tsim/vector/multi.sim +,,y,script,./test.sh -f tsim/vector/single.sim +,,y,script,./test.sh -f tsim/vector/table_field.sim +,,y,script,./test.sh -f tsim/vector/table_mix.sim +,,y,script,./test.sh -f tsim/vector/table_query.sim +,,y,script,./test.sh -f tsim/vector/table_time.sim +,,y,script,./test.sh -f tsim/wal/kill.sim +,,y,script,./test.sh -f tsim/tag/3.sim +,,y,script,./test.sh -f tsim/tag/4.sim +,,y,script,./test.sh -f tsim/tag/5.sim +,,y,script,./test.sh -f tsim/tag/6.sim +,,y,script,./test.sh -f tsim/tag/add.sim +,,y,script,./test.sh -f tsim/tag/bigint.sim +,,y,script,./test.sh -f tsim/tag/binary_binary.sim +,,y,script,./test.sh -f tsim/tag/binary.sim +,,y,script,./test.sh -f tsim/tag/bool_binary.sim +,,y,script,./test.sh -f tsim/tag/bool_int.sim +,,y,script,./test.sh -f tsim/tag/bool.sim +,,y,script,./test.sh -f tsim/tag/change.sim +,,y,script,./test.sh -f tsim/tag/column.sim +,,y,script,./test.sh -f tsim/tag/commit.sim +,,y,script,./test.sh -f tsim/tag/create.sim +,,y,script,./test.sh -f tsim/tag/delete.sim +,,y,script,./test.sh -f tsim/tag/double.sim +,,y,script,./test.sh -f tsim/tag/filter.sim +,,y,script,./test.sh -f tsim/tag/float.sim +,,y,script,./test.sh -f tsim/tag/int_binary.sim +,,y,script,./test.sh -f tsim/tag/int_float.sim +,,y,script,./test.sh -f tsim/tag/int.sim +,,y,script,./test.sh -f tsim/tag/set.sim +,,y,script,./test.sh -f tsim/tag/smallint.sim +,,y,script,./test.sh -f tsim/tag/tinyint.sim +,,y,script,./test.sh -f tsim/tag/drop_tag.sim +,,y,script,./test.sh -f tsim/tag/tbNameIn.sim +,,y,script,./test.sh -f tmp/monitor.sim +,,y,script,./test.sh -f tsim/tagindex/add_index.sim +,,n,script,./test.sh -f tsim/tagindex/sma_and_tag_index.sim +,,y,script,./test.sh -f tsim/tagindex/indexOverflow.sim +,,y,script,./test.sh -f tsim/view/view.sim +,,y,script,./test.sh -f tsim/query/cache_last.sim +,,y,script,./test.sh -f tsim/query/const.sim +,,y,script,./test.sh -f tsim/query/nestedJoinView.sim -# #develop test -# ,,n,develop-test,python3 ./test.py -f 2-query/table_count_scan.py -# ,,n,develop-test,python3 ./test.py -f 2-query/pseudo_column.py -# ,,n,develop-test,python3 ./test.py -f 2-query/ts-range.py -# ,,n,develop-test,python3 ./test.py -f 2-query/tag_scan.py -# ,,n,develop-test,python3 ./test.py -f 2-query/show_create_db.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/custom_col_tag.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/default_json.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insert_alltypes_json.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/invalid_commandline.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/json_tag.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/query_json.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sample_csv_json.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_json_alltypes.py -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/taosdemoTestQueryWithJson.py -R -# ,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/telnet_tcp.py -R +#develop test +,,n,develop-test,python3 ./test.py -f 2-query/table_count_scan.py +,,n,develop-test,python3 ./test.py -f 2-query/pseudo_column.py +,,n,develop-test,python3 ./test.py -f 2-query/ts-range.py +,,n,develop-test,python3 ./test.py -f 2-query/tag_scan.py +,,n,develop-test,python3 ./test.py -f 2-query/show_create_db.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/auto_create_table_json.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/custom_col_tag.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/default_json.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/insert_alltypes_json.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/invalid_commandline.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/json_tag.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/query_json.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sample_csv_json.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/sml_json_alltypes.py +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/taosdemoTestQueryWithJson.py -R +,,n,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/telnet_tcp.py -R -# #docs-examples test -# ,,n,docs-examples-test,bash python.sh -# #,,n,docs-examples-test,bash node.sh -# ,,n,docs-examples-test,bash csharp.sh -# ,,n,docs-examples-test,bash jdbc.sh -# ,,n,docs-examples-test,bash go.sh -# ,,n,docs-examples-test,bash test_R.sh +#docs-examples test +,,n,docs-examples-test,bash python.sh +#,,n,docs-examples-test,bash node.sh +,,n,docs-examples-test,bash csharp.sh +,,n,docs-examples-test,bash jdbc.sh +,,n,docs-examples-test,bash go.sh +,,n,docs-examples-test,bash test_R.sh From cfe7c552bc164c705a330416f45bc978cfb66149 Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 16 Jul 2024 03:25:30 +0000 Subject: [PATCH 06/45] fix/TD-30989 --- source/dnode/mnode/sdb/src/sdb.c | 19 +-- source/dnode/mnode/sdb/src/sdbFile.c | 193 +++++++++++++++------------ source/dnode/mnode/sdb/src/sdbRaw.c | 131 ++++++++++-------- 3 files changed, 189 insertions(+), 154 deletions(-) diff --git a/source/dnode/mnode/sdb/src/sdb.c b/source/dnode/mnode/sdb/src/sdb.c index c4b32fe87c..70cbe06496 100644 --- a/source/dnode/mnode/sdb/src/sdb.c +++ b/source/dnode/mnode/sdb/src/sdb.c @@ -112,6 +112,8 @@ void sdbCleanup(SSdb *pSdb) { } int32_t sdbSetTable(SSdb *pSdb, SSdbTable table) { + int32_t code = 0; + ESdbType sdbType = table.sdbType; EKeyType keyType = table.keyType; pSdb->keyTypes[sdbType] = table.keyType; @@ -134,8 +136,8 @@ int32_t sdbSetTable(SSdb *pSdb, SSdbTable table) { SHashObj *hash = taosHashInit(64, taosGetDefaultHashFunction(hashType), true, HASH_ENTRY_LOCK); if (hash == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return -1; + code = TSDB_CODE_OUT_OF_MEMORY; + TAOS_RETURN(code); } pSdb->maxId[sdbType] = 0; @@ -146,16 +148,17 @@ int32_t sdbSetTable(SSdb *pSdb, SSdbTable table) { } static int32_t sdbCreateDir(SSdb *pSdb) { + int32_t code = 0; if (taosMulMkDir(pSdb->currDir) != 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to create dir:%s since %s", pSdb->currDir, terrstr()); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to create dir:%s since %s", pSdb->currDir, tstrerror(code)); + TAOS_RETURN(code); } if (taosMkDir(pSdb->tmpDir) != 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to create dir:%s since %s", pSdb->tmpDir, terrstr()); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to create dir:%s since %s", pSdb->tmpDir, tstrerror(code)); + TAOS_RETURN(code); } return 0; diff --git a/source/dnode/mnode/sdb/src/sdbFile.c b/source/dnode/mnode/sdb/src/sdbFile.c index d94650695c..efa29a2ed5 100644 --- a/source/dnode/mnode/sdb/src/sdbFile.c +++ b/source/dnode/mnode/sdb/src/sdbFile.c @@ -26,6 +26,7 @@ #define SDB_FILE_VER 1 static int32_t sdbDeployData(SSdb *pSdb) { + int32_t code = 0; mInfo("start to deploy sdb"); for (int32_t i = SDB_MAX - 1; i >= 0; --i) { @@ -33,8 +34,9 @@ static int32_t sdbDeployData(SSdb *pSdb) { if (fp == NULL) continue; mInfo("start to deploy sdb:%s", sdbTableName(i)); - if ((*fp)(pSdb->pMnode) != 0) { - mError("failed to deploy sdb:%s since %s", sdbTableName(i), terrstr()); + code = (*fp)(pSdb->pMnode); + if (code != 0) { + mError("failed to deploy sdb:%s since %s", sdbTableName(i), tstrerror(code)); return -1; } } @@ -80,61 +82,62 @@ static void sdbResetData(SSdb *pSdb) { } static int32_t sdbReadFileHead(SSdb *pSdb, TdFilePtr pFile) { + int32_t code = 0; int64_t sver = 0; int32_t ret = taosReadFile(pFile, &sver, sizeof(int64_t)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(int64_t)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } if (sver != SDB_FILE_VER) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } ret = taosReadFile(pFile, &pSdb->applyIndex, sizeof(int64_t)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(int64_t)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } ret = taosReadFile(pFile, &pSdb->applyTerm, sizeof(int64_t)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(int64_t)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } ret = taosReadFile(pFile, &pSdb->applyConfig, sizeof(int64_t)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(int64_t)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } for (int32_t i = 0; i < SDB_TABLE_SIZE; ++i) { int64_t maxId = 0; ret = taosReadFile(pFile, &maxId, sizeof(int64_t)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(int64_t)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } if (i < SDB_MAX) { pSdb->maxId[i] = maxId; @@ -145,12 +148,12 @@ static int32_t sdbReadFileHead(SSdb *pSdb, TdFilePtr pFile) { int64_t ver = 0; ret = taosReadFile(pFile, &ver, sizeof(int64_t)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(int64_t)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } if (i < SDB_MAX) { pSdb->tableVer[i] = ver; @@ -160,37 +163,38 @@ static int32_t sdbReadFileHead(SSdb *pSdb, TdFilePtr pFile) { char reserve[SDB_RESERVE_SIZE] = {0}; ret = taosReadFile(pFile, reserve, sizeof(reserve)); if (ret < 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (ret != sizeof(reserve)) { - terrno = TSDB_CODE_FILE_CORRUPTED; - return -1; + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); } return 0; } static int32_t sdbWriteFileHead(SSdb *pSdb, TdFilePtr pFile) { + int32_t code = 0; int64_t sver = SDB_FILE_VER; if (taosWriteFile(pFile, &sver, sizeof(int64_t)) != sizeof(int64_t)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (taosWriteFile(pFile, &pSdb->applyIndex, sizeof(int64_t)) != sizeof(int64_t)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (taosWriteFile(pFile, &pSdb->applyTerm, sizeof(int64_t)) != sizeof(int64_t)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } if (taosWriteFile(pFile, &pSdb->applyConfig, sizeof(int64_t)) != sizeof(int64_t)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } for (int32_t i = 0; i < SDB_TABLE_SIZE; ++i) { @@ -199,8 +203,8 @@ static int32_t sdbWriteFileHead(SSdb *pSdb, TdFilePtr pFile) { maxId = pSdb->maxId[i]; } if (taosWriteFile(pFile, &maxId, sizeof(int64_t)) != sizeof(int64_t)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } } @@ -210,15 +214,15 @@ static int32_t sdbWriteFileHead(SSdb *pSdb, TdFilePtr pFile) { ver = pSdb->tableVer[i]; } if (taosWriteFile(pFile, &ver, sizeof(int64_t)) != sizeof(int64_t)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } } char reserve[SDB_RESERVE_SIZE] = {0}; if (taosWriteFile(pFile, reserve, sizeof(reserve)) != sizeof(reserve)) { - terrno = TAOS_SYSTEM_ERROR(errno); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); } return 0; @@ -237,21 +241,22 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { SSdbRaw *pRaw = taosMemoryMalloc(bufLen + 100); if (pRaw == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - mError("failed read sdb file since %s", terrstr()); - return -1; + code = TSDB_CODE_OUT_OF_MEMORY; + mError("failed read sdb file since %s", tstrerror(code)); + TAOS_RETURN(code); } TdFilePtr pFile = taosOpenFile(file, TD_FILE_READ); if (pFile == NULL) { taosMemoryFree(pRaw); - terrno = TAOS_SYSTEM_ERROR(errno); - mInfo("read sdb file:%s finished since %s", file, terrstr()); - return 0; + code = TAOS_SYSTEM_ERROR(errno); + mInfo("read sdb file:%s finished since %s", file, tstrerror(code)); + TAOS_RETURN(code); } - if (sdbReadFileHead(pSdb, pFile) != 0) { - mError("failed to read sdb file:%s head since %s", file, terrstr()); + code = sdbReadFileHead(pSdb, pFile); + if (code != 0) { + mError("failed to read sdb file:%s head since %s", file, tstrerror(code)); taosMemoryFree(pRaw); taosCloseFile(&pFile); return -1; @@ -365,7 +370,7 @@ int32_t sdbReadFile(SSdb *pSdb) { sdbResetData(pSdb); int32_t code = sdbReadFileImp(pSdb); if (code != 0) { - mError("failed to read sdb file since %s", terrstr()); + mError("failed to read sdb file since %s", tstrerror(code)); sdbResetData(pSdb); } @@ -388,13 +393,14 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { TdFilePtr pFile = taosOpenFile(tmpfile, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC); if (pFile == NULL) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to open sdb file:%s for write since %s", tmpfile, terrstr()); - return -1; + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to open sdb file:%s for write since %s", tmpfile, tstrerror(code)); + TAOS_RETURN(code); } - if (sdbWriteFileHead(pSdb, pFile) != 0) { - mError("failed to write sdb file:%s head since %s", tmpfile, terrstr()); + code = sdbWriteFileHead(pSdb, pFile); + if (code != 0) { + mError("failed to write sdb file:%s head since %s", tmpfile, tstrerror(code)); taosCloseFile(&pFile); return -1; } @@ -549,19 +555,22 @@ int32_t sdbWriteFile(SSdb *pSdb, int32_t delta) { } } if (code != 0) { - mError("failed to write sdb file since %s", terrstr()); + mError("failed to write sdb file since %s", tstrerror(code)); } taosThreadMutexUnlock(&pSdb->filelock); return code; } int32_t sdbDeploy(SSdb *pSdb) { - if (sdbDeployData(pSdb) != 0) { - return -1; + int32_t code = 0; + code = sdbDeployData(pSdb); + if (code != 0) { + TAOS_RETURN(code); } - if (sdbWriteFile(pSdb, 0) != 0) { - return -1; + code = sdbWriteFile(pSdb, 0); + if (code != 0) { + TAOS_RETURN(code); } return 0; @@ -605,6 +614,7 @@ static void sdbCloseIter(SSdbIter *pIter) { } int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter, int64_t *index, int64_t *term, int64_t *config) { + int32_t code = 0; SSdbIter *pIter = sdbCreateIter(pSdb); if (pIter == NULL) return -1; @@ -617,19 +627,19 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter, int64_t *index, int64_t *ter int64_t commitConfig = pSdb->commitConfig; if (taosCopyFile(datafile, pIter->name) < 0) { taosThreadMutexUnlock(&pSdb->filelock); - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to copy sdb file %s to %s since %s", datafile, pIter->name, terrstr()); + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to copy sdb file %s to %s since %s", datafile, pIter->name, tstrerror(code)); sdbCloseIter(pIter); - return -1; + TAOS_RETURN(code); } taosThreadMutexUnlock(&pSdb->filelock); pIter->file = taosOpenFile(pIter->name, TD_FILE_READ); if (pIter->file == NULL) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to open sdb file:%s since %s", pIter->name, terrstr()); + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to open sdb file:%s since %s", pIter->name, tstrerror(code)); sdbCloseIter(pIter); - return -1; + TAOS_RETURN(code); } *ppIter = pIter; @@ -645,21 +655,22 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter, int64_t *index, int64_t *ter void sdbStopRead(SSdb *pSdb, SSdbIter *pIter) { sdbCloseIter(pIter); } int32_t sdbDoRead(SSdb *pSdb, SSdbIter *pIter, void **ppBuf, int32_t *len) { + int32_t code = 0; int32_t maxlen = 4096; void *pBuf = taosMemoryCalloc(1, maxlen); if (pBuf == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return -1; + code = TSDB_CODE_OUT_OF_MEMORY; + TAOS_RETURN(code); } int32_t readlen = taosReadFile(pIter->file, pBuf, maxlen); if (readlen < 0 || readlen > maxlen) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("sdbiter:%p, failed to read snapshot since %s, total:%" PRId64, pIter, terrstr(), pIter->total); + code = TAOS_SYSTEM_ERROR(errno); + mError("sdbiter:%p, failed to read snapshot since %s, total:%" PRId64, pIter, tstrerror(code), pIter->total); *ppBuf = NULL; *len = 0; taosMemoryFree(pBuf); - return -1; + TAOS_RETURN(code); } else if (readlen == 0) { mInfo("sdbiter:%p, read snapshot to the end, total:%" PRId64, pIter, pIter->total); *ppBuf = NULL; @@ -676,15 +687,19 @@ int32_t sdbDoRead(SSdb *pSdb, SSdbIter *pIter, void **ppBuf, int32_t *len) { } int32_t sdbStartWrite(SSdb *pSdb, SSdbIter **ppIter) { + int32_t code = 0; SSdbIter *pIter = sdbCreateIter(pSdb); - if (pIter == NULL) return -1; + if (pIter == NULL) { + code = terrno; + TAOS_RETURN(code); + } pIter->file = taosOpenFile(pIter->name, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC); if (pIter->file == NULL) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to open %s since %s", pIter->name, terrstr()); + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to open %s since %s", pIter->name, tstrerror(code)); sdbCloseIter(pIter); - return -1; + TAOS_RETURN(code); } *ppIter = pIter; @@ -702,8 +717,8 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i } if (taosFsyncFile(pIter->file) != 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("sdbiter:%p, failed to fasync file %s since %s", pIter, pIter->name, terrstr()); + code = TAOS_SYSTEM_ERROR(errno); + mError("sdbiter:%p, failed to fasync file %s since %s", pIter, pIter->name, tstrerror(code)); goto _OVER; } @@ -713,13 +728,14 @@ int32_t sdbStopWrite(SSdb *pSdb, SSdbIter *pIter, bool isApply, int64_t index, i char datafile[PATH_MAX] = {0}; snprintf(datafile, sizeof(datafile), "%s%ssdb.data", pSdb->currDir, TD_DIRSEP); if (taosRenameFile(pIter->name, datafile) != 0) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("sdbiter:%p, failed to rename file %s to %s since %s", pIter, pIter->name, datafile, terrstr()); + code = TAOS_SYSTEM_ERROR(errno); + mError("sdbiter:%p, failed to rename file %s to %s since %s", pIter, pIter->name, datafile, tstrerror(code)); goto _OVER; } - if (sdbReadFile(pSdb) != 0) { - mError("sdbiter:%p, failed to read from %s since %s", pIter, datafile, terrstr()); + code = sdbReadFile(pSdb); + if (code != 0) { + mError("sdbiter:%p, failed to read from %s since %s", pIter, datafile, tstrerror(code)); goto _OVER; } @@ -742,10 +758,11 @@ _OVER: } int32_t sdbDoWrite(SSdb *pSdb, SSdbIter *pIter, void *pBuf, int32_t len) { + int32_t code = 0; int32_t writelen = taosWriteFile(pIter->file, pBuf, len); if (writelen != len) { - terrno = TAOS_SYSTEM_ERROR(errno); - mError("failed to write len:%d since %s, total:%" PRId64, len, terrstr(), pIter->total); + code = TAOS_SYSTEM_ERROR(errno); + mError("failed to write len:%d since %s, total:%" PRId64, len, tstrerror(code), pIter->total); return -1; } diff --git a/source/dnode/mnode/sdb/src/sdbRaw.c b/source/dnode/mnode/sdb/src/sdbRaw.c index 4f68139155..24ac2ac462 100644 --- a/source/dnode/mnode/sdb/src/sdbRaw.c +++ b/source/dnode/mnode/sdb/src/sdbRaw.c @@ -53,14 +53,15 @@ void sdbFreeRaw(SSdbRaw *pRaw) { } int32_t sdbSetRawInt8(SSdbRaw *pRaw, int32_t dataPos, int8_t val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int8_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *(int8_t *)(pRaw->pData + dataPos) = val; @@ -68,14 +69,15 @@ int32_t sdbSetRawInt8(SSdbRaw *pRaw, int32_t dataPos, int8_t val) { } int32_t sdbSetRawUInt8(SSdbRaw *pRaw, int32_t dataPos, uint8_t val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(uint8_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *(uint8_t *)(pRaw->pData + dataPos) = val; @@ -83,14 +85,15 @@ int32_t sdbSetRawUInt8(SSdbRaw *pRaw, int32_t dataPos, uint8_t val) { } int32_t sdbSetRawInt32(SSdbRaw *pRaw, int32_t dataPos, int32_t val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int32_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *(int32_t *)(pRaw->pData + dataPos) = val; @@ -98,14 +101,15 @@ int32_t sdbSetRawInt32(SSdbRaw *pRaw, int32_t dataPos, int32_t val) { } int32_t sdbSetRawInt16(SSdbRaw *pRaw, int32_t dataPos, int16_t val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int16_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *(int16_t *)(pRaw->pData + dataPos) = val; @@ -113,14 +117,15 @@ int32_t sdbSetRawInt16(SSdbRaw *pRaw, int32_t dataPos, int16_t val) { } int32_t sdbSetRawInt64(SSdbRaw *pRaw, int32_t dataPos, int64_t val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int64_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *(int64_t *)(pRaw->pData + dataPos) = val; @@ -128,14 +133,15 @@ int32_t sdbSetRawInt64(SSdbRaw *pRaw, int32_t dataPos, int64_t val) { } int32_t sdbSetRawBinary(SSdbRaw *pRaw, int32_t dataPos, const char *pVal, int32_t valLen) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + valLen > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } if (pVal != NULL) { @@ -145,14 +151,15 @@ int32_t sdbSetRawBinary(SSdbRaw *pRaw, int32_t dataPos, const char *pVal, int32_ } int32_t sdbSetRawDataLen(SSdbRaw *pRaw, int32_t dataLen) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataLen > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } pRaw->dataLen = dataLen; @@ -160,14 +167,15 @@ int32_t sdbSetRawDataLen(SSdbRaw *pRaw, int32_t dataLen) { } int32_t sdbSetRawStatus(SSdbRaw *pRaw, ESdbStatus status) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (status == SDB_STATUS_INIT) { - terrno = TSDB_CODE_INVALID_PARA; - return -1; + code = TSDB_CODE_INVALID_PARA; + TAOS_RETURN(code); } pRaw->status = status; @@ -175,14 +183,15 @@ int32_t sdbSetRawStatus(SSdbRaw *pRaw, ESdbStatus status) { } int32_t sdbGetRawInt8(SSdbRaw *pRaw, int32_t dataPos, int8_t *val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int8_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *val = *(int8_t *)(pRaw->pData + dataPos); @@ -190,14 +199,15 @@ int32_t sdbGetRawInt8(SSdbRaw *pRaw, int32_t dataPos, int8_t *val) { } int32_t sdbGetRawUInt8(SSdbRaw *pRaw, int32_t dataPos, uint8_t *val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(uint8_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *val = *(uint8_t *)(pRaw->pData + dataPos); @@ -205,14 +215,15 @@ int32_t sdbGetRawUInt8(SSdbRaw *pRaw, int32_t dataPos, uint8_t *val) { } int32_t sdbGetRawInt32(SSdbRaw *pRaw, int32_t dataPos, int32_t *val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int32_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *val = *(int32_t *)(pRaw->pData + dataPos); @@ -220,14 +231,15 @@ int32_t sdbGetRawInt32(SSdbRaw *pRaw, int32_t dataPos, int32_t *val) { } int32_t sdbGetRawInt16(SSdbRaw *pRaw, int32_t dataPos, int16_t *val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int16_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *val = *(int16_t *)(pRaw->pData + dataPos); @@ -235,14 +247,15 @@ int32_t sdbGetRawInt16(SSdbRaw *pRaw, int32_t dataPos, int16_t *val) { } int32_t sdbGetRawInt64(SSdbRaw *pRaw, int32_t dataPos, int64_t *val) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + sizeof(int64_t) > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } *val = *(int64_t *)(pRaw->pData + dataPos); @@ -250,14 +263,15 @@ int32_t sdbGetRawInt64(SSdbRaw *pRaw, int32_t dataPos, int64_t *val) { } int32_t sdbGetRawBinary(SSdbRaw *pRaw, int32_t dataPos, char *pVal, int32_t valLen) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } if (dataPos + valLen > pRaw->dataLen) { - terrno = TSDB_CODE_SDB_INVALID_DATA_LEN; - return -1; + code = TSDB_CODE_SDB_INVALID_DATA_LEN; + TAOS_RETURN(code); } if (pVal != NULL) { memcpy(pVal, pRaw->pData + dataPos, valLen); @@ -266,9 +280,10 @@ int32_t sdbGetRawBinary(SSdbRaw *pRaw, int32_t dataPos, char *pVal, int32_t valL } int32_t sdbGetRawSoftVer(SSdbRaw *pRaw, int8_t *sver) { + int32_t code = 0; if (pRaw == NULL) { - terrno = TSDB_CODE_INVALID_PTR; - return -1; + code = TSDB_CODE_INVALID_PTR; + TAOS_RETURN(code); } *sver = pRaw->sver; From 44efc20ec388357a6b3c2e83248b7b4f20b835b2 Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 16 Jul 2024 04:56:55 +0000 Subject: [PATCH 07/45] fix/TD-30989 --- source/dnode/mnode/impl/src/mndAcct.c | 60 ++++--- source/dnode/mnode/impl/src/mndArbGroup.c | 197 +++++++++++++--------- source/dnode/mnode/impl/src/mndCluster.c | 58 ++++--- 3 files changed, 191 insertions(+), 124 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndAcct.c b/source/dnode/mnode/impl/src/mndAcct.c index 148e21b507..e8ea301b55 100644 --- a/source/dnode/mnode/impl/src/mndAcct.c +++ b/source/dnode/mnode/impl/src/mndAcct.c @@ -54,6 +54,7 @@ int32_t mndInitAcct(SMnode *pMnode) { void mndCleanupAcct(SMnode *pMnode) {} static int32_t mndCreateDefaultAcct(SMnode *pMnode) { + int32_t code = 0; SAcctObj acctObj = {0}; tstrncpy(acctObj.acct, TSDB_DEFAULT_USER, TSDB_USER_LEN); acctObj.createdTime = taosGetTimestampMs(); @@ -76,7 +77,10 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) { }; SSdbRaw *pRaw = mndAcctActionEncode(&acctObj); - if (pRaw == NULL) return -1; + if (pRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); mInfo("acct:%s, will be created when deploying, raw:%p", acctObj.acct, pRaw); @@ -84,21 +88,24 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, NULL, "create-acct"); if (pTrans == NULL) { sdbFreeRaw(pRaw); - mError("acct:%s, failed to create since %s", acctObj.acct, terrstr()); - return -1; + code = terrno; + mError("acct:%s, failed to create since %s", acctObj.acct, tstrerror(code)); + TAOS_RETURN(code); } mInfo("trans:%d, used to create acct:%s", pTrans->id, acctObj.acct); - if (mndTransAppendCommitlog(pTrans, pRaw) != 0) { - mError("trans:%d, failed to commit redo log since %s", pTrans->id, terrstr()); + code = mndTransAppendCommitlog(pTrans, pRaw); + if (code != 0) { + mError("trans:%d, failed to commit redo log since %s", pTrans->id, tstrerror(code)); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } - if (mndTransPrepare(pMnode, pTrans) != 0) { - mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); + code = mndTransPrepare(pMnode, pTrans); + if (code != 0) { + mError("trans:%d, failed to prepare since %s", pTrans->id, tstrerror(code)); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } mndTransDrop(pTrans); @@ -216,31 +223,36 @@ static int32_t mndAcctActionUpdate(SSdb *pSdb, SAcctObj *pOld, SAcctObj *pNew) { } static int32_t mndProcessCreateAcctReq(SRpcMsg *pReq) { - if (mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_CREATE_ACCT) != 0) { - return -1; + int32_t code = 0; + code = mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_CREATE_ACCT); + if (code != 0) { + TAOS_RETURN(code); } - terrno = TSDB_CODE_OPS_NOT_SUPPORT; - mError("failed to process create acct request since %s", terrstr()); - return -1; + code = TSDB_CODE_OPS_NOT_SUPPORT; + mError("failed to process create acct request since %s", tstrerror(code)); + TAOS_RETURN(code); } static int32_t mndProcessAlterAcctReq(SRpcMsg *pReq) { - if (mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_ALTER_ACCT) != 0) { - return -1; + int32_t code = 0; + code = mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_ALTER_ACCT); + if (code != 0) { + TAOS_RETURN(code); } - terrno = TSDB_CODE_OPS_NOT_SUPPORT; - mError("failed to process create acct request since %s", terrstr()); - return -1; + code = TSDB_CODE_OPS_NOT_SUPPORT; + mError("failed to process create acct request since %s", tstrerror(code)); + TAOS_RETURN(code); } static int32_t mndProcessDropAcctReq(SRpcMsg *pReq) { - if (mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_DROP_ACCT) != 0) { - return -1; + int32_t code = 0; + if (code = mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_DROP_ACCT) != 0) { + TAOS_RETURN(code); } - terrno = TSDB_CODE_OPS_NOT_SUPPORT; - mError("failed to process create acct request since %s", terrstr()); - return -1; + code = TSDB_CODE_OPS_NOT_SUPPORT; + mError("failed to process create acct request since %s", tstrerror(code)); + TAOS_RETURN(code); } \ No newline at end of file diff --git a/source/dnode/mnode/impl/src/mndArbGroup.c b/source/dnode/mnode/impl/src/mndArbGroup.c index 6a6b3d2daa..dd683483cd 100644 --- a/source/dnode/mnode/impl/src/mndArbGroup.c +++ b/source/dnode/mnode/impl/src/mndArbGroup.c @@ -57,6 +57,7 @@ static int32_t mndArbCheckToken(const char *token1, const char *token2) { } int32_t mndInitArbGroup(SMnode *pMnode) { + int32_t code = 0; SSdbTable table = { .sdbType = SDB_ARBGROUP, .keyType = SDB_KEY_INT32, @@ -78,6 +79,10 @@ int32_t mndInitArbGroup(SMnode *pMnode) { mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_ARBGROUP, mndCancelGetNextArbGroup); arbUpdateHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), false, HASH_ENTRY_LOCK); + if (arbUpdateHash == NULL) { + code = terrno; + TAOS_RETURN(code); + } return sdbSetTable(pMnode->pSdb, table); } @@ -248,50 +253,74 @@ _OVER: } int32_t mndSetCreateArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup) { + int32_t code = 0; SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); - if (pRedoRaw == NULL) return -1; - if (mndTransAppendRedolog(pTrans, pRedoRaw) != 0) return -1; - if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_CREATING) != 0) return -1; + if (pRedoRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } + if (code = mndTransAppendRedolog(pTrans, pRedoRaw) != 0) TAOS_RETURN(code); + if (code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_CREATING) != 0) TAOS_RETURN(code); return 0; } int32_t mndSetCreateArbGroupUndoLogs(STrans *pTrans, SArbGroup *pGroup) { + int32_t code = 0; SSdbRaw *pUndoRaw = mndArbGroupActionEncode(pGroup); - if (pUndoRaw == NULL) return -1; - if (mndTransAppendUndolog(pTrans, pUndoRaw) != 0) return -1; - if (sdbSetRawStatus(pUndoRaw, SDB_STATUS_DROPPED) != 0) return -1; + if (pUndoRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } + if (code = mndTransAppendUndolog(pTrans, pUndoRaw) != 0) TAOS_RETURN(code); + if (code = sdbSetRawStatus(pUndoRaw, SDB_STATUS_DROPPED) != 0) TAOS_RETURN(code); return 0; } int32_t mndSetCreateArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup) { + int32_t code = 0; SSdbRaw *pCommitRaw = mndArbGroupActionEncode(pGroup); - if (pCommitRaw == NULL) return -1; - if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) return -1; - if (sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY) != 0) return -1; + if (pCommitRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } + if (code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) TAOS_RETURN(code); + if (code = sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY) != 0) TAOS_RETURN(code); return 0; } int32_t mndSetDropArbGroupPrepareLogs(STrans *pTrans, SArbGroup *pGroup) { + int32_t code = 0; SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); - if (pRedoRaw == NULL) return -1; - if (mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) return -1; - if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) return -1; + if (pRedoRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } + if (code = mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) TAOS_RETURN(code); + if (code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) TAOS_RETURN(code); return 0; } static int32_t mndSetDropArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup) { + int32_t code = 0; SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); - if (pRedoRaw == NULL) return -1; - if (mndTransAppendRedolog(pTrans, pRedoRaw) != 0) return -1; - if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) return -1; + if (pRedoRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } + if (code = mndTransAppendRedolog(pTrans, pRedoRaw) != 0) TAOS_RETURN(code); + if (code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) TAOS_RETURN(code); return 0; } int32_t mndSetDropArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup) { + int32_t code = 0; SSdbRaw *pCommitRaw = mndArbGroupActionEncode(pGroup); - if (pCommitRaw == NULL) return -1; - if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) return -1; - if (sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED) != 0) return -1; + if (pCommitRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } + if (code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) TAOS_RETURN(code); + if (code = sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED) != 0) TAOS_RETURN(code); return 0; } @@ -343,6 +372,7 @@ static int32_t mndSendArbHeartBeatReq(SDnodeObj *pDnode, char *arbToken, int64_t } static int32_t mndProcessArbHbTimer(SRpcMsg *pReq) { + int32_t code = 0; SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; SArbGroup *pArbGroup = NULL; @@ -377,7 +407,7 @@ static int32_t mndProcessArbHbTimer(SRpcMsg *pReq) { } char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (mndGetArbToken(pMnode, arbToken) != 0) { + if (code = mndGetArbToken(pMnode, arbToken) != 0) { mError("failed to get arb token for arb-hb timer"); pIter = taosHashIterate(pDnodeHash, NULL); while (pIter) { @@ -386,7 +416,7 @@ static int32_t mndProcessArbHbTimer(SRpcMsg *pReq) { pIter = taosHashIterate(pDnodeHash, pIter); } taosHashCleanup(pDnodeHash); - return -1; + TAOS_RETURN(code); } int64_t nowMs = taosGetTimestampMs(); @@ -447,6 +477,7 @@ static void *mndBuildArbCheckSyncReq(int32_t *pContLen, int32_t vgId, char *arbT static int32_t mndSendArbCheckSyncReq(SMnode *pMnode, int32_t vgId, char *arbToken, int64_t term, char *member0Token, char *member1Token) { + int32_t code = 0; int32_t contLen = 0; void *pHead = mndBuildArbCheckSyncReq(&contLen, vgId, arbToken, term, member0Token, member1Token); if (!pHead) { @@ -459,10 +490,12 @@ static int32_t mndSendArbCheckSyncReq(SMnode *pMnode, int32_t vgId, char *arbTok if (epSet.numOfEps == 0) { mError("vgId:%d, failed to send check-sync request since no epSet found", vgId); rpcFreeCont(pHead); - return -1; + code = -1; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } - int32_t code = tmsgSendReq(&epSet, &rpcMsg); + code = tmsgSendReq(&epSet, &rpcMsg); if (code != 0) { mError("vgId:%d, failed to send check-sync request since 0x%x", vgId, code); } else { @@ -502,11 +535,14 @@ static void *mndBuildArbSetAssignedLeaderReq(int32_t *pContLen, int32_t vgId, ch static int32_t mndSendArbSetAssignedLeaderReq(SMnode *pMnode, int32_t dnodeId, int32_t vgId, char *arbToken, int64_t term, char *memberToken) { + int32_t code = 0; int32_t contLen = 0; void *pHead = mndBuildArbSetAssignedLeaderReq(&contLen, vgId, arbToken, term, memberToken); if (!pHead) { mError("vgId:%d, failed to build set-assigned request", vgId); - return -1; + code = -1; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } SRpcMsg rpcMsg = {.msgType = TDMT_SYNC_SET_ASSIGNED_LEADER, .pCont = pHead, .contLen = contLen}; @@ -514,9 +550,11 @@ static int32_t mndSendArbSetAssignedLeaderReq(SMnode *pMnode, int32_t dnodeId, i if (epSet.numOfEps == 0) { mError("dnodeId:%d vgId:%d, failed to send arb-set-assigned request to dnode since no epSet found", dnodeId, vgId); rpcFreeCont(pHead); - return -1; + code = -1; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } - int32_t code = tmsgSendReq(&epSet, &rpcMsg); + code = tmsgSendReq(&epSet, &rpcMsg); if (code != 0) { mError("dnodeId:%d vgId:%d, failed to send arb-set-assigned request to dnode since 0x%x", dnodeId, vgId, code); } else { @@ -526,6 +564,7 @@ static int32_t mndSendArbSetAssignedLeaderReq(SMnode *pMnode, int32_t dnodeId, i } static int32_t mndProcessArbCheckSyncTimer(SRpcMsg *pReq) { + int32_t code = 0; SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; SArbGroup *pArbGroup = NULL; @@ -533,14 +572,16 @@ static int32_t mndProcessArbCheckSyncTimer(SRpcMsg *pReq) { void *pIter = NULL; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (mndGetArbToken(pMnode, arbToken) != 0) { + if (code = mndGetArbToken(pMnode, arbToken) != 0) { mError("failed to get arb token for arb-check-sync timer"); - return -1; + TAOS_RETURN(code); } int64_t term = mndGetTerm(pMnode); if (term < 0) { mError("arb failed to get term since %s", terrstr()); - return -1; + code = -1; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } int64_t roleTimeMs = mndGetRoleTimeMs(pMnode); @@ -747,13 +788,13 @@ _OVER: } static int32_t mndProcessArbUpdateGroupBatchReq(SRpcMsg *pReq) { - int ret = -1; + int code = -1; size_t sz = 0; SMArbUpdateGroupBatchReq req = {0}; - if (tDeserializeSMArbUpdateGroupBatchReq(pReq->pCont, pReq->contLen, &req) != 0) { + if (code = tDeserializeSMArbUpdateGroupBatchReq(pReq->pCont, pReq->contLen, &req) != 0) { mError("arb failed to decode arb-update-group request"); - return -1; + TAOS_RETURN(code); } SMnode *pMnode = pReq->info.node; @@ -789,7 +830,7 @@ static int32_t mndProcessArbUpdateGroupBatchReq(SRpcMsg *pReq) { mndTransAddArbGroupId(pTrans, newGroup.vgId); - if (mndSetCreateArbGroupCommitLogs(pTrans, &newGroup) != 0) { + if (code = mndSetCreateArbGroupCommitLogs(pTrans, &newGroup) != 0) { mError("failed to update arbgroup in set commit log, vgId:%d, trans:%d, since %s", newGroup.vgId, pTrans->id, terrstr()); goto _OVER; @@ -803,13 +844,13 @@ static int32_t mndProcessArbUpdateGroupBatchReq(SRpcMsg *pReq) { sdbRelease(pMnode->pSdb, pOldGroup); } - if (mndTransCheckConflict(pMnode, pTrans) != 0) goto _OVER; - if (mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; + if (code = mndTransCheckConflict(pMnode, pTrans) != 0) goto _OVER; + if (code = mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; - ret = 0; + code = 0; _OVER: - if (ret != 0) { + if (code != 0) { // failed to update arbgroup for (size_t i = 0; i < sz; i++) { SMArbUpdateGroup *pUpdateGroup = taosArrayGet(req.updateArray, i); @@ -819,7 +860,7 @@ _OVER: mndTransDrop(pTrans); tFreeSMArbUpdateGroupBatchReq(&req); - return ret; + return code; } static void mndArbGroupDupObj(SArbGroup *pGroup, SArbGroup *pNew) { @@ -841,10 +882,11 @@ static void mndArbGroupResetAssignedLeader(SArbGroup *pGroup) { } static int32_t mndArbGroupUpdateTrans(SMnode *pMnode, SArbGroup *pNew) { - int32_t ret = -1; + int32_t code = -1; STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_ARBGROUP, NULL, "update-arbgroup"); if (pTrans == NULL) { mError("failed to update arbgroup in create trans, vgId:%d, since %s", pNew->vgId, terrstr()); + if (terrno != 0) code = terrno; goto _OVER; } @@ -854,23 +896,22 @@ static int32_t mndArbGroupUpdateTrans(SMnode *pMnode, SArbGroup *pNew) { pNew->assignedLeader.token, pNew->assignedLeader.acked); mndTransAddArbGroupId(pTrans, pNew->vgId); - if (mndTransCheckConflict(pMnode, pTrans) != 0) { - ret = -1; + if (code = mndTransCheckConflict(pMnode, pTrans) != 0) { goto _OVER; } - if (mndSetCreateArbGroupCommitLogs(pTrans, pNew) != 0) { - mError("failed to update arbgroup in set commit log, vgId:%d, since %s", pNew->vgId, terrstr()); + if (code = mndSetCreateArbGroupCommitLogs(pTrans, pNew) != 0) { + mError("failed to update arbgroup in set commit log, vgId:%d, since %s", pNew->vgId, tstrerror(code)); goto _OVER; } - if (mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; + if (code = mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; - ret = 0; + code = 0; _OVER: mndTransDrop(pTrans); - return ret; + return code; } bool mndUpdateArbGroupByHeartBeat(SArbGroup *pGroup, SVArbHbRspMember *pRspMember, int64_t nowMs, int32_t dnodeId, @@ -993,11 +1034,13 @@ _OVER: } static int32_t mndUpdateArbSync(SMnode *pMnode, int32_t vgId, char *member0Token, char *member1Token, bool newIsSync) { + int32_t code = 0; SArbGroup *pGroup = sdbAcquire(pMnode->pSdb, SDB_ARBGROUP, &vgId); if (pGroup == NULL) { - terrno = TSDB_CODE_NOT_FOUND; mInfo("failed to update arb sync, vgId:%d not found", vgId); - return -1; + code = -1; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } SArbGroup newGroup = {0}; @@ -1018,38 +1061,36 @@ static int32_t mndProcessArbHbRsp(SRpcMsg *pRsp) { return 0; } - int32_t ret = -1; + int32_t code = -1; SMnode *pMnode = pRsp->info.node; SSdb *pSdb = pMnode->pSdb; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (mndGetArbToken(pMnode, arbToken) != 0) { + if (code = mndGetArbToken(pMnode, arbToken) != 0) { mError("failed to get arb token for arb-hb response"); - terrno = TSDB_CODE_NOT_FOUND; - return -1; + TAOS_RETURN(code); } SVArbHeartBeatRsp arbHbRsp = {0}; - if (tDeserializeSVArbHeartBeatRsp(pRsp->pCont, pRsp->contLen, &arbHbRsp) != 0) { + if (code = tDeserializeSVArbHeartBeatRsp(pRsp->pCont, pRsp->contLen, &arbHbRsp) != 0) { mInfo("arb hb-rsp des failed, since:%s", tstrerror(pRsp->code)); - terrno = TSDB_CODE_INVALID_MSG; - return -1; + TAOS_RETURN(code); } if (mndArbCheckToken(arbToken, arbHbRsp.arbToken) != 0) { mInfo("arb hearbeat skip update for dnodeId:%d, arb token mismatch, local:[%s] msg:[%s]", arbHbRsp.dnodeId, arbToken, arbHbRsp.arbToken); - terrno = TSDB_CODE_MND_ARB_TOKEN_MISMATCH; + code = TSDB_CODE_MND_ARB_TOKEN_MISMATCH; goto _OVER; } (void)mndUpdateArbHeartBeat(pMnode, arbHbRsp.dnodeId, arbHbRsp.hbMembers); - ret = 0; + code = 0; _OVER: tFreeSVArbHeartBeatRsp(&arbHbRsp); - return ret; + return code; } static int32_t mndProcessArbCheckSyncRsp(SRpcMsg *pRsp) { @@ -1058,27 +1099,25 @@ static int32_t mndProcessArbCheckSyncRsp(SRpcMsg *pRsp) { return 0; } - int32_t ret = -1; + int32_t code = -1; SMnode *pMnode = pRsp->info.node; SSdb *pSdb = pMnode->pSdb; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (mndGetArbToken(pMnode, arbToken) != 0) { + if (code = mndGetArbToken(pMnode, arbToken) != 0) { mError("failed to get arb token for arb-check-sync response"); - terrno = TSDB_CODE_NOT_FOUND; - return -1; + TAOS_RETURN(code); } SVArbCheckSyncRsp syncRsp = {0}; - if (tDeserializeSVArbCheckSyncRsp(pRsp->pCont, pRsp->contLen, &syncRsp) != 0) { + if (code = tDeserializeSVArbCheckSyncRsp(pRsp->pCont, pRsp->contLen, &syncRsp) != 0) { mInfo("arb check-sync-rsp des failed, since:%s", tstrerror(pRsp->code)); if (pRsp->code == TSDB_CODE_MND_ARB_TOKEN_MISMATCH) { terrno = TSDB_CODE_SUCCESS; return 0; } - terrno = TSDB_CODE_INVALID_MSG; - return -1; + TAOS_RETURN(code); } if (mndArbCheckToken(arbToken, syncRsp.arbToken) != 0) { @@ -1089,16 +1128,16 @@ static int32_t mndProcessArbCheckSyncRsp(SRpcMsg *pRsp) { } bool newIsSync = (syncRsp.errCode == TSDB_CODE_SUCCESS); - if (mndUpdateArbSync(pMnode, syncRsp.vgId, syncRsp.member0Token, syncRsp.member1Token, newIsSync) != 0) { + if (code = mndUpdateArbSync(pMnode, syncRsp.vgId, syncRsp.member0Token, syncRsp.member1Token, newIsSync) != 0) { mInfo("failed to update arb sync for vgId:%d, since:%s", syncRsp.vgId, terrstr()); goto _OVER; } - ret = 0; + code = 0; _OVER: tFreeSVArbCheckSyncRsp(&syncRsp); - return ret; + TAOS_RETURN(code); } bool mndUpdateArbGroupBySetAssignedLeader(SArbGroup *pGroup, int32_t vgId, char *memberToken, int32_t errcode, @@ -1138,35 +1177,35 @@ static int32_t mndProcessArbSetAssignedLeaderRsp(SRpcMsg *pRsp) { return 0; } - int32_t ret = -1; + int32_t code = -1; SMnode *pMnode = pRsp->info.node; SSdb *pSdb = pMnode->pSdb; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (mndGetArbToken(pMnode, arbToken) != 0) { + if (code = mndGetArbToken(pMnode, arbToken) != 0) { mError("failed to get arb token for arb-set-assigned response"); - terrno = TSDB_CODE_NOT_FOUND; - return -1; + TAOS_RETURN(code); } SVArbSetAssignedLeaderRsp setAssignedRsp = {0}; - if (tDeserializeSVArbSetAssignedLeaderRsp(pRsp->pCont, pRsp->contLen, &setAssignedRsp) != 0) { + if (code = tDeserializeSVArbSetAssignedLeaderRsp(pRsp->pCont, pRsp->contLen, &setAssignedRsp) != 0) { mInfo("arb set-assigned-rsp des failed, since:%s", tstrerror(pRsp->code)); - terrno = TSDB_CODE_INVALID_MSG; - return -1; + TAOS_RETURN(code); } if (mndArbCheckToken(arbToken, setAssignedRsp.arbToken) != 0) { mInfo("skip update arb assigned for vgId:%d, arb token mismatch, local:[%s] msg:[%s]", setAssignedRsp.vgId, arbToken, setAssignedRsp.arbToken); - terrno = TSDB_CODE_MND_ARB_TOKEN_MISMATCH; + code = TSDB_CODE_MND_ARB_TOKEN_MISMATCH; goto _OVER; } SArbGroup *pGroup = mndAcquireArbGroup(pMnode, setAssignedRsp.vgId); if (!pGroup) { mError("failed to set arb assigned for vgId:%d, since:%s", setAssignedRsp.vgId, terrstr()); + code = -1; + if (terrno != 0) code = terrno; goto _OVER; } @@ -1174,17 +1213,17 @@ static int32_t mndProcessArbSetAssignedLeaderRsp(SRpcMsg *pRsp) { bool updateAssigned = mndUpdateArbGroupBySetAssignedLeader(pGroup, setAssignedRsp.vgId, setAssignedRsp.memberToken, pRsp->code, &newGroup); if (updateAssigned) { - if (mndPullupArbUpdateGroup(pMnode, &newGroup) != 0) { - mInfo("failed to pullup update arb assigned for vgId:%d, since:%s", setAssignedRsp.vgId, terrstr()); + if (code = mndPullupArbUpdateGroup(pMnode, &newGroup) != 0) { + mInfo("failed to pullup update arb assigned for vgId:%d, since:%s", setAssignedRsp.vgId, tstrerror(code)); goto _OVER; } } - ret = 0; + code = 0; _OVER: tFreeSVArbSetAssignedLeaderRsp(&setAssignedRsp); - return ret; + return code; } static int32_t mndRetrieveArbGroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 74e0940cba..8bcd896cc6 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -14,8 +14,8 @@ */ #define _DEFAULT_SOURCE -#include "audit.h" #include "mndCluster.h" +#include "audit.h" #include "mndGrant.h" #include "mndPrivilege.h" #include "mndShow.h" @@ -61,11 +61,13 @@ int32_t mndInitCluster(SMnode *pMnode) { void mndCleanupCluster(SMnode *pMnode) {} int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len) { - SSdb *pSdb = pMnode->pSdb; + int32_t code = 0; + SSdb *pSdb = pMnode->pSdb; SClusterObj *pCluster = sdbAcquire(pSdb, SDB_CLUSTER, &pMnode->clusterId); if (pCluster == NULL) { - return -1; + code = terrno; + TAOS_RETURN(code); } tstrncpy(clusterName, pCluster->name, len); @@ -247,7 +249,10 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { mInfo("cluster:%" PRId64 ", name is %s", clusterObj.id, clusterObj.name); SSdbRaw *pRaw = mndClusterActionEncode(&clusterObj); - if (pRaw == NULL) return -1; + if (pRaw == NULL) { + code = terrno; + TAOS_RETURN(code); + } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); mInfo("cluster:%" PRId64 ", will be created when deploying, raw:%p", clusterObj.id, pRaw); @@ -256,21 +261,22 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { if (pTrans == NULL) { sdbFreeRaw(pRaw); mError("cluster:%" PRId64 ", failed to create since %s", clusterObj.id, terrstr()); - return -1; + code = terrno; + TAOS_RETURN(code); } mInfo("trans:%d, used to create cluster:%" PRId64, pTrans->id, clusterObj.id); - if (mndTransAppendCommitlog(pTrans, pRaw) != 0) { + if (code = mndTransAppendCommitlog(pTrans, pRaw) != 0) { mError("trans:%d, failed to commit redo log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); - if (mndTransPrepare(pMnode, pTrans) != 0) { + if (code = mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } mndTransDrop(pTrans); @@ -347,22 +353,33 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { return 0; } + int32_t code = 0; mInfo("update cluster uptime to %d", clusterObj.upTime); STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-uptime"); - if (pTrans == NULL) return -1; + if (pTrans == NULL) { + code = terrno; + TAOS_RETURN(code); + } SSdbRaw *pCommitRaw = mndClusterActionEncode(&clusterObj); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + if (pCommitRaw == NULL) { mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + code = terrno; + TAOS_RETURN(code); + } + + if (code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); + mndTransDrop(pTrans); + TAOS_RETURN(code); } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); - if (mndTransPrepare(pMnode, pTrans) != 0) { + if (code = mndTransPrepare(pMnode, pTrans) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } mndTransDrop(pTrans); @@ -374,13 +391,12 @@ int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { SMnode *pMnode = pReq->info.node; SMCfgClusterReq cfgReq = {0}; if (tDeserializeSMCfgClusterReq(pReq->pCont, pReq->contLen, &cfgReq) != 0) { - terrno = TSDB_CODE_INVALID_MSG; - return -1; + code = TSDB_CODE_INVALID_MSG; + TAOS_RETURN(code); } mInfo("cluster: start to config, option:%s, value:%s", cfgReq.config, cfgReq.value); - if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) { - code = terrno != 0 ? terrno : TSDB_CODE_MND_NO_RIGHTS; + if (code = mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) { goto _exit; } @@ -410,17 +426,17 @@ int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { } { // audit - auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, TMIN(cfgReq.sqlLen, GRANT_ACTIVE_HEAD_LEN << 1)); + auditRecord(pReq, pMnode->clusterId, "alterCluster", "", "", cfgReq.sql, + TMIN(cfgReq.sqlLen, GRANT_ACTIVE_HEAD_LEN << 1)); } _exit: tFreeSMCfgClusterReq(&cfgReq); if (code != 0) { - terrno = code; mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr()); } else { mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value); } - return code; + TAOS_RETURN(code); } int32_t mndProcessConfigClusterRsp(SRpcMsg *pRsp) { From 86ddcac6d4c9f46c88575b4f2001e79c2ddc2660 Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 16 Jul 2024 09:23:23 +0000 Subject: [PATCH 08/45] one return success --- source/dnode/mnode/sdb/src/sdbFile.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source/dnode/mnode/sdb/src/sdbFile.c b/source/dnode/mnode/sdb/src/sdbFile.c index efa29a2ed5..2bad2ae40e 100644 --- a/source/dnode/mnode/sdb/src/sdbFile.c +++ b/source/dnode/mnode/sdb/src/sdbFile.c @@ -14,12 +14,12 @@ */ #define _DEFAULT_SOURCE +#include "crypt.h" #include "sdb.h" #include "sync.h" #include "tchecksum.h" -#include "wal.h" #include "tglobal.h" -#include "crypt.h" +#include "wal.h" #define SDB_TABLE_SIZE 24 #define SDB_RESERVE_SIZE 512 @@ -251,7 +251,7 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { taosMemoryFree(pRaw); code = TAOS_SYSTEM_ERROR(errno); mInfo("read sdb file:%s finished since %s", file, tstrerror(code)); - TAOS_RETURN(code); + return 0; } code = sdbReadFileHead(pSdb, pFile); @@ -283,7 +283,7 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { } readLen = pRaw->dataLen + sizeof(int32_t); - if(tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB ){ + if (tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB) { readLen = ENCRYPTED_LEN(pRaw->dataLen) + sizeof(int32_t); } if (readLen >= bufLen) { @@ -313,7 +313,7 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { goto _OVER; } - if(tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB ){ + if (tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB) { int32_t count = 0; char *plantContent = taosMemoryMalloc(ENCRYPTED_LEN(pRaw->dataLen)); @@ -326,8 +326,8 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { strncpy(opts.key, tsEncryptKey, ENCRYPT_KEY_LEN); count = CBC_Decrypt(&opts); - - //mDebug("read sdb, CBC_Decrypt dataLen:%d, descrypted len:%d, %s", pRaw->dataLen, count, __FUNCTION__); + + // mDebug("read sdb, CBC_Decrypt dataLen:%d, descrypted len:%d, %s", pRaw->dataLen, count, __FUNCTION__); memcpy(pRaw->pData, plantContent, pRaw->dataLen); taosMemoryFree(plantContent); @@ -442,8 +442,8 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { } int32_t newDataLen = pRaw->dataLen; - char* newData = pRaw->pData; - if(tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB ){ + char *newData = pRaw->pData; + if (tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB) { newDataLen = ENCRYPTED_LEN(pRaw->dataLen); newData = taosMemoryMalloc(newDataLen); if (newData == NULL) { @@ -462,8 +462,8 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { int32_t count = CBC_Encrypt(&opts); - //mDebug("write sdb, CBC_Encrypt encryptedDataLen:%d, dataLen:%d, %s", - // newDataLen, pRaw->dataLen, __FUNCTION__); + // mDebug("write sdb, CBC_Encrypt encryptedDataLen:%d, dataLen:%d, %s", + // newDataLen, pRaw->dataLen, __FUNCTION__); } if (taosWriteFile(pFile, newData, newDataLen) != newDataLen) { @@ -473,7 +473,7 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) { break; } - if(tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB ){ + if (tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_SDB) == DND_CS_SDB) { taosMemoryFree(newData); } @@ -614,7 +614,7 @@ static void sdbCloseIter(SSdbIter *pIter) { } int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter, int64_t *index, int64_t *term, int64_t *config) { - int32_t code = 0; + int32_t code = 0; SSdbIter *pIter = sdbCreateIter(pSdb); if (pIter == NULL) return -1; @@ -687,7 +687,7 @@ int32_t sdbDoRead(SSdb *pSdb, SSdbIter *pIter, void **ppBuf, int32_t *len) { } int32_t sdbStartWrite(SSdb *pSdb, SSdbIter **ppIter) { - int32_t code = 0; + int32_t code = 0; SSdbIter *pIter = sdbCreateIter(pSdb); if (pIter == NULL) { code = terrno; From 2a5e665f3b5cc67752d329254b378d7a82529fdc Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Tue, 16 Jul 2024 17:25:37 +0800 Subject: [PATCH 09/45] test: test ci --- tests/pytest/util/dnodes.py | 34 +++++++++---------- .../6-cluster/5dnode3mnodeAdd1Ddnoe.py | 8 +---- .../5dnode3mnodeRestartDnodeInsertData.py | 2 +- ...5dnode3mnodeSep1VnodeStopDnodeCreateStb.py | 2 +- .../5dnode3mnodeSep1VnodeStopMnodeCreateDb.py | 2 +- .../6-cluster/5dnode3mnodeStopLoop.py | 2 +- 6 files changed, 22 insertions(+), 28 deletions(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 1cebf08b4c..bb6f8ff030 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -37,17 +37,17 @@ class TDSimClient: "charset": "UTF-8", "asyncLog": "0", "rpcDebugFlag": "135", - "tmrDebugFlag": "135", - "dDebugFlag":"135", - "cDebugFlag": "135", - "uDebugFlag": "135", - "jniDebugFlag": "135", + "tmrDebugFlag": "131", + "dDebugFlag":"131", + "cDebugFlag": "131", + "uDebugFlag": "131", + "jniDebugFlag": "131", "qDebugFlag": "135", "supportVnodes": "1024", "enableQueryHb": "1", "telemetryReporting": "0", "tqDebugflag": "135", - "wDebugflag":"135", + "stDebugflag":"135", } def getLogDir(self): @@ -130,21 +130,21 @@ class TDDnode: "maxShellConns": "30000", "locale": "en_US.UTF-8", "charset": "UTF-8", - "asyncLog": "135", + "asyncLog": "0", "mDebugFlag": "135", - "dDebugFlag": "135", - "vDebugFlag": "135", + "dDebugFlag": "131", + "vDebugFlag": "131", "tqDebugFlag": "135", - "cDebugFlag": "135", + "cDebugFlag": "131", "stDebugFlag": "135", - "smaDebugFlag": "135", - "jniDebugFlag": "135", - "qDebugFlag": "135", + "smaDebugFlag": "131", + "jniDebugFlag": "131", + "qDebugFlag": "131", "rpcDebugFlag": "135", - "tmrDebugFlag": "135", - "uDebugFlag": "135", - "sDebugFlag": "135", - "wDebugFlag": "135", + "tmrDebugFlag": "131", + "uDebugFlag": "131", + "sDebugFlag": "131", + "wDebugFlag": "131", "numOfLogLines": "100000000", "statusInterval": "1", "enableQueryHb": "1", diff --git a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py index 223b91be6f..f0f9c95566 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py +++ b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py @@ -177,21 +177,15 @@ class TDTestCase: if stopRole == "mnode": for i in range(mnodeNums): tdDnodes[i].stoptaosd() - # sleep(10) tdDnodes[i].starttaosd() - # sleep(10) elif stopRole == "vnode": for i in range(vnodeNumbers): tdDnodes[i+mnodeNums].stoptaosd() - # sleep(10) tdDnodes[i+mnodeNums].starttaosd() - # sleep(10) elif stopRole == "dnode": for i in range(dnodeNumbers): tdDnodes[i].stoptaosd() - # sleep(10) tdDnodes[i].starttaosd() - # sleep(10) # dnodeNumbers don't include database of schema if clusterComCheck.checkDnodes(dnodeNumbers): @@ -219,7 +213,7 @@ class TDTestCase: tdSql.checkRows(rowsPerStb) def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py index b96a9b8175..1691603472 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py @@ -227,7 +227,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py index 2a8f4fd526..77c26d8406 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py @@ -168,7 +168,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=2,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py index 8fe3b24d3b..5aceb142a3 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py @@ -170,7 +170,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=4,stopRole='mnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='mnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py index 11869f8ee4..2e9ca67e9c 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py @@ -93,7 +93,7 @@ class TDTestCase: # seperate vnode and mnode in different dnodes. # create database and stable stopcount =0 - while stopcount <= 2: + while stopcount <= 1: tdLog.info(" restart loop: %d"%stopcount ) for i in range(dnodenumbers): tdDnodes[i].stoptaosd() From 89be4351dca9ca5a278bc2c1ece3c9b30edb674d Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 17 Jul 2024 00:37:34 +0000 Subject: [PATCH 10/45] fix case --- source/dnode/mnode/impl/test/sdb/sdbTest.cpp | 54 ++++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/source/dnode/mnode/impl/test/sdb/sdbTest.cpp b/source/dnode/mnode/impl/test/sdb/sdbTest.cpp index 37b722465a..b12ea9a28f 100644 --- a/source/dnode/mnode/impl/test/sdb/sdbTest.cpp +++ b/source/dnode/mnode/impl/test/sdb/sdbTest.cpp @@ -387,11 +387,11 @@ TEST_F(MndTestSdb, 00_API) { void *pRow2 = sdbGetRowObj(NULL); ASSERT_EQ(pRow2 == NULL, 1); - //sdbRaw.c + // sdbRaw.c SStrObj strObj; SSdbRaw *pRaw1 = NULL; strSetDefault(&strObj, 1); - + pRaw1 = strEncode(&strObj); int32_t id = sdbGetIdFromRaw(pSdb, pRaw1); ASSERT_EQ(id, -2); @@ -399,32 +399,32 @@ TEST_F(MndTestSdb, 00_API) { SSdbRaw *pRaw2 = sdbAllocRaw(SDB_USER, 1, -128); ASSERT_EQ(pRaw2 == NULL, 1); - ASSERT_EQ(sdbSetRawInt8(NULL, 0, 0), -1); - ASSERT_EQ(sdbSetRawInt8(pRaw1, -128, 0), -1); - ASSERT_EQ(sdbSetRawInt32(NULL, 0, 0), -1); - ASSERT_EQ(sdbSetRawInt32(pRaw1, -128, 0), -1); - ASSERT_EQ(sdbSetRawInt16(NULL, 0, 0), -1); - ASSERT_EQ(sdbSetRawInt16(pRaw1, -128, 0), -1); - ASSERT_EQ(sdbSetRawInt64(NULL, 0, 0), -1); - ASSERT_EQ(sdbSetRawInt64(pRaw1, -128, 0), -1); - ASSERT_EQ(sdbSetRawBinary(NULL, 0, "12", 3), -1); - ASSERT_EQ(sdbSetRawBinary(pRaw1, 9028, "12", 3), -1); - ASSERT_EQ(sdbSetRawDataLen(NULL, 0), -1); - ASSERT_EQ(sdbSetRawDataLen(pRaw1, 9000), -1); - ASSERT_EQ(sdbSetRawStatus(NULL, SDB_STATUS_READY), -1); - ASSERT_EQ(sdbSetRawStatus(pRaw1, SDB_STATUS_INIT), -1); + ASSERT_EQ(sdbSetRawInt8(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawInt8(pRaw1, -128, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbSetRawInt32(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawInt32(pRaw1, -128, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbSetRawInt16(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawInt16(pRaw1, -128, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbSetRawInt64(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawInt64(pRaw1, -128, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbSetRawBinary(NULL, 0, "12", 3), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawBinary(pRaw1, 9028, "12", 3), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbSetRawDataLen(NULL, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawDataLen(pRaw1, 9000), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbSetRawStatus(NULL, SDB_STATUS_READY), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbSetRawStatus(pRaw1, SDB_STATUS_INIT), TSDB_CODE_INVALID_PARA); - ASSERT_EQ(sdbGetRawInt8(NULL, 0, 0), -1); - ASSERT_EQ(sdbGetRawInt8(pRaw1, 9000, 0), -1); - ASSERT_EQ(sdbGetRawInt32(NULL, 0, 0), -1); - ASSERT_EQ(sdbGetRawInt32(pRaw1, 9000, 0), -1); - ASSERT_EQ(sdbGetRawInt16(NULL, 0, 0), -1); - ASSERT_EQ(sdbGetRawInt16(pRaw1, 9000, 0), -1); - ASSERT_EQ(sdbGetRawInt64(NULL, 0, 0), -1); - ASSERT_EQ(sdbGetRawInt64(pRaw1, 9000, 0), -1); - ASSERT_EQ(sdbGetRawBinary(NULL, 0, 0, 4096), -1); - ASSERT_EQ(sdbGetRawBinary(pRaw1, 9000, 0, 112), -1); - ASSERT_EQ(sdbGetRawSoftVer(NULL, 0), -1); + ASSERT_EQ(sdbGetRawInt8(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbGetRawInt8(pRaw1, 9000, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbGetRawInt32(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbGetRawInt32(pRaw1, 9000, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbGetRawInt16(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbGetRawInt16(pRaw1, 9000, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbGetRawInt64(NULL, 0, 0), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbGetRawInt64(pRaw1, 9000, 0), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbGetRawBinary(NULL, 0, 0, 4096), TSDB_CODE_INVALID_PTR); + ASSERT_EQ(sdbGetRawBinary(pRaw1, 9000, 0, 112), TSDB_CODE_SDB_INVALID_DATA_LEN); + ASSERT_EQ(sdbGetRawSoftVer(NULL, 0), TSDB_CODE_INVALID_PTR); ASSERT_EQ(sdbGetRawTotalSize(NULL), -1); // sdbHash.c From 3e4d31a2fbb6437cfec6b4af210c540cc01a5383 Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 17 Jul 2024 00:49:35 +0000 Subject: [PATCH 11/45] compile --- source/dnode/mnode/impl/src/mndAcct.c | 2 +- source/dnode/mnode/impl/src/mndArbGroup.c | 58 +++++++++++------------ source/dnode/mnode/impl/src/mndCluster.c | 10 ++-- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndAcct.c b/source/dnode/mnode/impl/src/mndAcct.c index e8ea301b55..99f545ba74 100644 --- a/source/dnode/mnode/impl/src/mndAcct.c +++ b/source/dnode/mnode/impl/src/mndAcct.c @@ -248,7 +248,7 @@ static int32_t mndProcessAlterAcctReq(SRpcMsg *pReq) { static int32_t mndProcessDropAcctReq(SRpcMsg *pReq) { int32_t code = 0; - if (code = mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_DROP_ACCT) != 0) { + if ((code = mndCheckOperPrivilege(pReq->info.node, pReq->info.conn.user, MND_OPER_DROP_ACCT)) != 0) { TAOS_RETURN(code); } diff --git a/source/dnode/mnode/impl/src/mndArbGroup.c b/source/dnode/mnode/impl/src/mndArbGroup.c index dd683483cd..c3c150ba50 100644 --- a/source/dnode/mnode/impl/src/mndArbGroup.c +++ b/source/dnode/mnode/impl/src/mndArbGroup.c @@ -259,8 +259,8 @@ int32_t mndSetCreateArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup) { code = terrno; TAOS_RETURN(code); } - if (code = mndTransAppendRedolog(pTrans, pRedoRaw) != 0) TAOS_RETURN(code); - if (code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_CREATING) != 0) TAOS_RETURN(code); + if ((code = mndTransAppendRedolog(pTrans, pRedoRaw)) != 0) TAOS_RETURN(code); + if ((code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_CREATING)) != 0) TAOS_RETURN(code); return 0; } @@ -271,8 +271,8 @@ int32_t mndSetCreateArbGroupUndoLogs(STrans *pTrans, SArbGroup *pGroup) { code = terrno; TAOS_RETURN(code); } - if (code = mndTransAppendUndolog(pTrans, pUndoRaw) != 0) TAOS_RETURN(code); - if (code = sdbSetRawStatus(pUndoRaw, SDB_STATUS_DROPPED) != 0) TAOS_RETURN(code); + if ((code = mndTransAppendUndolog(pTrans, pUndoRaw)) != 0) TAOS_RETURN(code); + if ((code = sdbSetRawStatus(pUndoRaw, SDB_STATUS_DROPPED)) != 0) TAOS_RETURN(code); return 0; } @@ -283,8 +283,8 @@ int32_t mndSetCreateArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup) { code = terrno; TAOS_RETURN(code); } - if (code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) TAOS_RETURN(code); - if (code = sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY) != 0) TAOS_RETURN(code); + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0)) TAOS_RETURN(code); + if ((code = sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY)) != 0) TAOS_RETURN(code); return 0; } @@ -295,8 +295,8 @@ int32_t mndSetDropArbGroupPrepareLogs(STrans *pTrans, SArbGroup *pGroup) { code = terrno; TAOS_RETURN(code); } - if (code = mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) TAOS_RETURN(code); - if (code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) TAOS_RETURN(code); + if ((code = mndTransAppendPrepareLog(pTrans, pRedoRaw)) != 0) TAOS_RETURN(code); + if ((code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING)) != 0) TAOS_RETURN(code); return 0; } @@ -307,8 +307,8 @@ static int32_t mndSetDropArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup) { code = terrno; TAOS_RETURN(code); } - if (code = mndTransAppendRedolog(pTrans, pRedoRaw) != 0) TAOS_RETURN(code); - if (code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) TAOS_RETURN(code); + if ((code = mndTransAppendRedolog(pTrans, pRedoRaw)) != 0) TAOS_RETURN(code); + if ((code = sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING)) != 0) TAOS_RETURN(code); return 0; } @@ -319,8 +319,8 @@ int32_t mndSetDropArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup) { code = terrno; TAOS_RETURN(code); } - if (code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) TAOS_RETURN(code); - if (code = sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED) != 0) TAOS_RETURN(code); + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw)) != 0) TAOS_RETURN(code); + if ((code = sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED)) != 0) TAOS_RETURN(code); return 0; } @@ -407,7 +407,7 @@ static int32_t mndProcessArbHbTimer(SRpcMsg *pReq) { } char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (code = mndGetArbToken(pMnode, arbToken) != 0) { + if ((code = mndGetArbToken(pMnode, arbToken)) != 0) { mError("failed to get arb token for arb-hb timer"); pIter = taosHashIterate(pDnodeHash, NULL); while (pIter) { @@ -572,7 +572,7 @@ static int32_t mndProcessArbCheckSyncTimer(SRpcMsg *pReq) { void *pIter = NULL; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (code = mndGetArbToken(pMnode, arbToken) != 0) { + if ((code = mndGetArbToken(pMnode, arbToken)) != 0) { mError("failed to get arb token for arb-check-sync timer"); TAOS_RETURN(code); } @@ -792,7 +792,7 @@ static int32_t mndProcessArbUpdateGroupBatchReq(SRpcMsg *pReq) { size_t sz = 0; SMArbUpdateGroupBatchReq req = {0}; - if (code = tDeserializeSMArbUpdateGroupBatchReq(pReq->pCont, pReq->contLen, &req) != 0) { + if ((code = tDeserializeSMArbUpdateGroupBatchReq(pReq->pCont, pReq->contLen, &req)) != 0) { mError("arb failed to decode arb-update-group request"); TAOS_RETURN(code); } @@ -830,7 +830,7 @@ static int32_t mndProcessArbUpdateGroupBatchReq(SRpcMsg *pReq) { mndTransAddArbGroupId(pTrans, newGroup.vgId); - if (code = mndSetCreateArbGroupCommitLogs(pTrans, &newGroup) != 0) { + if ((code = mndSetCreateArbGroupCommitLogs(pTrans, &newGroup)) != 0) { mError("failed to update arbgroup in set commit log, vgId:%d, trans:%d, since %s", newGroup.vgId, pTrans->id, terrstr()); goto _OVER; @@ -844,8 +844,8 @@ static int32_t mndProcessArbUpdateGroupBatchReq(SRpcMsg *pReq) { sdbRelease(pMnode->pSdb, pOldGroup); } - if (code = mndTransCheckConflict(pMnode, pTrans) != 0) goto _OVER; - if (code = mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; + if ((code = mndTransCheckConflict(pMnode, pTrans)) != 0) goto _OVER; + if ((code = mndTransPrepare(pMnode, pTrans)) != 0) goto _OVER; code = 0; @@ -896,16 +896,16 @@ static int32_t mndArbGroupUpdateTrans(SMnode *pMnode, SArbGroup *pNew) { pNew->assignedLeader.token, pNew->assignedLeader.acked); mndTransAddArbGroupId(pTrans, pNew->vgId); - if (code = mndTransCheckConflict(pMnode, pTrans) != 0) { + if ((code = mndTransCheckConflict(pMnode, pTrans)) != 0) { goto _OVER; } - if (code = mndSetCreateArbGroupCommitLogs(pTrans, pNew) != 0) { + if ((code = mndSetCreateArbGroupCommitLogs(pTrans, pNew)) != 0) { mError("failed to update arbgroup in set commit log, vgId:%d, since %s", pNew->vgId, tstrerror(code)); goto _OVER; } - if (code = mndTransPrepare(pMnode, pTrans) != 0) goto _OVER; + if ((code = mndTransPrepare(pMnode, pTrans)) != 0) goto _OVER; code = 0; @@ -1067,13 +1067,13 @@ static int32_t mndProcessArbHbRsp(SRpcMsg *pRsp) { SSdb *pSdb = pMnode->pSdb; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (code = mndGetArbToken(pMnode, arbToken) != 0) { + if ((code = mndGetArbToken(pMnode, arbToken)) != 0) { mError("failed to get arb token for arb-hb response"); TAOS_RETURN(code); } SVArbHeartBeatRsp arbHbRsp = {0}; - if (code = tDeserializeSVArbHeartBeatRsp(pRsp->pCont, pRsp->contLen, &arbHbRsp) != 0) { + if ((code = tDeserializeSVArbHeartBeatRsp(pRsp->pCont, pRsp->contLen, &arbHbRsp)) != 0) { mInfo("arb hb-rsp des failed, since:%s", tstrerror(pRsp->code)); TAOS_RETURN(code); } @@ -1105,13 +1105,13 @@ static int32_t mndProcessArbCheckSyncRsp(SRpcMsg *pRsp) { SSdb *pSdb = pMnode->pSdb; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (code = mndGetArbToken(pMnode, arbToken) != 0) { + if ((code = mndGetArbToken(pMnode, arbToken)) != 0) { mError("failed to get arb token for arb-check-sync response"); TAOS_RETURN(code); } SVArbCheckSyncRsp syncRsp = {0}; - if (code = tDeserializeSVArbCheckSyncRsp(pRsp->pCont, pRsp->contLen, &syncRsp) != 0) { + if ((code = tDeserializeSVArbCheckSyncRsp(pRsp->pCont, pRsp->contLen, &syncRsp)) != 0) { mInfo("arb check-sync-rsp des failed, since:%s", tstrerror(pRsp->code)); if (pRsp->code == TSDB_CODE_MND_ARB_TOKEN_MISMATCH) { terrno = TSDB_CODE_SUCCESS; @@ -1128,7 +1128,7 @@ static int32_t mndProcessArbCheckSyncRsp(SRpcMsg *pRsp) { } bool newIsSync = (syncRsp.errCode == TSDB_CODE_SUCCESS); - if (code = mndUpdateArbSync(pMnode, syncRsp.vgId, syncRsp.member0Token, syncRsp.member1Token, newIsSync) != 0) { + if ((code = mndUpdateArbSync(pMnode, syncRsp.vgId, syncRsp.member0Token, syncRsp.member1Token, newIsSync)) != 0) { mInfo("failed to update arb sync for vgId:%d, since:%s", syncRsp.vgId, terrstr()); goto _OVER; } @@ -1183,13 +1183,13 @@ static int32_t mndProcessArbSetAssignedLeaderRsp(SRpcMsg *pRsp) { SSdb *pSdb = pMnode->pSdb; char arbToken[TSDB_ARB_TOKEN_SIZE]; - if (code = mndGetArbToken(pMnode, arbToken) != 0) { + if ((code = mndGetArbToken(pMnode, arbToken)) != 0) { mError("failed to get arb token for arb-set-assigned response"); TAOS_RETURN(code); } SVArbSetAssignedLeaderRsp setAssignedRsp = {0}; - if (code = tDeserializeSVArbSetAssignedLeaderRsp(pRsp->pCont, pRsp->contLen, &setAssignedRsp) != 0) { + if ((code = tDeserializeSVArbSetAssignedLeaderRsp(pRsp->pCont, pRsp->contLen, &setAssignedRsp)) != 0) { mInfo("arb set-assigned-rsp des failed, since:%s", tstrerror(pRsp->code)); TAOS_RETURN(code); } @@ -1213,7 +1213,7 @@ static int32_t mndProcessArbSetAssignedLeaderRsp(SRpcMsg *pRsp) { bool updateAssigned = mndUpdateArbGroupBySetAssignedLeader(pGroup, setAssignedRsp.vgId, setAssignedRsp.memberToken, pRsp->code, &newGroup); if (updateAssigned) { - if (code = mndPullupArbUpdateGroup(pMnode, &newGroup) != 0) { + if ((code = mndPullupArbUpdateGroup(pMnode, &newGroup)) != 0) { mInfo("failed to pullup update arb assigned for vgId:%d, since:%s", setAssignedRsp.vgId, tstrerror(code)); goto _OVER; } diff --git a/source/dnode/mnode/impl/src/mndCluster.c b/source/dnode/mnode/impl/src/mndCluster.c index 8bcd896cc6..89e808885d 100644 --- a/source/dnode/mnode/impl/src/mndCluster.c +++ b/source/dnode/mnode/impl/src/mndCluster.c @@ -266,14 +266,14 @@ static int32_t mndCreateDefaultCluster(SMnode *pMnode) { } mInfo("trans:%d, used to create cluster:%" PRId64, pTrans->id, clusterObj.id); - if (code = mndTransAppendCommitlog(pTrans, pRaw) != 0) { + if ((code = mndTransAppendCommitlog(pTrans, pRaw)) != 0) { mError("trans:%d, failed to commit redo log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); TAOS_RETURN(code); } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); - if (code = mndTransPrepare(pMnode, pTrans) != 0) { + if ((code = mndTransPrepare(pMnode, pTrans)) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); TAOS_RETURN(code); @@ -369,14 +369,14 @@ static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) { TAOS_RETURN(code); } - if (code = mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw)) != 0) { mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); TAOS_RETURN(code); } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); - if (code = mndTransPrepare(pMnode, pTrans) != 0) { + if ((code = mndTransPrepare(pMnode, pTrans)) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); TAOS_RETURN(code); @@ -396,7 +396,7 @@ int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) { } mInfo("cluster: start to config, option:%s, value:%s", cfgReq.config, cfgReq.value); - if (code = mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER) != 0) { + if ((code = mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CONFIG_CLUSTER)) != 0) { goto _exit; } From 0afc8a687ad32c4146fb2732fcc582b3b2635abc Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 17 Jul 2024 10:54:30 +0800 Subject: [PATCH 12/45] enh: grant supports mongodb --- tests/system-test/0-others/information_schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index d5754b1063..d7a5540544 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -297,7 +297,8 @@ class TDTestCase: 'mysql':'MySQL', 'postgres':'PostgreSQL', 'oracle':'Oracle', - 'mssql':'SqlServer' + 'mssql':'SqlServer', + 'mongodb':'MongoDB', } tdSql.execute('drop database if exists db2') From 1ed620e702fc70fe06cdeefcb12e37f382b3acc1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 11:17:27 +0800 Subject: [PATCH 13/45] fix(stream): return after get value. --- source/dnode/vnode/src/tsdb/tsdbRead2.c | 58 +++++++---- source/dnode/vnode/src/tsdb/tsdbReadUtil.c | 112 ++++++++++++++++----- source/dnode/vnode/src/tsdb/tsdbReadUtil.h | 1 - 3 files changed, 124 insertions(+), 47 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index cf2d23cfc8..dcca320f7f 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -48,7 +48,7 @@ typedef struct { static int32_t getCurrentBlockInfo(SDataBlockIter* pBlockIter, SFileDataBlockInfo** pInfo); static int32_t buildDataBlockFromBufImpl(STableBlockScanInfo* pBlockScanInfo, int64_t endKey, int32_t capacity, STsdbReader* pReader); -static TSDBROW* getValidMemRow(SIterInfo* pIter, const SArray* pDelList, STsdbReader* pReader); +static int32_t getValidMemRow(SIterInfo* pIter, const SArray* pDelList, STsdbReader* pReader, TSDBROW** pRow); static int32_t doMergeRowsInFileBlocks(SBlockData* pBlockData, STableBlockScanInfo* pScanInfo, SRowKey* pKey, STsdbReader* pReader); static int32_t doMergeRowsInSttBlock(SSttBlockReader* pSttBlockReader, STableBlockScanInfo* pScanInfo, @@ -2025,9 +2025,11 @@ static int32_t doMergeMultiLevelRows(STsdbReader* pReader, STableBlockScanInfo* SFileBlockDumpInfo* pDumpInfo = &pReader->status.fBlockDumpInfo; SArray* pDelList = pBlockScanInfo->delSkyline; int32_t pkSrcSlot = pReader->suppInfo.pkSrcSlot; + TSDBROW* pRow = NULL; + TSDBROW* piRow = NULL; - TSDBROW* pRow = getValidMemRow(&pBlockScanInfo->iter, pDelList, pReader); - TSDBROW* piRow = getValidMemRow(&pBlockScanInfo->iiter, pDelList, pReader); + getValidMemRow(&pBlockScanInfo->iter, pDelList, pReader, &pRow); + getValidMemRow(&pBlockScanInfo->iiter, pDelList, pReader, &piRow); SRowKey* pSttKey = NULL; if (hasDataInSttBlock(pBlockScanInfo) && (!pBlockScanInfo->cleanSttBlocks)) { @@ -2201,9 +2203,10 @@ int32_t doInitMemDataIter(STsdbReader* pReader, STbData** pData, STableBlockScan static void doForwardDataIter(SRowKey* pKey, SIterInfo* pIter, STableBlockScanInfo* pBlockScanInfo, STsdbReader* pReader) { SRowKey rowKey = {0}; + TSDBROW* pRow = NULL; while (1) { - TSDBROW* pRow = getValidMemRow(pIter, pBlockScanInfo->delSkyline, pReader); + getValidMemRow(pIter, pBlockScanInfo->delSkyline, pReader, &pRow); if (!pIter->hasVal) { break; } @@ -2559,11 +2562,11 @@ static int32_t buildComposedDataBlockImpl(STsdbReader* pReader, STableBlockScanI } if (pBlockScanInfo->iter.hasVal) { - pRow = getValidMemRow(&pBlockScanInfo->iter, pBlockScanInfo->delSkyline, pReader); + getValidMemRow(&pBlockScanInfo->iter, pBlockScanInfo->delSkyline, pReader, &pRow); } if (pBlockScanInfo->iiter.hasVal) { - piRow = getValidMemRow(&pBlockScanInfo->iiter, pBlockScanInfo->delSkyline, pReader); + getValidMemRow(&pBlockScanInfo->iiter, pBlockScanInfo->delSkyline, pReader, &piRow); } // two levels of mem-table does contain the valid rows @@ -2810,13 +2813,16 @@ TSDBKEY getCurrentKeyInBuf(STableBlockScanInfo* pScanInfo, STsdbReader* pReader) TSDBKEY key = {.ts = TSKEY_INITIAL_VAL}, ikey = {.ts = TSKEY_INITIAL_VAL}; bool hasKey = false, hasIKey = false; - TSDBROW* pRow = getValidMemRow(&pScanInfo->iter, pScanInfo->delSkyline, pReader); + TSDBROW* pRow = NULL; + TSDBROW* pIRow = NULL; + + getValidMemRow(&pScanInfo->iter, pScanInfo->delSkyline, pReader, &pRow); if (pRow != NULL) { hasKey = true; key = TSDBROW_KEY(pRow); } - TSDBROW* pIRow = getValidMemRow(&pScanInfo->iiter, pScanInfo->delSkyline, pReader); + getValidMemRow(&pScanInfo->iiter, pScanInfo->delSkyline, pReader, &pIRow); if (pIRow != NULL) { hasIKey = true; ikey = TSDBROW_KEY(pIRow); @@ -3742,9 +3748,11 @@ bool hasBeenDropped(const SArray* pDelList, int32_t* index, int64_t key, int64_t return false; } -FORCE_INLINE TSDBROW* getValidMemRow(SIterInfo* pIter, const SArray* pDelList, STsdbReader* pReader) { +FORCE_INLINE int32_t getValidMemRow(SIterInfo* pIter, const SArray* pDelList, STsdbReader* pReader, TSDBROW** pRes) { + *pRes = NULL; + if (!pIter->hasVal) { - return NULL; + return TSDB_CODE_SUCCESS; } int32_t order = pReader->info.order; @@ -3754,18 +3762,20 @@ FORCE_INLINE TSDBROW* getValidMemRow(SIterInfo* pIter, const SArray* pDelList, S TSDBROW_INIT_KEY(pRow, key); if (outOfTimeWindow(key.ts, &pReader->info.window)) { pIter->hasVal = false; - return NULL; + return TSDB_CODE_SUCCESS; } // it is a valid data version if (key.version <= pReader->info.verRange.maxVer && key.version >= pReader->info.verRange.minVer) { if (pDelList == NULL || TARRAY_SIZE(pDelList) == 0) { - return pRow; + *pRes = pRow; + return TSDB_CODE_SUCCESS; } else { bool dropped = hasBeenDropped(pDelList, &pIter->index, key.ts, key.version, order, &pReader->info.verRange, pReader->suppInfo.numOfPks > 0); if (!dropped) { - return pRow; + *pRes = pRow; + return TSDB_CODE_SUCCESS; } } } @@ -3773,7 +3783,7 @@ FORCE_INLINE TSDBROW* getValidMemRow(SIterInfo* pIter, const SArray* pDelList, S while (1) { pIter->hasVal = tsdbTbDataIterNext(pIter->iter); if (!pIter->hasVal) { - return NULL; + return TSDB_CODE_SUCCESS; } pRow = tsdbTbDataIterGet(pIter->iter); @@ -3781,17 +3791,19 @@ FORCE_INLINE TSDBROW* getValidMemRow(SIterInfo* pIter, const SArray* pDelList, S TSDBROW_INIT_KEY(pRow, key); if (outOfTimeWindow(key.ts, &pReader->info.window)) { pIter->hasVal = false; - return NULL; + return TSDB_CODE_SUCCESS; } if (key.version <= pReader->info.verRange.maxVer && key.version >= pReader->info.verRange.minVer) { if (pDelList == NULL || TARRAY_SIZE(pDelList) == 0) { - return pRow; + *pRes = pRow; + return TSDB_CODE_SUCCESS; } else { bool dropped = hasBeenDropped(pDelList, &pIter->index, key.ts, key.version, order, &pReader->info.verRange, pReader->suppInfo.numOfPks > 0); if (!dropped) { - return pRow; + *pRes = pRow; + return TSDB_CODE_SUCCESS; } } } @@ -3809,7 +3821,8 @@ int32_t doMergeRowsInBuf(SIterInfo* pIter, uint64_t uid, SRowKey* pCurKey, SArra } // data exists but not valid - TSDBROW* pRow = getValidMemRow(pIter, pDelList, pReader); + TSDBROW* pRow = NULL; + getValidMemRow(pIter, pDelList, pReader, &pRow); if (pRow == NULL) { break; } @@ -3974,7 +3987,7 @@ int32_t doMergeMemTableMultiRows(TSDBROW* pRow, SRowKey* pKey, uint64_t uid, SIt *freeTSRow = false; return TSDB_CODE_SUCCESS; } else { // has next point in mem/imem - pNextRow = getValidMemRow(pIter, pDelList, pReader); + getValidMemRow(pIter, pDelList, pReader, &pNextRow); if (pNextRow == NULL) { *pResRow = current; *freeTSRow = false; @@ -4118,8 +4131,11 @@ int32_t doMergeMemIMemRows(TSDBROW* pRow, SRowKey* pRowKey, TSDBROW* piRow, SRow static int32_t tsdbGetNextRowInMem(STableBlockScanInfo* pBlockScanInfo, STsdbReader* pReader, TSDBROW* pResRow, int64_t endKey, bool* freeTSRow) { - TSDBROW* pRow = getValidMemRow(&pBlockScanInfo->iter, pBlockScanInfo->delSkyline, pReader); - TSDBROW* piRow = getValidMemRow(&pBlockScanInfo->iiter, pBlockScanInfo->delSkyline, pReader); + TSDBROW* pRow = NULL; + TSDBROW* piRow = NULL; + + getValidMemRow(&pBlockScanInfo->iter, pBlockScanInfo->delSkyline, pReader, &pRow); + getValidMemRow(&pBlockScanInfo->iiter, pBlockScanInfo->delSkyline, pReader, &piRow); SArray* pDelList = pBlockScanInfo->delSkyline; uint64_t uid = pBlockScanInfo->uid; diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c index 84f235ab25..f0918ceb22 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c @@ -37,7 +37,10 @@ static int32_t initBlockScanInfoBuf(SBlockInfoBuf* pBuf, int32_t numOfTables) { return TSDB_CODE_OUT_OF_MEMORY; } - taosArrayPush(pBuf->pData, &p); + void* px = taosArrayPush(pBuf->pData, &p); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } if (remainder > 0) { @@ -45,7 +48,10 @@ static int32_t initBlockScanInfoBuf(SBlockInfoBuf* pBuf, int32_t numOfTables) { if (p == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } - taosArrayPush(pBuf->pData, &p); + void* px = taosArrayPush(pBuf->pData, &p); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } pBuf->numOfTables = numOfTables; @@ -86,7 +92,10 @@ int32_t ensureBlockScanInfoBuf(SBlockInfoBuf* pBuf, int32_t numOfTables) { return TSDB_CODE_OUT_OF_MEMORY; } - taosArrayPush(pBuf->pData, &p); + void* px = taosArrayPush(pBuf->pData, &p); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } if (remainder > 0) { @@ -94,7 +103,10 @@ int32_t ensureBlockScanInfoBuf(SBlockInfoBuf* pBuf, int32_t numOfTables) { if (p == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } - taosArrayPush(pBuf->pData, &p); + void* px = taosArrayPush(pBuf->pData, &p); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } pBuf->numOfTables = numOfTables; @@ -214,7 +226,8 @@ void clearRowKey(SRowKey* pKey) { taosMemoryFreeClear(pKey->pks[0].pData); } -static void initLastProcKey(STableBlockScanInfo *pScanInfo, STsdbReader* pReader) { +static int32_t initLastProcKey(STableBlockScanInfo *pScanInfo, STsdbReader* pReader) { + int32_t code = 0; int32_t numOfPks = pReader->suppInfo.numOfPks; bool asc = ASCENDING_TRAVERSE(pReader->info.order); int8_t type = pReader->suppInfo.pk.type; @@ -225,18 +238,37 @@ static void initLastProcKey(STableBlockScanInfo *pScanInfo, STsdbReader* pReader int64_t skey = pReader->info.window.skey; int64_t ts = (skey > INT64_MIN) ? (skey - 1) : skey; - initRowKey(pRowKey, ts, numOfPks, type, bytes, asc); - initRowKey(&pScanInfo->sttKeyInfo.nextProcKey, skey, numOfPks, type, bytes, asc); + code = initRowKey(pRowKey, ts, numOfPks, type, bytes, asc); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + code = initRowKey(&pScanInfo->sttKeyInfo.nextProcKey, skey, numOfPks, type, bytes, asc); + if (code != TSDB_CODE_SUCCESS) { + return code; + } } else { int64_t ekey = pReader->info.window.ekey; int64_t ts = (ekey < INT64_MAX) ? (ekey + 1) : ekey; - initRowKey(pRowKey, ts, numOfPks, type, bytes, asc); - initRowKey(&pScanInfo->sttKeyInfo.nextProcKey, ekey, numOfPks, type, bytes, asc); + code = initRowKey(pRowKey, ts, numOfPks, type, bytes, asc); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + code = initRowKey(&pScanInfo->sttKeyInfo.nextProcKey, ekey, numOfPks, type, bytes, asc); + if (code != TSDB_CODE_SUCCESS) { + return code; + } } - initRowKey(&pScanInfo->sttRange.skey, INT64_MAX, numOfPks, type, bytes, asc); - initRowKey(&pScanInfo->sttRange.ekey, INT64_MIN, numOfPks, type, bytes, asc); + code = initRowKey(&pScanInfo->sttRange.skey, INT64_MAX, numOfPks, type, bytes, asc); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + code = initRowKey(&pScanInfo->sttRange.ekey, INT64_MIN, numOfPks, type, bytes, asc); + return code; } int32_t initTableBlockScanInfo(STableBlockScanInfo* pScanInfo, uint64_t uid, SSHashObj* pTableMap, @@ -248,10 +280,13 @@ int32_t initTableBlockScanInfo(STableBlockScanInfo* pScanInfo, uint64_t uid, SSH pScanInfo->cleanSttBlocks = false; pScanInfo->sttBlockReturned = false; - initLastProcKey(pScanInfo, pReader); + int32_t code = initLastProcKey(pScanInfo, pReader); + if (code != TSDB_CODE_SUCCESS) { + return code; + } pScanInfo->sttKeyInfo.status = STT_FILE_READER_UNINIT; - int32_t code = tSimpleHashPut(pTableMap, &pScanInfo->uid, sizeof(uint64_t), &pScanInfo, POINTER_BYTES); + code = tSimpleHashPut(pTableMap, &pScanInfo->uid, sizeof(uint64_t), &pScanInfo, POINTER_BYTES); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -607,7 +642,10 @@ int32_t initBlockIterator(STsdbReader* pReader, SDataBlockIter* pBlockIter, int3 STableBlockScanInfo* pTableScanInfo = taosArrayGetP(pTableList, 0); for (int32_t i = 0; i < numOfBlocks; ++i) { STableDataBlockIdx tableDataBlockIdx = {.globalIndex = i}; - taosArrayPush(pTableScanInfo->pBlockIdxList, &tableDataBlockIdx); + void* px = taosArrayPush(pTableScanInfo->pBlockIdxList, &tableDataBlockIdx); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } taosArrayAddAll(pBlockIter->blockList, pTableScanInfo->pBlockList); @@ -640,11 +678,18 @@ int32_t initBlockIterator(STsdbReader* pReader, SDataBlockIter* pBlockIter, int3 int32_t index = sup.indexPerTable[pos]++; SFileDataBlockInfo* pBlockInfo = taosArrayGet(sup.pDataBlockInfo[pos][index].pInfo->pBlockList, index); - taosArrayPush(pBlockIter->blockList, pBlockInfo); + void* px = taosArrayPush(pBlockIter->blockList, pBlockInfo); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } STableBlockScanInfo* pTableScanInfo = sup.pDataBlockInfo[pos][index].pInfo; STableDataBlockIdx tableDataBlockIdx = {.globalIndex = numOfTotal}; - taosArrayPush(pTableScanInfo->pBlockIdxList, &tableDataBlockIdx); + + px = taosArrayPush(pTableScanInfo->pBlockIdxList, &tableDataBlockIdx); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } // set data block index overflow, in order to disable the offset comparator if (sup.indexPerTable[pos] >= sup.numOfBlocksPerTable[pos]) { @@ -752,7 +797,10 @@ static int32_t doCheckTombBlock(STombBlock* pBlock, STsdbReader* pReader, int32_ if (record.version <= pReader->info.verRange.maxVer) { SDelData delData = {.version = record.version, .sKey = record.skey, .eKey = record.ekey}; - taosArrayPush(pScanInfo->pFileDelData, &delData); + void* px = taosArrayPush(pScanInfo->pFileDelData, &delData); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } } @@ -858,7 +906,10 @@ int32_t loadMemTombData(SArray** ppMemDelData, STbData* pMemTbData, STbData* piM p = pMemTbData->pHead; while (p) { if (p->version <= ver) { - taosArrayPush(pMemDelData, p); + void* px = taosArrayPush(pMemDelData, p); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } p = p->pNext; @@ -870,7 +921,10 @@ int32_t loadMemTombData(SArray** ppMemDelData, STbData* pMemTbData, STbData* piM p = piMemTbData->pHead; while (p) { if (p->version <= ver) { - taosArrayPush(pMemDelData, p); + void* px = taosArrayPush(pMemDelData, p); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } p = p->pNext; } @@ -914,7 +968,7 @@ int32_t getNumOfRowsInSttBlock(SSttFileReader* pSttFileReader, SSttBlockLoadInfo } if (index >= pStatisBlock->numOfRecords) { - tStatisBlockDestroy(pStatisBlock); + (void) tStatisBlockDestroy(pStatisBlock); taosMemoryFreeClear(pStatisBlock); return num; } @@ -924,7 +978,7 @@ int32_t getNumOfRowsInSttBlock(SSttFileReader* pSttFileReader, SSttBlockLoadInfo while (i < TARRAY2_SIZE(pStatisBlkArray) && uidIndex < numOfTables) { p = &pStatisBlkArray->data[i]; if (p->minTbid.suid > suid) { - tStatisBlockDestroy(pStatisBlock); + (void) tStatisBlockDestroy(pStatisBlock); taosMemoryFreeClear(pStatisBlock); return num; } @@ -944,7 +998,7 @@ int32_t getNumOfRowsInSttBlock(SSttFileReader* pSttFileReader, SSttBlockLoadInfo } } - tStatisBlockDestroy(pStatisBlock); + (void) tStatisBlockDestroy(pStatisBlock); taosMemoryFreeClear(pStatisBlock); return num; } @@ -961,14 +1015,17 @@ static void loadNextStatisticsBlock(SSttFileReader* pSttFileReader, STbStatisBlo } } -void doAdjustValidDataIters(SArray* pLDIterList, int32_t numOfFileObj) { +int32_t doAdjustValidDataIters(SArray* pLDIterList, int32_t numOfFileObj) { int32_t size = taosArrayGetSize(pLDIterList); if (size < numOfFileObj) { int32_t inc = numOfFileObj - size; for (int32_t k = 0; k < inc; ++k) { SLDataIter* pIter = taosMemoryCalloc(1, sizeof(SLDataIter)); - taosArrayPush(pLDIterList, &pIter); + void* px = taosArrayPush(pLDIterList, &pIter); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } } else if (size > numOfFileObj) { // remove unused LDataIter int32_t inc = size - numOfFileObj; @@ -978,6 +1035,8 @@ void doAdjustValidDataIters(SArray* pLDIterList, int32_t numOfFileObj) { destroyLDataIter(pIter); } } + + return TSDB_CODE_SUCCESS; } int32_t adjustSttDataIters(SArray* pSttFileBlockIterArray, STFileSet* pFileSet) { @@ -986,7 +1045,10 @@ int32_t adjustSttDataIters(SArray* pSttFileBlockIterArray, STFileSet* pFileSet) // add the list/iter placeholder while (taosArrayGetSize(pSttFileBlockIterArray) < numOfLevels) { SArray* pList = taosArrayInit(4, POINTER_BYTES); - taosArrayPush(pSttFileBlockIterArray, &pList); + void* px = taosArrayPush(pSttFileBlockIterArray, &pList); + if (px == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } for (int32_t j = 0; j < numOfLevels; ++j) { diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.h b/source/dnode/vnode/src/tsdb/tsdbReadUtil.h index 45a2384b65..865e8e2d41 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.h +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.h @@ -247,7 +247,6 @@ typedef struct SDataBlockIter { typedef struct SFileBlockDumpInfo { int32_t totalRows; int32_t rowIndex; -// STsdbRowKey lastKey; // this key should be removed bool allDumped; } SFileBlockDumpInfo; From 14f149cdd3385a157409e8eb2a67cc56415c5598 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 11:47:05 +0800 Subject: [PATCH 14/45] refactor: check return value for each function. --- source/dnode/vnode/src/tsdb/tsdbRead2.c | 2 +- source/dnode/vnode/src/tsdb/tsdbReadUtil.c | 45 ++++++++++++++++------ 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index dcca320f7f..9ee5e1c7ba 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -708,7 +708,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S while (1) { int32_t code = getNextBrinRecord(&iter, &pRecord); if (code != TSDB_CODE_SUCCESS) { - break; + return code; } if (pRecord->suid > pReader->info.suid) { diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c index f0918ceb22..f937dac606 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c @@ -27,8 +27,12 @@ static bool overlapWithDelSkylineWithoutVer(STableBlockScanInfo* pBlockScanInfo, static int32_t initBlockScanInfoBuf(SBlockInfoBuf* pBuf, int32_t numOfTables) { int32_t num = numOfTables / pBuf->numPerBucket; int32_t remainder = numOfTables % pBuf->numPerBucket; + if (pBuf->pData == NULL) { pBuf->pData = taosArrayInit(num + 1, POINTER_BYTES); + if (pBuf->pData == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } for (int32_t i = 0; i < num; ++i) { @@ -310,7 +314,10 @@ int32_t createDataBlockScanInfo(STsdbReader* pTsdbReader, SBlockInfoBuf* pBuf, c } int64_t st = taosGetTimestampUs(); - initBlockScanInfoBuf(pBuf, numOfTables); + code = initBlockScanInfoBuf(pBuf, numOfTables); + if (code != TSDB_CODE_SUCCESS) { + return code; + } pUidList->tableUidList = taosMemoryMalloc(numOfTables * sizeof(uint64_t)); if (pUidList->tableUidList == NULL) { @@ -459,7 +466,7 @@ int32_t getNextBrinRecord(SBrinRecordIter* pIter, SBrinRecord** pRecord) { pIter->pCurrentBlk = taosArrayGet(pIter->pBrinBlockList, pIter->blockIndex); - tBrinBlockClear(&pIter->block); + (void) tBrinBlockClear(&pIter->block); int32_t code = tsdbDataFileReadBrinBlock(pIter->pReader, pIter->pCurrentBlk, &pIter->block); if (code != TSDB_CODE_SUCCESS) { tsdbError("failed to read brinBlock from file, code:%s", tstrerror(code)); @@ -470,13 +477,13 @@ int32_t getNextBrinRecord(SBrinRecordIter* pIter, SBrinRecord** pRecord) { } pIter->recordIndex += 1; - tBrinBlockGet(&pIter->block, pIter->recordIndex, &pIter->record); + int32_t code = tBrinBlockGet(&pIter->block, pIter->recordIndex, &pIter->record); *pRecord = &pIter->record; - return TSDB_CODE_SUCCESS; + return code; } -void clearBrinBlockIter(SBrinRecordIter* pIter) { tBrinBlockDestroy(&pIter->block); } +void clearBrinBlockIter(SBrinRecordIter* pIter) { (void) tBrinBlockDestroy(&pIter->block); } // initialize the file block access order // sort the file blocks according to the offset of each data block in the files @@ -648,7 +655,11 @@ int32_t initBlockIterator(STsdbReader* pReader, SDataBlockIter* pBlockIter, int3 } } - taosArrayAddAll(pBlockIter->blockList, pTableScanInfo->pBlockList); + void* p = taosArrayAddAll(pBlockIter->blockList, pTableScanInfo->pBlockList); + if (p != NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + taosArrayDestroy(pTableScanInfo->pBlockList); pTableScanInfo->pBlockList = NULL; @@ -854,7 +865,7 @@ static int32_t doLoadTombDataFromTombBlk(const TTombBlkArray* pTombBlkArray, STs ETombBlkCheckEnum ret = 0; code = doCheckTombBlock(&block, pReader, numOfTables, &j, &ret); - tTombBlockDestroy(&block); + (void) tTombBlockDestroy(&block); if (code != TSDB_CODE_SUCCESS || ret == BLK_CHECK_QUIT) { return code; } @@ -953,10 +964,13 @@ int32_t getNumOfRowsInSttBlock(SSttFileReader* pSttFileReader, SSttBlockLoadInfo SStatisBlk* p = &pStatisBlkArray->data[i]; STbStatisBlock* pStatisBlock = taosMemoryCalloc(1, sizeof(STbStatisBlock)); - tStatisBlockInit(pStatisBlock); + (void) tStatisBlockInit(pStatisBlock); int64_t st = taosGetTimestampMs(); - tsdbSttFileReadStatisBlock(pSttFileReader, p, pStatisBlock); + int32_t code = tsdbSttFileReadStatisBlock(pSttFileReader, p, pStatisBlock); + if (code != TSDB_CODE_SUCCESS) { + return 0; + } double el = (taosGetTimestampMs() - st) / 1000.0; pBlockLoadInfo->cost.loadStatisBlocks += 1; @@ -1010,7 +1024,7 @@ static void loadNextStatisticsBlock(SSttFileReader* pSttFileReader, STbStatisBlo (*i) += 1; (*j) = 0; if ((*i) < TARRAY2_SIZE(pStatisBlkArray)) { - tsdbSttFileReadStatisBlock(pSttFileReader, &pStatisBlkArray->data[(*i)], pStatisBlock); + (void) tsdbSttFileReadStatisBlock(pSttFileReader, &pStatisBlkArray->data[(*i)], pStatisBlock); } } } @@ -1041,6 +1055,7 @@ int32_t doAdjustValidDataIters(SArray* pLDIterList, int32_t numOfFileObj) { int32_t adjustSttDataIters(SArray* pSttFileBlockIterArray, STFileSet* pFileSet) { int32_t numOfLevels = pFileSet->lvlArr->size; + int32_t code = 0; // add the list/iter placeholder while (taosArrayGetSize(pSttFileBlockIterArray) < numOfLevels) { @@ -1054,7 +1069,10 @@ int32_t adjustSttDataIters(SArray* pSttFileBlockIterArray, STFileSet* pFileSet) for (int32_t j = 0; j < numOfLevels; ++j) { SSttLvl* pSttLevel = pFileSet->lvlArr->data[j]; SArray* pList = taosArrayGetP(pSttFileBlockIterArray, j); - doAdjustValidDataIters(pList, TARRAY2_SIZE(pSttLevel->fobjArr)); + code = doAdjustValidDataIters(pList, TARRAY2_SIZE(pSttLevel->fobjArr)); + if (code != TSDB_CODE_SUCCESS) { + return code; + } } return TSDB_CODE_SUCCESS; @@ -1072,7 +1090,10 @@ int32_t tsdbGetRowsInSttFiles(STFileSet* pFileSet, SArray* pSttFileBlockIterArra } // add the list/iter placeholder - adjustSttDataIters(pSttFileBlockIterArray, pFileSet); + code = adjustSttDataIters(pSttFileBlockIterArray, pFileSet); + if (code != TSDB_CODE_SUCCESS) { + return numOfRows; + } for (int32_t j = 0; j < numOfLevels; ++j) { SSttLvl* pSttLevel = pFileSet->lvlArr->data[j]; From 394da5d8bf9de323358c7a642d28839346c13486 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Mon, 15 Jul 2024 11:31:39 +0800 Subject: [PATCH 15/45] fix: (pk) load last cache from tsdb --- source/dnode/vnode/src/tsdb/tsdbCache.c | 217 +++--------------------- 1 file changed, 19 insertions(+), 198 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 4597a44845..e3c5098ccd 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -1307,186 +1307,6 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCacheRowsReader *pr, int16_t *aCols, int nCols, int16_t *slotIds); -#ifdef BUILD_NO_CALL -static SLastCol *tsdbCacheLookup(STsdb *pTsdb, tb_uid_t uid, int16_t cid, int8_t ltype) { - SLastCol *pLastCol = NULL; - - char *err = NULL; - size_t vlen = 0; - SLastKey *key = &(SLastKey){.ltype = ltype, .uid = uid, .cid = cid}; - size_t klen = ROCKS_KEY_LEN; - char *value = NULL; - value = rocksdb_get(pTsdb->rCache.db, pTsdb->rCache.readoptions, (char *)key, klen, &vlen, &err); - if (NULL != err) { - tsdbError("vgId:%d, %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, err); - rocksdb_free(err); - } - - pLastCol = tsdbCacheDeserialize(value); - - return pLastCol; -} - -int32_t tsdbCacheGetSlow(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsReader *pr, int8_t ltype) { - rocksdb_writebatch_t *wb = NULL; - int32_t code = 0; - - SArray *pCidList = pr->pCidList; - int num_keys = TARRAY_SIZE(pCidList); - - char **keys_list = taosMemoryMalloc(num_keys * sizeof(char *)); - size_t *keys_list_sizes = taosMemoryMalloc(num_keys * sizeof(size_t)); - char *key_list = taosMemoryMalloc(num_keys * ROCKS_KEY_LEN); - for (int i = 0; i < num_keys; ++i) { - int16_t cid = *(int16_t *)taosArrayGet(pCidList, i); - - memcpy(key_list + i * ROCKS_KEY_LEN, &(SLastKey){.ltype = ltype, .uid = uid, .cid = cid}, ROCKS_KEY_LEN); - keys_list[i] = key_list + i * ROCKS_KEY_LEN; - keys_list_sizes[i] = ROCKS_KEY_LEN; - } - - char **values_list = taosMemoryCalloc(num_keys, sizeof(char *)); - size_t *values_list_sizes = taosMemoryCalloc(num_keys, sizeof(size_t)); - char **errs = taosMemoryMalloc(num_keys * sizeof(char *)); - rocksdb_multi_get(pTsdb->rCache.db, pTsdb->rCache.readoptions, num_keys, (const char *const *)keys_list, - keys_list_sizes, values_list, values_list_sizes, errs); - for (int i = 0; i < num_keys; ++i) { - if (errs[i]) { - rocksdb_free(errs[i]); - } - } - taosMemoryFree(key_list); - taosMemoryFree(keys_list); - taosMemoryFree(keys_list_sizes); - taosMemoryFree(errs); - - for (int i = 0; i < num_keys; ++i) { - bool freeCol = true; - SArray *pTmpColArray = NULL; - SLastCol *pLastCol = tsdbCacheDeserialize(values_list[i]); - int16_t cid = *(int16_t *)taosArrayGet(pCidList, i); - SLastCol noneCol = {.ts = TSKEY_MIN, .colVal = COL_VAL_NONE(cid, pr->pSchema->columns[pr->pSlotIds[i]].type)}; - if (pLastCol) { - reallocVarData(&pLastCol->colVal); - } else { - taosThreadMutexLock(&pTsdb->rCache.rMutex); - - pLastCol = tsdbCacheLookup(pTsdb, uid, cid, ltype); - if (!pLastCol) { - // recalc: load from tsdb - int16_t aCols[1] = {cid}; - int16_t slotIds[1] = {pr->pSlotIds[i]}; - pTmpColArray = NULL; - - if (ltype) { - mergeLastCid(uid, pTsdb, &pTmpColArray, pr, aCols, 1, slotIds); - } else { - mergeLastRowCid(uid, pTsdb, &pTmpColArray, pr, aCols, 1, slotIds); - } - - if (pTmpColArray && TARRAY_SIZE(pTmpColArray) >= 1) { - pLastCol = taosArrayGet(pTmpColArray, 0); - freeCol = false; - } - - // still null, then make up a none col value - if (!pLastCol) { - pLastCol = &noneCol; - freeCol = false; - } - - // store result back to rocks cache - wb = pTsdb->rCache.rwritebatch; - char *value = NULL; - size_t vlen = 0; - tsdbCacheSerialize(pLastCol, &value, &vlen); - - SLastKey *key = &(SLastKey){.ltype = ltype, .uid = uid, .cid = pLastCol->colVal.cid}; - size_t klen = ROCKS_KEY_LEN; - rocksdb_writebatch_put(wb, (char *)key, klen, value, vlen); - - taosMemoryFree(value); - } else { - reallocVarData(&pLastCol->colVal); - } - - if (wb) { - rocksMayWrite(pTsdb, false, true, false); - } - - taosThreadMutexUnlock(&pTsdb->rCache.rMutex); - } - - taosArrayPush(pLastArray, pLastCol); - taosArrayDestroy(pTmpColArray); - if (freeCol) { - taosMemoryFree(pLastCol); - } - } - taosMemoryFree(values_list); - taosMemoryFree(values_list_sizes); - - return code; -} - -static SLastCol *tsdbCacheLoadCol(STsdb *pTsdb, SCacheRowsReader *pr, int16_t slotid, tb_uid_t uid, int16_t cid, - int8_t ltype) { - SLastCol *pLastCol = tsdbCacheLookup(pTsdb, uid, cid, ltype); - if (!pLastCol) { - rocksdb_writebatch_t *wb = NULL; - - taosThreadMutexLock(&pTsdb->rCache.rMutex); - pLastCol = tsdbCacheLookup(pTsdb, uid, cid, ltype); - if (!pLastCol) { - // recalc: load from tsdb - int16_t aCols[1] = {cid}; - int16_t slotIds[1] = {slotid}; - SArray *pTmpColArray = NULL; - - if (ltype) { - mergeLastCid(uid, pTsdb, &pTmpColArray, pr, aCols, 1, slotIds); - } else { - mergeLastRowCid(uid, pTsdb, &pTmpColArray, pr, aCols, 1, slotIds); - } - - if (pTmpColArray && TARRAY_SIZE(pTmpColArray) >= 1) { - pLastCol = taosArrayGet(pTmpColArray, 0); - } - - // still null, then make up a none col value - SLastCol noneCol = {.ts = TSKEY_MIN, .colVal = COL_VAL_NONE(cid, pr->pSchema->columns[slotid].type)}; - if (!pLastCol) { - pLastCol = &noneCol; - } - - // store result back to rocks cache - wb = pTsdb->rCache.rwritebatch; - char *value = NULL; - size_t vlen = 0; - tsdbCacheSerialize(pLastCol, &value, &vlen); - - SLastKey *key = &(SLastKey){.ltype = ltype, .uid = uid, .cid = pLastCol->colVal.cid}; - size_t klen = ROCKS_KEY_LEN; - rocksdb_writebatch_put(wb, (char *)key, klen, value, vlen); - taosMemoryFree(value); - - SLastCol *pTmpLastCol = taosMemoryCalloc(1, sizeof(SLastCol)); - *pTmpLastCol = *pLastCol; - pLastCol = pTmpLastCol; - - taosArrayDestroy(pTmpColArray); - } - - if (wb) { - rocksMayWrite(pTsdb, false, true, false); - } - - taosThreadMutexUnlock(&pTsdb->rCache.rMutex); - } - - return pLastCol; -} -#endif static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SArray *remainCols, SCacheRowsReader *pr, int8_t ltype) { @@ -3449,8 +3269,9 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC taosArrayPush(aColArray, &aCols[i]); } - TSKEY lastRowTs = TSKEY_MAX; + STsdbRowKey lastRowKey = {.key.ts = TSKEY_MAX}; + // inverse iterator CacheNextRowIter iter = {0}; nextRowIterOpen(&iter, uid, pTsdb, pTSchema, pr->info.suid, pr->pLDataIterArray, pr->pReadSnap, pr->lastTs, pr); @@ -3474,10 +3295,11 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC } // int16_t nCol = pTSchema->numOfCols; - TSKEY rowTs = TSDBROW_TS(pRow); + STsdbRowKey rowKey = {0}; + tsdbRowGetKey(pRow, &rowKey); - if (lastRowTs == TSKEY_MAX) { - lastRowTs = rowTs; + if (lastRowKey.key.ts == TSKEY_MAX) { // first time + lastRowKey = rowKey; for (int16_t iCol = noneCol; iCol < nCols; ++iCol) { if (iCol >= nLastCol) { @@ -3497,13 +3319,13 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC if (slotIds[iCol] == 0) { STColumn *pTColumn = &pTSchema->columns[0]; - *pColVal = COL_VAL_VALUE(pTColumn->colId, ((SValue){.type = pTColumn->type, .val = rowTs})); - taosArraySet(pColArray, 0, &(SLastCol){.rowKey.ts = rowTs, .colVal = *pColVal}); + *pColVal = COL_VAL_VALUE(pTColumn->colId, ((SValue){.type = pTColumn->type, .val = rowKey.key.ts})); + taosArraySet(pColArray, 0, &(SLastCol){.rowKey = rowKey.key, .colVal = *pColVal}); continue; } tsdbRowGetColVal(pRow, pTSchema, slotIds[iCol], pColVal); - *pCol = (SLastCol){.rowKey.ts = rowTs, .colVal = *pColVal}; + *pCol = (SLastCol){.rowKey = rowKey.key, .colVal = *pColVal}; if (IS_VAR_DATA_TYPE(pColVal->value.type) /*&& pColVal->value.nData > 0*/) { if (pColVal->value.nData > 0) { pCol->colVal.value.pData = taosMemoryMalloc(pCol->colVal.value.nData); @@ -3550,10 +3372,11 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC continue; } SColVal *tColVal = &lastColVal->colVal; + if (COL_VAL_IS_VALUE(tColVal)) continue; tsdbRowGetColVal(pRow, pTSchema, slotIds[iCol], pColVal); - if (!COL_VAL_IS_VALUE(tColVal) && COL_VAL_IS_VALUE(pColVal)) { - SLastCol lastCol = {.rowKey.ts = rowTs, .colVal = *pColVal}; + if (COL_VAL_IS_VALUE(pColVal)) { + SLastCol lastCol = {.rowKey = rowKey.key, .colVal = *pColVal}; if (IS_VAR_DATA_TYPE(pColVal->value.type) /* && pColVal->value.nData > 0 */) { SLastCol *pLastCol = (SLastCol *)taosArrayGet(pColArray, iCol); taosMemoryFree(pLastCol->colVal.value.pData); @@ -3576,7 +3399,7 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC if (aColIndex >= 0) { taosArrayRemove(aColArray, aColIndex); } - } else if (!COL_VAL_IS_VALUE(tColVal) && !COL_VAL_IS_VALUE(pColVal) && !setNoneCol) { + } else if (!COL_VAL_IS_VALUE(pColVal) && !setNoneCol) { noneCol = iCol; setNoneCol = true; } @@ -3633,8 +3456,7 @@ static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, taosArrayPush(aColArray, &aCols[i]); } - TSKEY lastRowTs = TSKEY_MAX; - + // inverse iterator CacheNextRowIter iter = {0}; nextRowIterOpen(&iter, uid, pTsdb, pTSchema, pr->info.suid, pr->pLDataIterArray, pr->pReadSnap, pr->lastTs, pr); @@ -3658,9 +3480,8 @@ static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, } // int16_t nCol = pTSchema->numOfCols; - TSKEY rowTs = TSDBROW_TS(pRow); - - lastRowTs = rowTs; + STsdbRowKey rowKey = {0}; + tsdbRowGetKey(pRow, &rowKey); for (int16_t iCol = noneCol; iCol < nCols; ++iCol) { if (iCol >= nLastCol) { @@ -3676,13 +3497,13 @@ static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, if (slotIds[iCol] == 0) { STColumn *pTColumn = &pTSchema->columns[0]; - *pColVal = COL_VAL_VALUE(pTColumn->colId, ((SValue){.type = pTColumn->type, .val = rowTs})); - taosArraySet(pColArray, 0, &(SLastCol){.rowKey.ts = rowTs, .colVal = *pColVal}); + *pColVal = COL_VAL_VALUE(pTColumn->colId, ((SValue){.type = pTColumn->type, .val = rowKey.key.ts})); + taosArraySet(pColArray, 0, &(SLastCol){.rowKey = rowKey.key, .colVal = *pColVal}); continue; } tsdbRowGetColVal(pRow, pTSchema, slotIds[iCol], pColVal); - *pCol = (SLastCol){.rowKey.ts = rowTs, .colVal = *pColVal}; + *pCol = (SLastCol){.rowKey = rowKey.key, .colVal = *pColVal}; if (IS_VAR_DATA_TYPE(pColVal->value.type) /*&& pColVal->value.nData > 0*/) { if (pColVal->value.nData > 0) { pCol->colVal.value.pData = taosMemoryMalloc(pCol->colVal.value.nData); From 552e59f42b8255f257779dc8fef95fb2448cae28 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 15:40:00 +0800 Subject: [PATCH 16/45] refactor: check return value for each function. --- include/libs/stream/tstream.h | 98 +++++----- source/dnode/mnode/impl/src/mndScheduler.c | 63 +++---- source/dnode/snode/src/snode.c | 6 +- source/dnode/vnode/src/sma/smaRollup.c | 13 +- source/dnode/vnode/src/tq/tq.c | 21 ++- source/dnode/vnode/src/tq/tqRead.c | 6 +- source/dnode/vnode/src/tq/tqStreamTask.c | 5 +- source/dnode/vnode/src/tqCommon/tqCommon.c | 62 ++++--- source/libs/stream/src/streamCheckStatus.c | 10 +- source/libs/stream/src/streamCheckpoint.c | 192 +++++++++----------- source/libs/stream/src/streamData.c | 9 +- source/libs/stream/src/streamDispatch.c | 18 +- source/libs/stream/src/streamExec.c | 9 +- source/libs/stream/src/streamMeta.c | 103 ++++++----- source/libs/stream/src/streamStartHistory.c | 15 +- source/libs/stream/src/streamTask.c | 80 +++++--- source/libs/stream/src/streamTaskSm.c | 18 +- 17 files changed, 403 insertions(+), 325 deletions(-) diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 5ba0ce454c..8f6b512741 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -59,8 +59,6 @@ extern "C" { #define STREAM_EXEC_T_STOP_ALL_TASKS (-5) #define STREAM_EXEC_T_RESUME_TASK (-6) #define STREAM_EXEC_T_ADD_FAILED_TASK (-7) -// the load and start stream task should be executed after snode has started successfully, since the load of stream -// tasks may incur the download of checkpoint data from remote, which may consume significant network and CPU resources. typedef struct SStreamTask SStreamTask; typedef struct SStreamQueue SStreamQueue; @@ -190,8 +188,8 @@ typedef struct { SSDataBlock* pBlock; } SStreamRefDataBlock; -SStreamDataSubmit* streamDataSubmitNew(SPackedData* pData, int32_t type); -void streamDataSubmitDestroy(SStreamDataSubmit* pDataSubmit); +int32_t streamDataSubmitNew(SPackedData* pData, int32_t type, SStreamDataSubmit** pSubmit); +void streamDataSubmitDestroy(SStreamDataSubmit* pDataSubmit); typedef struct { char* qmsg; @@ -528,13 +526,13 @@ typedef struct STaskUpdateEntry { typedef int32_t (*__state_trans_user_fn)(SStreamTask*, void* param); -SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam, - SArray* pTaskList, bool hasFillhistory, int8_t subtableWithoutMd5); -void tFreeStreamTask(SStreamTask* pTask); -int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask); -int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask); -int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, int64_t ver); -void streamFreeTaskState(SStreamTask* pTask, ETaskStatus status); +int32_t tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam, + SArray* pTaskList, bool hasFillhistory, int8_t subtableWithoutMd5, SStreamTask** pTask); +void tFreeStreamTask(SStreamTask* pTask); +int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask); +int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask); +int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, int64_t ver); +void streamFreeTaskState(SStreamTask* pTask, ETaskStatus status); int32_t tDecodeStreamTaskChkInfo(SDecoder* pDecoder, SCheckpointInfo* pChkpInfo); int32_t tDecodeStreamTaskId(SDecoder* pDecoder, STaskId* pTaskId); @@ -629,8 +627,8 @@ int32_t streamSetupScheduleTrigger(SStreamTask* pTask); int32_t streamProcessDispatchMsg(SStreamTask* pTask, SStreamDispatchReq* pReq, SRpcMsg* pMsg); int32_t streamProcessDispatchRsp(SStreamTask* pTask, SStreamDispatchRsp* pRsp, int32_t code); -SStreamUpstreamEpInfo* streamTaskGetUpstreamTaskEpInfo(SStreamTask* pTask, int32_t taskId); -SEpSet* streamTaskGetDownstreamEpInfo(SStreamTask* pTask, int32_t taskId); +int32_t streamTaskGetUpstreamTaskEpInfo(SStreamTask* pTask, int32_t taskId, SStreamUpstreamEpInfo** pEpInfo); +SEpSet* streamTaskGetDownstreamEpInfo(SStreamTask* pTask, int32_t taskId); void streamTaskInputFail(SStreamTask* pTask); @@ -722,36 +720,36 @@ int32_t streamSetParamForStreamScannerStep2(SStreamTask* pTask, SVersionRange* p SScanhistoryDataInfo streamScanHistoryData(SStreamTask* pTask, int64_t st); // stream task meta -void streamMetaInit(); -void streamMetaCleanup(); -SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskBuild expandFunc, FTaskExpand expandTaskFn, - int32_t vgId, int64_t stage, startComplete_fn_t fn); -void streamMetaClose(SStreamMeta* streamMeta); -int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask); // save to stream meta store -int32_t streamMetaRemoveTask(SStreamMeta* pMeta, STaskId* pKey); -int32_t streamMetaRegisterTask(SStreamMeta* pMeta, int64_t ver, SStreamTask* pTask, bool* pAdded); -int32_t streamMetaUnregisterTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId); -int32_t streamMetaGetNumOfTasks(SStreamMeta* pMeta); -SStreamTask* streamMetaAcquireTaskNoLock(SStreamMeta* pMeta, int64_t streamId, int32_t taskId); -SStreamTask* streamMetaAcquireTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId); -void streamMetaReleaseTask(SStreamMeta* pMeta, SStreamTask* pTask); -SStreamTask* streamMetaAcquireOneTask(SStreamTask* pTask); -void streamMetaClear(SStreamMeta* pMeta); -void streamMetaInitBackend(SStreamMeta* pMeta); -int32_t streamMetaCommit(SStreamMeta* pMeta); -int64_t streamMetaGetLatestCheckpointId(SStreamMeta* pMeta); -void streamMetaNotifyClose(SStreamMeta* pMeta); -void streamMetaStartHb(SStreamMeta* pMeta); -bool streamMetaTaskInTimer(SStreamMeta* pMeta); -int32_t streamMetaAddTaskLaunchResult(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, int64_t startTs, - int64_t endTs, bool ready); -int32_t streamMetaResetTaskStatus(SStreamMeta* pMeta); -int32_t streamMetaAddFailedTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId); -void streamMetaAddFailedTaskSelf(SStreamTask* pTask, int64_t failedTs); -void streamMetaAddIntoUpdateTaskList(SStreamMeta* pMeta, SStreamTask* pTask, SStreamTask* pHTask, int32_t transId, - int64_t startTs); -void streamMetaClearUpdateTaskList(SStreamMeta* pMeta); -void streamMetaInitUpdateTaskList(SStreamMeta* pMeta, int32_t transId); +void streamMetaInit(); +void streamMetaCleanup(); +int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild expandFunc, FTaskExpand expandTaskFn, int32_t vgId, + int64_t stage, startComplete_fn_t fn, SStreamMeta** pMeta); +void streamMetaClose(SStreamMeta* streamMeta); +int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask); // save to stream meta store +int32_t streamMetaRemoveTask(SStreamMeta* pMeta, STaskId* pKey); +int32_t streamMetaRegisterTask(SStreamMeta* pMeta, int64_t ver, SStreamTask* pTask, bool* pAdded); +int32_t streamMetaUnregisterTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId); +int32_t streamMetaGetNumOfTasks(SStreamMeta* pMeta); +int32_t streamMetaAcquireTaskNoLock(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, SStreamTask** pTask); +int32_t streamMetaAcquireTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, SStreamTask** pTask); +void streamMetaReleaseTask(SStreamMeta* pMeta, SStreamTask* pTask); +void streamMetaAcquireOneTask(SStreamTask* pTask); +void streamMetaClear(SStreamMeta* pMeta); +void streamMetaInitBackend(SStreamMeta* pMeta); +int32_t streamMetaCommit(SStreamMeta* pMeta); +int64_t streamMetaGetLatestCheckpointId(SStreamMeta* pMeta); +void streamMetaNotifyClose(SStreamMeta* pMeta); +void streamMetaStartHb(SStreamMeta* pMeta); +bool streamMetaTaskInTimer(SStreamMeta* pMeta); +int32_t streamMetaAddTaskLaunchResult(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, int64_t startTs, + int64_t endTs, bool ready); +int32_t streamMetaResetTaskStatus(SStreamMeta* pMeta); +int32_t streamMetaAddFailedTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId); +void streamMetaAddFailedTaskSelf(SStreamTask* pTask, int64_t failedTs); +void streamMetaAddIntoUpdateTaskList(SStreamMeta* pMeta, SStreamTask* pTask, SStreamTask* pHTask, int32_t transId, + int64_t startTs); +void streamMetaClearUpdateTaskList(SStreamMeta* pMeta); +void streamMetaInitUpdateTaskList(SStreamMeta* pMeta, int32_t transId); void streamMetaRLock(SStreamMeta* pMeta); void streamMetaRUnLock(SStreamMeta* pMeta); @@ -785,14 +783,14 @@ int32_t streamTaskBuildCheckpointSourceRsp(SStreamCheckpointSourceReq* pReq, SRp int32_t setCode); int32_t streamSendChkptReportMsg(SStreamTask* pTask, SCheckpointInfo* pCheckpointInfo, int8_t dropRelHTask); int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SVUpdateCheckpointInfoReq* pReq); -SActiveCheckpointInfo* streamTaskCreateActiveChkptInfo(); +int32_t streamTaskCreateActiveChkptInfo(SActiveCheckpointInfo** pRes); // stream task state machine, and event handling -SStreamTaskSM* streamCreateStateMachine(SStreamTask* pTask); -void* streamDestroyStateMachine(SStreamTaskSM* pSM); -int32_t streamTaskHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event); -int32_t streamTaskHandleEventAsync(SStreamTaskSM* pSM, EStreamTaskEvent event, __state_trans_user_fn callbackFn, - void* param); +int32_t streamCreateStateMachine(SStreamTask* pTask); +void streamDestroyStateMachine(SStreamTaskSM* pSM); +int32_t streamTaskHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event); +int32_t streamTaskHandleEventAsync(SStreamTaskSM* pSM, EStreamTaskEvent event, __state_trans_user_fn callbackFn, + void* param); int32_t streamTaskOnHandleEventSuccess(SStreamTaskSM* pSM, EStreamTaskEvent event, __state_trans_user_fn callbackFn, void* param); int32_t streamTaskRestoreStatus(SStreamTask* pTask); @@ -803,7 +801,7 @@ int32_t streamTaskBroadcastRetrieveReq(SStreamTask* pTask, SStreamRetrieveReq* r void streamTaskSendRetrieveRsp(SStreamRetrieveReq* pReq, SRpcMsg* pRsp); int32_t streamProcessHeartbeatRsp(SStreamMeta* pMeta, SMStreamHbRspMsg* pRsp); -int32_t streamTaskSendPreparedCheckpointsourceRsp(SStreamTask* pTask); +int32_t streamTaskSendCheckpointsourceRsp(SStreamTask* pTask); #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c index fc2e3b4619..db8c08e2e3 100644 --- a/source/dnode/mnode/impl/src/mndScheduler.c +++ b/source/dnode/mnode/impl/src/mndScheduler.c @@ -242,11 +242,11 @@ static int32_t doAddSinkTask(SStreamObj* pStream, SMnode* pMnode, SVgObj* pVgrou int64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid; SArray** pTaskList = (isFillhistory) ? taosArrayGetLast(pStream->pHTasksList) : taosArrayGetLast(pStream->tasks); - SStreamTask* pTask = tNewStreamTask(uid, TASK_LEVEL__SINK, pEpset, isFillhistory, 0, *pTaskList, - pStream->conf.fillHistory, pStream->subTableWithoutMd5); - if (pTask == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return terrno; + SStreamTask* pTask = NULL; + int32_t code = tNewStreamTask(uid, TASK_LEVEL__SINK, pEpset, isFillhistory, 0, *pTaskList, pStream->conf.fillHistory, + pStream->subTableWithoutMd5, &pTask); + if (code != 0) { + return code; } mDebug("doAddSinkTask taskId:%s, vgId:%d, isFillHistory:%d", pTask->id.idStr, pVgroup->vgId, isFillhistory); @@ -353,18 +353,13 @@ static void haltInitialTaskStatus(SStreamTask* pTask, SSubplan* pPlan, bool isFi } } -static SStreamTask* buildSourceTask(SStreamObj* pStream, SEpSet* pEpset, bool isFillhistory, bool useTriggerParam) { +static int32_t buildSourceTask(SStreamObj* pStream, SEpSet* pEpset, bool isFillhistory, bool useTriggerParam, SStreamTask** pTask) { uint64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid; SArray** pTaskList = (isFillhistory) ? taosArrayGetLast(pStream->pHTasksList) : taosArrayGetLast(pStream->tasks); - SStreamTask* pTask = - tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, isFillhistory, useTriggerParam ? pStream->conf.triggerParam : 0, - *pTaskList, pStream->conf.fillHistory, pStream->subTableWithoutMd5); - if (pTask == NULL) { - return NULL; - } - - return pTask; + int32_t code = tNewStreamTask(uid, TASK_LEVEL__SOURCE, pEpset, isFillhistory, useTriggerParam ? pStream->conf.triggerParam : 0, + *pTaskList, pStream->conf.fillHistory, pStream->subTableWithoutMd5, pTask); + return code; } static void addNewTaskList(SStreamObj* pStream) { @@ -398,10 +393,10 @@ static void setHTasksId(SStreamObj* pStream) { static int32_t doAddSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream, SEpSet* pEpset, int64_t skey, SArray* pVerList, SVgObj* pVgroup, bool isFillhistory, bool useTriggerParam) { - SStreamTask* pTask = buildSourceTask(pStream, pEpset, isFillhistory, useTriggerParam); - if (pTask == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return terrno; + SStreamTask* pTask = NULL; + int32_t code = buildSourceTask(pStream, pEpset, isFillhistory, useTriggerParam, &pTask); + if (code != TSDB_CODE_SUCCESS) { + return code; } mDebug("doAddSourceTask taskId:%s, vgId:%d, isFillHistory:%d", pTask->id.idStr, pVgroup->vgId, isFillhistory); @@ -412,10 +407,9 @@ static int32_t doAddSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStre streamTaskSetDataRange(pTask, skey, pVerList, pVgroup->vgId); - int32_t code = mndAssignStreamTaskToVgroup(pMnode, pTask, plan, pVgroup); - if (code != 0) { - terrno = code; - return terrno; + code = mndAssignStreamTaskToVgroup(pMnode, pTask, plan, pVgroup); + if (code != TSDB_CODE_SUCCESS) { + return code; } return TDB_CODE_SUCCESS; @@ -498,28 +492,29 @@ static int32_t addSourceTask(SMnode* pMnode, SSubplan* plan, SStreamObj* pStream return TSDB_CODE_SUCCESS; } -static SStreamTask* buildAggTask(SStreamObj* pStream, SEpSet* pEpset, bool isFillhistory, bool useTriggerParam) { +static int32_t buildAggTask(SStreamObj* pStream, SEpSet* pEpset, bool isFillhistory, bool useTriggerParam, + SStreamTask** pAggTask) { + *pAggTask = NULL; + uint64_t uid = (isFillhistory) ? pStream->hTaskUid : pStream->uid; SArray** pTaskList = (isFillhistory) ? taosArrayGetLast(pStream->pHTasksList) : taosArrayGetLast(pStream->tasks); - SStreamTask* pAggTask = + int32_t code = tNewStreamTask(uid, TASK_LEVEL__AGG, pEpset, isFillhistory, useTriggerParam ? pStream->conf.triggerParam : 0, - *pTaskList, pStream->conf.fillHistory, pStream->subTableWithoutMd5); - if (pAggTask == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; - } - - return pAggTask; + *pTaskList, pStream->conf.fillHistory, pStream->subTableWithoutMd5, pAggTask); + return code; } static int32_t doAddAggTask(SStreamObj* pStream, SMnode* pMnode, SSubplan* plan, SEpSet* pEpset, SVgObj* pVgroup, SSnodeObj* pSnode, bool isFillhistory, bool useTriggerParam) { int32_t code = 0; - SStreamTask* pTask = buildAggTask(pStream, pEpset, isFillhistory, useTriggerParam); - if (pTask == NULL) { - return terrno; + SStreamTask* pTask = NULL; + + code = buildAggTask(pStream, pEpset, isFillhistory, useTriggerParam, &pTask); + if (code != TSDB_CODE_SUCCESS) { + return code; } + if (pSnode != NULL) { code = mndAssignStreamTaskToSnode(pMnode, pTask, plan, pSnode); mDebug("doAddAggTask taskId:%s, snode id:%d, isFillHistory:%d", pTask->id.idStr, pSnode->id, isFillhistory); diff --git a/source/dnode/snode/src/snode.c b/source/dnode/snode/src/snode.c index cfa24b2430..db2ead2f37 100644 --- a/source/dnode/snode/src/snode.c +++ b/source/dnode/snode/src/snode.c @@ -71,9 +71,9 @@ SSnode *sndOpen(const char *path, const SSnodeOpt *pOption) { startRsync(); pSnode->msgCb = pOption->msgCb; - pSnode->pMeta = streamMetaOpen(path, pSnode, (FTaskBuild *)sndBuildStreamTask, tqExpandStreamTask, SNODE_HANDLE, taosGetTimestampMs(), tqStartTaskCompleteCallback); - if (pSnode->pMeta == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + int32_t code = streamMetaOpen(path, pSnode, (FTaskBuild *)sndBuildStreamTask, tqExpandStreamTask, SNODE_HANDLE, + taosGetTimestampMs(), tqStartTaskCompleteCallback, &pSnode->pMeta); + if (code != TSDB_CODE_SUCCESS) { goto FAIL; } diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index a48188430f..a6002d2d65 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -297,8 +297,17 @@ static int32_t tdSetRSmaInfoItemParams(SSma *pSma, SRSmaParam *param, SRSmaStat sprintf(pStreamTask->exec.qmsg, "%s", RSMA_EXEC_TASK_FLAG); pStreamTask->chkInfo.checkpointId = streamMetaGetLatestCheckpointId(pStreamTask->pMeta); tdRSmaTaskInit(pStreamTask->pMeta, pItem, &pStreamTask->id); - pStreamTask->status.pSM = streamCreateStateMachine(pStreamTask); - pStreamTask->chkInfo.pActiveInfo = streamTaskCreateActiveChkptInfo(); + + int32_t code = streamCreateStateMachine(pStreamTask); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + code = streamTaskCreateActiveChkptInfo(&pStreamTask->chkInfo.pActiveInfo); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + pStreamState = streamStateOpen(taskInfDir, pStreamTask, pStreamTask->id.streamId, pStreamTask->id.taskId); if (!pStreamState) { terrno = TSDB_CODE_RSMA_STREAM_STATE_OPEN; diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index ac57a003c5..1c3866080b 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -90,10 +90,11 @@ STQ* tqOpen(const char* path, SVnode* pVnode) { int32_t tqInitialize(STQ* pTq) { int32_t vgId = TD_VID(pTq->pVnode); - pTq->pStreamMeta = - streamMetaOpen(pTq->path, pTq, tqBuildStreamTask, tqExpandStreamTask, vgId, -1, tqStartTaskCompleteCallback); - if (pTq->pStreamMeta == NULL) { - return -1; + + int32_t code = streamMetaOpen(pTq->path, pTq, tqBuildStreamTask, tqExpandStreamTask, vgId, -1, + tqStartTaskCompleteCallback, &pTq->pStreamMeta); + if (code != TSDB_CODE_SUCCESS) { + return code; } streamMetaLoadAllTasks(pTq->pStreamMeta); @@ -856,7 +857,8 @@ int32_t handleStep2Async(SStreamTask* pStreamTask, void* param) { SStreamMeta* pMeta = pStreamTask->pMeta; STaskId hId = pStreamTask->hTaskInfo.id; - SStreamTask* pTask = streamMetaAcquireTask(pStreamTask->pMeta, hId.streamId, hId.taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pStreamTask->pMeta, hId.streamId, hId.taskId, &pTask); if (pTask == NULL) { tqWarn("s-task:0x%x failed to acquired it to exec step 2, scan wal quit", (int32_t) hId.taskId); return TSDB_CODE_SUCCESS; @@ -874,7 +876,8 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { SStreamMeta* pMeta = pTq->pStreamMeta; int32_t code = TSDB_CODE_SUCCESS; - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId, &pTask); if (pTask == NULL) { tqError("vgId:%d failed to acquire stream task:0x%x during scan history data, task may have been destroyed", pMeta->vgId, pReq->taskId); @@ -961,7 +964,8 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { ASSERT(pTask->info.fillHistory == 1); // 1. get the related stream task - SStreamTask* pStreamTask = streamMetaAcquireTask(pMeta, pTask->streamTaskId.streamId, pTask->streamTaskId.taskId); + SStreamTask* pStreamTask = NULL; + code = streamMetaAcquireTask(pMeta, pTask->streamTaskId.streamId, pTask->streamTaskId.taskId, &pStreamTask); if (pStreamTask == NULL) { tqError("failed to find s-task:0x%" PRIx64 ", it may have been destroyed, drop related fill-history task:%s", pTask->streamTaskId.taskId, pTask->id.idStr); @@ -1121,7 +1125,8 @@ int32_t tqProcessTaskCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg, SRpcMsg* pRsp) return TSDB_CODE_SUCCESS; } - SStreamTask* pTask = streamMetaAcquireTask(pMeta, req.streamId, req.taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, req.streamId, req.taskId, &pTask); if (pTask == NULL) { tqError("vgId:%d failed to find s-task:0x%x, ignore checkpoint msg. checkpointId:%" PRId64 " transId:%d it may have been destroyed", diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index d3be8fa666..b57af518b4 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -341,10 +341,8 @@ int32_t extractMsgFromWal(SWalReader* pReader, void** pItem, int64_t maxVer, con memcpy(data, pBody, len); SPackedData data1 = (SPackedData){.ver = ver, .msgLen = len, .msgStr = data}; - *pItem = (SStreamQueueItem*)streamDataSubmitNew(&data1, STREAM_INPUT__DATA_SUBMIT); - if (*pItem == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - terrno = code; + code = streamDataSubmitNew(&data1, STREAM_INPUT__DATA_SUBMIT, (SStreamDataSubmit**)pItem); + if (code != 0) { tqError("%s failed to create data submit for stream since out of memory", id); return code; } diff --git a/source/dnode/vnode/src/tq/tqStreamTask.c b/source/dnode/vnode/src/tq/tqStreamTask.c index bcf17bf1e1..22658cc650 100644 --- a/source/dnode/vnode/src/tq/tqStreamTask.c +++ b/source/dnode/vnode/src/tq/tqStreamTask.c @@ -324,7 +324,8 @@ int32_t doScanWalForAllTasks(SStreamMeta* pStreamMeta, bool* pScanIdle) { for (int32_t i = 0; i < numOfTasks; ++i) { STaskId* pTaskId = taosArrayGet(pTaskList, i); - SStreamTask* pTask = streamMetaAcquireTask(pStreamMeta, pTaskId->streamId, pTaskId->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pStreamMeta, pTaskId->streamId, pTaskId->taskId, &pTask); if (pTask == NULL) { continue; } @@ -337,7 +338,7 @@ int32_t doScanWalForAllTasks(SStreamMeta* pStreamMeta, bool* pScanIdle) { *pScanIdle = false; // seek the stored version and extract data from WAL - int32_t code = setWalReaderStartOffset(pTask, vgId); + code = setWalReaderStartOffset(pTask, vgId); if (code != TSDB_CODE_SUCCESS) { streamMetaReleaseTask(pStreamMeta, pTask); continue; diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c index 1f3c049211..95ee1b70f8 100644 --- a/source/dnode/vnode/src/tqCommon/tqCommon.c +++ b/source/dnode/vnode/src/tqCommon/tqCommon.c @@ -140,17 +140,19 @@ int32_t tqStreamTaskRestoreCheckpoint(SStreamMeta* pMeta, int64_t streamId, int3 } tqDebug("vgId:%d restore task:0x%" PRIx64 "-0x%x checkpointId", vgId, streamId, taskId); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, streamId, taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, streamId, taskId, &pTask); if (pTask == NULL) { tqError("failed to acquire task:0x%x when trying to restore checkpointId", taskId); return TSDB_CODE_STREAM_TASK_NOT_EXIST; } - int32_t code = streamTaskSendRestoreChkptMsg(pTask); + code = streamTaskSendRestoreChkptMsg(pTask); streamMetaReleaseTask(pMeta, pTask); return code; } +// this is to process request from transaction, always return true. int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pMsg, bool restored) { int32_t vgId = pMeta->vgId; char* msg = POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)); @@ -230,7 +232,7 @@ int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pM updated = streamTaskUpdateEpsetInfo(pTask, req.pNodeList); // send the checkpoint-source-rsp for source task to end the checkpoint trans in mnode - streamTaskSendPreparedCheckpointsourceRsp(pTask); + (void) streamTaskSendCheckpointsourceRsp(pTask); streamTaskResetStatus(pTask); streamTaskStopMonitorCheckRsp(&pTask->taskCheckInfo, pTask->id.idStr); @@ -329,7 +331,8 @@ int32_t tqStreamTaskProcessDispatchReq(SStreamMeta* pMeta, SRpcMsg* pMsg) { tqDebug("s-task:0x%x recv dispatch msg from 0x%x(vgId:%d)", req.taskId, req.upstreamTaskId, req.upstreamNodeId); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, req.streamId, req.taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, req.streamId, req.taskId, &pTask); if (pTask) { SRpcMsg rsp = {.info = pMsg->info, .code = 0}; if (streamProcessDispatchMsg(pTask, &req, &rsp) != 0) { @@ -388,7 +391,8 @@ int32_t tqStreamTaskProcessDispatchRsp(SStreamMeta* pMeta, SRpcMsg* pMsg) { tqDebug("s-task:0x%x vgId:%d recv dispatch-rsp from 0x%x vgId:%d", pRsp->upstreamTaskId, pRsp->upstreamNodeId, pRsp->downstreamTaskId, pRsp->downstreamNodeId); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pRsp->streamId, pRsp->upstreamTaskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pRsp->streamId, pRsp->upstreamTaskId, &pTask); if (pTask) { streamProcessDispatchRsp(pTask, pRsp, pMsg->code); streamMetaReleaseTask(pMeta, pTask); @@ -411,7 +415,8 @@ int32_t tqStreamTaskProcessRetrieveReq(SStreamMeta* pMeta, SRpcMsg* pMsg) { tDecodeStreamRetrieveReq(&decoder, &req); tDecoderClear(&decoder); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, req.streamId, req.dstTaskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, req.streamId, req.dstTaskId, &pTask); if (pTask == NULL) { tqError("vgId:%d process retrieve req, failed to acquire task:0x%x, it may have been dropped already", pMeta->vgId, req.dstTaskId); @@ -419,7 +424,6 @@ int32_t tqStreamTaskProcessRetrieveReq(SStreamMeta* pMeta, SRpcMsg* pMsg) { return -1; } - int32_t code = 0; if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) { code = streamProcessRetrieveReq(pTask, &req); } else { @@ -484,7 +488,8 @@ int32_t tqStreamTaskProcessCheckRsp(SStreamMeta* pMeta, SRpcMsg* pMsg, bool isLe return streamMetaAddFailedTask(pMeta, rsp.streamId, rsp.upstreamTaskId); } - SStreamTask* pTask = streamMetaAcquireTask(pMeta, rsp.streamId, rsp.upstreamTaskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, rsp.streamId, rsp.upstreamTaskId, &pTask); if (pTask == NULL) { return streamMetaAddFailedTask(pMeta, rsp.streamId, rsp.upstreamTaskId); } @@ -511,7 +516,8 @@ int32_t tqStreamTaskProcessCheckpointReadyMsg(SStreamMeta* pMeta, SRpcMsg* pMsg) } tDecoderClear(&decoder); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, req.streamId, req.upstreamTaskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, req.streamId, req.upstreamTaskId, &pTask); if (pTask == NULL) { tqError("vgId:%d failed to find s-task:0x%x, it may have been destroyed already", vgId, req.downstreamTaskId); return TSDB_CODE_STREAM_TASK_NOT_EXIST; @@ -598,7 +604,8 @@ int32_t tqStreamTaskProcessDeployReq(SStreamMeta* pMeta, SMsgCb* cb, int64_t sve tqDebug("vgId:%d s-task:0x%x is deployed and add into meta, numOfTasks:%d", vgId, taskId, numOfTasks); if (restored) { - SStreamTask* p = streamMetaAcquireTask(pMeta, streamId, taskId); + SStreamTask* p = NULL; + code = streamMetaAcquireTask(pMeta, streamId, taskId, &p); if ((p != NULL) && (p->info.fillHistory == 0)) { tqStreamStartOneTaskAsync(pMeta, cb, streamId, taskId); } @@ -773,7 +780,8 @@ int32_t tqStreamTaskProcessRunReq(SStreamMeta* pMeta, SRpcMsg* pMsg, bool isLead int32_t code = streamMetaAddFailedTask(pMeta, pReq->streamId, pReq->taskId); return code; } else if (type == STREAM_EXEC_T_RESUME_TASK) { // task resume to run after idle for a while - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId, &pTask); if (pTask != NULL) { char* pStatus = NULL; @@ -794,7 +802,8 @@ int32_t tqStreamTaskProcessRunReq(SStreamMeta* pMeta, SRpcMsg* pMsg, bool isLead return 0; } - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId, &pTask); if (pTask != NULL) { // even in halt status, the data in inputQ must be processed char* p = NULL; if (streamTaskReadyToRun(pTask, &p)) { @@ -862,7 +871,8 @@ int32_t tqStartTaskCompleteCallback(SStreamMeta* pMeta) { int32_t tqStreamTaskProcessTaskResetReq(SStreamMeta* pMeta, char* pMsg) { SVPauseStreamTaskReq* pReq = (SVPauseStreamTaskReq*)pMsg; - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId, &pTask); if (pTask == NULL) { tqError("vgId:%d process task-reset req, failed to acquire task:0x%x, it may have been dropped already", pMeta->vgId, pReq->taskId); @@ -903,7 +913,8 @@ int32_t tqStreamTaskProcessTaskResetReq(SStreamMeta* pMeta, char* pMsg) { int32_t tqStreamTaskProcessRetrieveTriggerReq(SStreamMeta* pMeta, SRpcMsg* pMsg) { SRetrieveChkptTriggerReq* pReq = (SRetrieveChkptTriggerReq*)pMsg->pCont; - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->upstreamTaskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->upstreamTaskId, &pTask); if (pTask == NULL) { tqError("vgId:%d process retrieve checkpoint trigger, checkpointId:%" PRId64 " from s-task:0x%x, failed to acquire task:0x%x, it may have been dropped already", @@ -971,7 +982,8 @@ int32_t tqStreamTaskProcessRetrieveTriggerReq(SStreamMeta* pMeta, SRpcMsg* pMsg) int32_t tqStreamTaskProcessRetrieveTriggerRsp(SStreamMeta* pMeta, SRpcMsg* pMsg) { SCheckpointTriggerRsp* pRsp = POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pRsp->streamId, pRsp->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pRsp->streamId, pRsp->taskId, &pTask); if (pTask == NULL) { tqError( "vgId:%d process retrieve checkpoint-trigger, failed to acquire task:0x%x, it may have been dropped already", @@ -990,7 +1002,8 @@ int32_t tqStreamTaskProcessRetrieveTriggerRsp(SStreamMeta* pMeta, SRpcMsg* pMsg) int32_t tqStreamTaskProcessTaskPauseReq(SStreamMeta* pMeta, char* pMsg) { SVPauseStreamTaskReq* pReq = (SVPauseStreamTaskReq*)pMsg; - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId, &pTask); if (pTask == NULL) { tqError("vgId:%d process pause req, failed to acquire task:0x%x, it may have been dropped already", pMeta->vgId, pReq->taskId); @@ -1003,7 +1016,8 @@ int32_t tqStreamTaskProcessTaskPauseReq(SStreamMeta* pMeta, char* pMsg) { SStreamTask* pHistoryTask = NULL; if (HAS_RELATED_FILLHISTORY_TASK(pTask)) { - pHistoryTask = streamMetaAcquireTask(pMeta, pTask->hTaskInfo.id.streamId, pTask->hTaskInfo.id.taskId); + pHistoryTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pTask->hTaskInfo.id.streamId, pTask->hTaskInfo.id.taskId, &pHistoryTask); if (pHistoryTask == NULL) { tqError("vgId:%d process pause req, failed to acquire fill-history task:0x%" PRIx64 ", it may have been dropped already", @@ -1070,7 +1084,8 @@ int32_t tqStreamTaskProcessTaskResumeReq(void* handle, int64_t sversion, char* m SStreamMeta* pMeta = fromVnode ? ((STQ*)handle)->pStreamMeta : handle; - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, pReq->taskId, &pTask); if (pTask == NULL) { tqError("s-task:0x%x failed to acquire task to resume, it may have been dropped or stopped", pReq->taskId); return TSDB_CODE_STREAM_TASK_IVLD_STATUS; @@ -1081,13 +1096,14 @@ int32_t tqStreamTaskProcessTaskResumeReq(void* handle, int64_t sversion, char* m tqDebug("s-task:%s start to resume from paused, current status:%s", pTask->id.idStr, pState->name); taosThreadMutexUnlock(&pTask->lock); - int32_t code = tqProcessTaskResumeImpl(handle, pTask, sversion, pReq->igUntreated, fromVnode); + code = tqProcessTaskResumeImpl(handle, pTask, sversion, pReq->igUntreated, fromVnode); if (code != 0) { return code; } STaskId* pHTaskId = &pTask->hTaskInfo.id; - SStreamTask* pHTask = streamMetaAcquireTask(pMeta, pHTaskId->streamId, pHTaskId->taskId); + SStreamTask* pHTask = NULL; + code = streamMetaAcquireTask(pMeta, pHTaskId->streamId, pHTaskId->taskId, &pHTask); if (pHTask) { taosThreadMutexLock(&pHTask->lock); SStreamTaskState* p = streamTaskGetStatus(pHTask); @@ -1121,7 +1137,8 @@ int32_t tqStreamProcessConsensusChkptRsp2(SStreamMeta* pMeta, SRpcMsg* pMsg) { r int32_t tqStreamProcessCheckpointReadyRsp(SStreamMeta* pMeta, SRpcMsg* pMsg) { SMStreamCheckpointReadyRspMsg* pRsp = pMsg->pCont; - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pRsp->streamId, pRsp->downstreamTaskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pRsp->streamId, pRsp->downstreamTaskId, &pTask); if (pTask == NULL) { tqError("vgId:%d failed to acquire task:0x%x when handling checkpoint-ready msg, it may have been dropped", pRsp->downstreamNodeId, pRsp->downstreamTaskId); @@ -1154,7 +1171,8 @@ int32_t tqStreamTaskProcessConsenChkptIdReq(SStreamMeta* pMeta, SRpcMsg* pMsg) { tDecoderClear(&decoder); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, req.streamId, req.taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, req.streamId, req.taskId, &pTask); if (pTask == NULL) { tqError("vgId:%d process set consensus checkpointId req, failed to acquire task:0x%x, it may have been dropped already", pMeta->vgId, req.taskId); diff --git a/source/libs/stream/src/streamCheckStatus.c b/source/libs/stream/src/streamCheckStatus.c index 3ea3e814ed..c73b245940 100644 --- a/source/libs/stream/src/streamCheckStatus.c +++ b/source/libs/stream/src/streamCheckStatus.c @@ -40,8 +40,11 @@ static SDownstreamStatusInfo* findCheckRspStatus(STaskCheckInfo* pInfo, int32_t int32_t streamTaskCheckStatus(SStreamTask* pTask, int32_t upstreamTaskId, int32_t vgId, int64_t stage, int64_t* oldStage) { - SStreamUpstreamEpInfo* pInfo = streamTaskGetUpstreamTaskEpInfo(pTask, upstreamTaskId); - ASSERT(pInfo != NULL); + SStreamUpstreamEpInfo* pInfo = NULL; + int32_t code = streamTaskGetUpstreamTaskEpInfo(pTask, upstreamTaskId, &pInfo); + if (code != TSDB_CODE_SUCCESS) { + return code; + } *oldStage = pInfo->stage; const char* id = pTask->id.idStr; @@ -166,7 +169,8 @@ void streamTaskProcessCheckMsg(SStreamMeta* pMeta, SStreamTaskCheckReq* pReq, SS taskId, pReq->upstreamTaskId, pReq->upstreamNodeId, pMeta->vgId); pRsp->status = TASK_DOWNSTREAM_NOT_LEADER; } else { - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pReq->streamId, taskId); + SStreamTask* pTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pReq->streamId, taskId, &pTask); if (pTask != NULL) { pRsp->status = streamTaskCheckStatus(pTask, pReq->upstreamTaskId, pReq->upstreamNodeId, pReq->stage, &pRsp->oldStage); diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index 990e7fb987..6906f1eccd 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -29,12 +29,11 @@ static int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpoint static int32_t doSendRetrieveTriggerMsg(SStreamTask* pTask, SArray* pNotSendList); static void checkpointTriggerMonitorFn(void* param, void* tmrId); -SStreamDataBlock* createChkptTriggerBlock(SStreamTask* pTask, int32_t checkpointType, int64_t checkpointId, - int32_t transId, int32_t srcTaskId) { +int32_t createChkptTriggerBlock(SStreamTask* pTask, int32_t checkpointType, int64_t checkpointId, int32_t transId, + int32_t srcTaskId, SStreamDataBlock** pRes) { SStreamDataBlock* pChkpoint = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, sizeof(SSDataBlock)); if (pChkpoint == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } pChkpoint->type = checkpointType; @@ -46,8 +45,7 @@ SStreamDataBlock* createChkptTriggerBlock(SStreamTask* pTask, int32_t checkpoint SSDataBlock* pBlock = taosMemoryCalloc(1, sizeof(SSDataBlock)); if (pBlock == NULL) { taosFreeQitem(pChkpoint); - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } pBlock->info.type = STREAM_CHECKPOINT; @@ -60,28 +58,37 @@ SStreamDataBlock* createChkptTriggerBlock(SStreamTask* pTask, int32_t checkpoint if (pChkpoint->blocks == NULL) { taosMemoryFree(pBlock); taosFreeQitem(pChkpoint); - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } - taosArrayPush(pChkpoint->blocks, pBlock); + void* p = taosArrayPush(pChkpoint->blocks, pBlock); + if (p == NULL) { + taosArrayDestroy(pChkpoint->blocks); + taosMemoryFree(pBlock); + taosFreeQitem(pChkpoint); + return TSDB_CODE_OUT_OF_MEMORY; + } + + *pRes = pChkpoint; taosMemoryFree(pBlock); - terrno = 0; - - return pChkpoint; + return TSDB_CODE_SUCCESS; } +// this message must be put into inputq successfully, continue retrying until it succeeds int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpointType, int64_t checkpointId, int32_t transId, int32_t srcTaskId) { - SStreamDataBlock* pCheckpoint = createChkptTriggerBlock(pTask, checkpointType, checkpointId, transId, srcTaskId); + SStreamDataBlock* pCheckpoint = NULL; + int32_t code = createChkptTriggerBlock(pTask, checkpointType, checkpointId, transId, srcTaskId, &pCheckpoint); + if (code != TSDB_CODE_SUCCESS) { + return code; + } if (streamTaskPutDataIntoInputQ(pTask, (SStreamQueueItem*)pCheckpoint) < 0) { return TSDB_CODE_OUT_OF_MEMORY; } - streamTrySchedExec(pTask); - return TSDB_CODE_SUCCESS; + return streamTrySchedExec(pTask); } int32_t streamProcessCheckpointSourceReq(SStreamTask* pTask, SStreamCheckpointSourceReq* pReq) { @@ -176,22 +183,26 @@ int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock SActiveCheckpointInfo* pActiveInfo = pTask->chkInfo.pActiveInfo; - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); if (pTask->chkInfo.checkpointId > checkpointId) { stError("s-task:%s vgId:%d current checkpointId:%" PRId64 " recv expired checkpoint-trigger block, checkpointId:%" PRId64 " transId:%d, discard", id, vgId, pTask->chkInfo.checkpointId, checkpointId, transId); - taosThreadMutexUnlock(&pTask->lock); + code = taosThreadMutexUnlock(&pTask->lock); streamFreeQitem((SStreamQueueItem*)pBlock); - return TSDB_CODE_SUCCESS; + return code; } if (pTask->chkInfo.checkpointId == checkpointId) { { // send checkpoint-ready msg to upstream SRpcMsg msg = {0}; + SStreamUpstreamEpInfo* pInfo = NULL; + code = streamTaskGetUpstreamTaskEpInfo(pTask, pBlock->srcTaskId, &pInfo); + if (code != TSDB_CODE_SUCCESS) { + return code; + } - SStreamUpstreamEpInfo* pInfo = streamTaskGetUpstreamTaskEpInfo(pTask, pBlock->srcTaskId); initCheckpointReadyMsg(pTask, pInfo->nodeId, pBlock->srcTaskId, pInfo->childId, checkpointId, &msg); tmsgSendReq(&pInfo->epSet, &msg); } @@ -202,10 +213,10 @@ int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock id, vgId, pBlock->srcTaskId); streamTaskOpenUpstreamInput(pTask, pBlock->srcTaskId); - taosThreadMutexUnlock(&pTask->lock); + code = taosThreadMutexUnlock(&pTask->lock); streamFreeQitem((SStreamQueueItem*)pBlock); - return TSDB_CODE_SUCCESS; + return code; } if (streamTaskGetStatus(pTask)->state == TASK_STATUS__CK) { @@ -213,19 +224,19 @@ int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock stError("s-task:%s vgId:%d active checkpointId:%" PRId64 ", recv invalid checkpoint-trigger checkpointId:%" PRId64 " discard", id, vgId, pActiveInfo->activeId, checkpointId); - taosThreadMutexUnlock(&pTask->lock); + code = taosThreadMutexUnlock(&pTask->lock); streamFreeQitem((SStreamQueueItem*)pBlock); - return TSDB_CODE_SUCCESS; + return code; } else { // checkpointId == pActiveInfo->activeId if (pActiveInfo->allUpstreamTriggerRecv == 1) { stDebug( "s-task:%s vgId:%d all upstream checkpoint-trigger recv, discard this checkpoint-trigger, " "checkpointId:%" PRId64 " transId:%d", id, vgId, checkpointId, transId); - taosThreadMutexUnlock(&pTask->lock); + code = taosThreadMutexUnlock(&pTask->lock); streamFreeQitem((SStreamQueueItem*)pBlock); - return TSDB_CODE_SUCCESS; + return code; } if (taskLevel == TASK_LEVEL__SINK || taskLevel == TASK_LEVEL__AGG) { @@ -238,16 +249,16 @@ int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock ", prev recvTs:%" PRId64 " discard", pTask->id.idStr, p->upstreamTaskId, p->upstreamNodeId, p->checkpointId, p->recvTs); - taosThreadMutexUnlock(&pTask->lock); + code = taosThreadMutexUnlock(&pTask->lock); streamFreeQitem((SStreamQueueItem*)pBlock); - return TSDB_CODE_SUCCESS; + return code; } } } } } - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); stDebug("s-task:%s vgId:%d start to handle the checkpoint-trigger block, checkpointId:%" PRId64 " ver:%" PRId64 ", transId:%d current active checkpointId:%" PRId64, @@ -357,7 +368,7 @@ int32_t streamProcessCheckpointReadyMsg(SStreamTask* pTask, int64_t checkpointId return -1; } - taosThreadMutexLock(&pInfo->lock); + (void) taosThreadMutexLock(&pInfo->lock); // only when all downstream tasks are send checkpoint rsp, we can start the checkpoint procedure for the agg task int32_t size = taosArrayGetSize(pInfo->pCheckpointReadyRecvList); @@ -384,7 +395,7 @@ int32_t streamProcessCheckpointReadyMsg(SStreamTask* pTask, int64_t checkpointId int32_t notReady = total - taosArrayGetSize(pInfo->pCheckpointReadyRecvList); int32_t transId = pInfo->transId; - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); if (notReady == 0) { stDebug("s-task:%s all downstream tasks have completed build checkpoint, do checkpoint for current task", id); @@ -399,7 +410,7 @@ int32_t streamTaskProcessCheckpointReadyRsp(SStreamTask* pTask, int32_t upstream int64_t now = taosGetTimestampMs(); int32_t numOfConfirmed = 0; - taosThreadMutexLock(&pInfo->lock); + (void) taosThreadMutexLock(&pInfo->lock); for (int32_t i = 0; i < taosArrayGetSize(pInfo->pReadyMsgList); ++i) { STaskCheckpointReadyInfo* pReadyInfo = taosArrayGet(pInfo->pReadyMsgList, i); if (pReadyInfo->upstreamTaskId == upstreamTaskId && pReadyInfo->checkpointId == checkpointId) { @@ -420,7 +431,7 @@ int32_t streamTaskProcessCheckpointReadyRsp(SStreamTask* pTask, int32_t upstream stDebug("s-task:%s send checkpoint-ready msg to %d upstream confirmed, checkpointId:%" PRId64, pTask->id.idStr, numOfConfirmed, checkpointId); - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); return TSDB_CODE_SUCCESS; } @@ -428,12 +439,12 @@ void streamTaskClearCheckInfo(SStreamTask* pTask, bool clearChkpReadyMsg) { pTask->chkInfo.startTs = 0; // clear the recorded start time streamTaskOpenAllUpstreamInput(pTask); // open inputQ for all upstream tasks - taosThreadMutexLock(&pTask->chkInfo.pActiveInfo->lock); + (void) taosThreadMutexLock(&pTask->chkInfo.pActiveInfo->lock); streamTaskClearActiveInfo(pTask->chkInfo.pActiveInfo); if (clearChkpReadyMsg) { streamClearChkptReadyMsg(pTask->chkInfo.pActiveInfo); } - taosThreadMutexUnlock(&pTask->chkInfo.pActiveInfo->lock); + (void) taosThreadMutexUnlock(&pTask->chkInfo.pActiveInfo->lock); } int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SVUpdateCheckpointInfoReq* pReq) { @@ -443,7 +454,7 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV const char* id = pTask->id.idStr; SCheckpointInfo* pInfo = &pTask->chkInfo; - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); if (pReq->checkpointId <= pInfo->checkpointId) { stDebug("s-task:%s vgId:%d latest checkpointId:%" PRId64 " checkpointVer:%" PRId64 @@ -451,13 +462,13 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV " transId:%d ignored", id, vgId, pInfo->checkpointId, pInfo->checkpointVer, pReq->checkpointId, pReq->checkpointVer, pReq->transId); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); { // destroy the related fill-history tasks // drop task should not in the meta-lock, and drop the related fill-history task now streamMetaWUnLock(pMeta); if (pReq->dropRelHTask) { - streamMetaUnregisterTask(pMeta, pReq->hStreamId, pReq->hTaskId); + (void) streamMetaUnregisterTask(pMeta, pReq->hStreamId, pReq->hTaskId); int32_t numOfTasks = streamMetaGetNumOfTasks(pMeta); stDebug("s-task:%s vgId:%d related fill-history task:0x%x dropped in update checkpointInfo, remain tasks:%d", id, vgId, pReq->taskId, numOfTasks); @@ -519,12 +530,12 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV return code; } - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); streamMetaWUnLock(pMeta); // drop task should not in the meta-lock, and drop the related fill-history task now if (pReq->dropRelHTask) { - streamMetaUnregisterTask(pMeta, pReq->hStreamId, pReq->hTaskId); + (void) streamMetaUnregisterTask(pMeta, pReq->hStreamId, pReq->hTaskId); int32_t numOfTasks = streamMetaGetNumOfTasks(pMeta); stDebug("s-task:%s vgId:%d related fill-history task:0x%x dropped, remain tasks:%d", id, vgId, (int32_t)pReq->hTaskId, numOfTasks); @@ -718,9 +729,9 @@ int32_t streamTaskBuildCheckpoint(SStreamTask* pTask) { code = streamSendChkptReportMsg(pTask, &pTask->chkInfo, dropRelHTask); } } else { // clear the checkpoint info if failed - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); streamTaskSetFailedCheckpointId(pTask); // set failed checkpoint id before clear the checkpoint info - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); code = streamTaskHandleEvent(pTask->status.pSM, TASK_EVENT_CHECKPOINT_DONE); stDebug("s-task:%s clear checkpoint flag since gen checkpoint failed, checkpointId:%" PRId64, id, ckId); @@ -758,13 +769,13 @@ void checkpointTriggerMonitorFn(void* param, void* tmrId) { pActiveInfo->checkCounter = 0; stDebug("s-task:%s vgId:%d checkpoint-trigger monitor in tmr, ts:%" PRId64, id, vgId, now); - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); SStreamTaskState* pState = streamTaskGetStatus(pTask); if (pState->state != TASK_STATUS__CK) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); stDebug("s-task:%s vgId:%d not in checkpoint status, quit from monitor checkpoint-trigger, ref:%d", id, vgId, ref); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); streamMetaReleaseTask(pTask->pMeta, pTask); return; } @@ -775,14 +786,14 @@ void checkpointTriggerMonitorFn(void* param, void* tmrId) { stDebug("s-task:%s vgId:%d all checkpoint-trigger recv, quit from monitor checkpoint-trigger, ref:%d", id, vgId, ref); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); streamMetaReleaseTask(pTask->pMeta, pTask); return; } - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); - taosThreadMutexLock(&pActiveInfo->lock); + (void) taosThreadMutexLock(&pActiveInfo->lock); // send msg to retrieve checkpoint trigger msg SArray* pList = pTask->upstreamInfo.pList; @@ -815,7 +826,7 @@ void checkpointTriggerMonitorFn(void* param, void* tmrId) { // do send retrieve checkpoint trigger msg to upstream int32_t size = taosArrayGetSize(pNotSendList); doSendRetrieveTriggerMsg(pTask, pNotSendList); - taosThreadMutexUnlock(&pActiveInfo->lock); + (void) taosThreadMutexUnlock(&pActiveInfo->lock); // check every 100ms if (size > 0) { @@ -885,9 +896,9 @@ bool streamTaskAlreadySendTrigger(SStreamTask* pTask, int32_t downstreamNodeId) return false; } - taosThreadMutexLock(&pInfo->lock); + (void) taosThreadMutexLock(&pInfo->lock); if (!pInfo->dispatchTrigger) { - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); return false; } @@ -909,7 +920,7 @@ bool streamTaskAlreadySendTrigger(SStreamTask* pTask, int32_t downstreamNodeId) id, pSendInfo->sendTs, before, pInfo->activeId, pInfo->transId); } - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); return true; } @@ -928,11 +939,12 @@ void streamTaskGetTriggerRecvStatus(SStreamTask* pTask, int32_t* pRecved, int32_ } // record the dispatch checkpoint trigger info in the list +// memory insufficient may cause the stream computing stopped void streamTaskInitTriggerDispatchInfo(SStreamTask* pTask) { SActiveCheckpointInfo* pInfo = pTask->chkInfo.pActiveInfo; int64_t now = taosGetTimestampMs(); - taosThreadMutexLock(&pInfo->lock); + (void) taosThreadMutexLock(&pInfo->lock); // outputQ should be empty here ASSERT(streamQueueGetNumOfUnAccessedItems(pTask->outputq.queue) == 0); @@ -942,31 +954,37 @@ void streamTaskInitTriggerDispatchInfo(SStreamTask* pTask) { STaskDispatcherFixed* pDispatch = &pTask->outputInfo.fixedDispatcher; STaskTriggerSendInfo p = {.sendTs = now, .recved = false, .nodeId = pDispatch->nodeId, .taskId = pDispatch->taskId}; - taosArrayPush(pInfo->pDispatchTriggerList, &p); + void* px = taosArrayPush(pInfo->pDispatchTriggerList, &p); + if (px == NULL) { + // pause the stream task, if memory not enough + } } else { for (int32_t i = 0; i < streamTaskGetNumOfDownstream(pTask); ++i) { SVgroupInfo* pVgInfo = taosArrayGet(pTask->outputInfo.shuffleDispatcher.dbInfo.pVgroupInfos, i); STaskTriggerSendInfo p = {.sendTs = now, .recved = false, .nodeId = pVgInfo->vgId, .taskId = pVgInfo->taskId}; - taosArrayPush(pInfo->pDispatchTriggerList, &p); + void* px = taosArrayPush(pInfo->pDispatchTriggerList, &p); + if (px == NULL) { + // pause the stream task, if memory not enough + } } } - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); } int32_t streamTaskGetNumOfConfirmed(SStreamTask* pTask) { SActiveCheckpointInfo* pInfo = pTask->chkInfo.pActiveInfo; int32_t num = 0; - taosThreadMutexLock(&pInfo->lock); + (void) taosThreadMutexLock(&pInfo->lock); for (int32_t i = 0; i < taosArrayGetSize(pInfo->pDispatchTriggerList); ++i) { STaskTriggerSendInfo* p = taosArrayGet(pInfo->pDispatchTriggerList, i); if (p->recved) { num++; } } - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); return num; } @@ -974,7 +992,7 @@ void streamTaskSetTriggerDispatchConfirmed(SStreamTask* pTask, int32_t vgId) { SActiveCheckpointInfo* pInfo = pTask->chkInfo.pActiveInfo; int32_t taskId = 0; - taosThreadMutexLock(&pInfo->lock); + (void) taosThreadMutexLock(&pInfo->lock); for (int32_t i = 0; i < taosArrayGetSize(pInfo->pDispatchTriggerList); ++i) { STaskTriggerSendInfo* p = taosArrayGet(pInfo->pDispatchTriggerList, i); @@ -988,7 +1006,7 @@ void streamTaskSetTriggerDispatchConfirmed(SStreamTask* pTask, int32_t vgId) { } } - taosThreadMutexUnlock(&pInfo->lock); + (void) taosThreadMutexUnlock(&pInfo->lock); int32_t numOfConfirmed = streamTaskGetNumOfConfirmed(pTask); int32_t total = streamTaskGetNumOfDownstream(pTask); @@ -1045,7 +1063,8 @@ static int32_t uploadCheckpointToS3(const char* id, const char* path) { stDebug("[s3] upload checkpoint:%s", filename); } } - taosCloseDir(&pDir); + + (void) taosCloseDir(&pDir); return code; } @@ -1162,78 +1181,37 @@ int32_t deleteCheckpointFile(const char* id, const char* name) { } int32_t streamTaskSendRestoreChkptMsg(SStreamTask* pTask) { - int32_t code; - int32_t tlen = 0; - int32_t vgId = pTask->pMeta->vgId; - const char* id = pTask->id.idStr; - SCheckpointInfo* pInfo = &pTask->chkInfo; + const char* id = pTask->id.idStr; - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); if (pTask->status.sendConsensusChkptId == true) { stDebug("s-task:%s already start to consensus-checkpointId, not start again before it completed", id); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); return TSDB_CODE_SUCCESS; } else { pTask->status.sendConsensusChkptId = true; } - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); ASSERT(pTask->pBackend == NULL); pTask->status.requireConsensusChkptId = true; -#if 0 - SRestoreCheckpointInfo req = { - .streamId = pTask->id.streamId, - .taskId = pTask->id.taskId, - .nodeId = vgId, - .checkpointId = pInfo->checkpointId, - .startTs = pTask->execInfo.created, - }; - tEncodeSize(tEncodeRestoreCheckpointInfo, &req, tlen, code); - if (code < 0) { - stError("s-task:%s vgId:%d encode stream task latest-checkpoint-id failed, code:%s", id, vgId, tstrerror(code)); - return TSDB_CODE_INVALID_MSG; - } - - void* buf = rpcMallocCont(tlen); - if (buf == NULL) { - stError("s-task:%s vgId:%d encode stream task latest-checkpoint-id msg failed, code:%s", id, vgId, - tstrerror(TSDB_CODE_OUT_OF_MEMORY)); - return TSDB_CODE_OUT_OF_MEMORY; - } - - SEncoder encoder; - tEncoderInit(&encoder, buf, tlen); - if ((code = tEncodeRestoreCheckpointInfo(&encoder, &req)) < 0) { - rpcFreeCont(buf); - stError("s-task:%s vgId:%d encode stream task latest-checkpoint-id msg failed, code:%s", id, vgId, tstrerror(code)); - return -1; - } - tEncoderClear(&encoder); - - SRpcMsg msg = {0}; - initRpcMsg(&msg, TDMT_MND_STREAM_REQ_CONSEN_CHKPT, buf, tlen); - stDebug("s-task:%s vgId:%d send latest checkpointId:%" PRId64 " to mnode to get the consensus checkpointId", id, vgId, - pInfo->checkpointId); - - tmsgSendReq(&pTask->info.mnodeEpset, &msg); -#endif return 0; } -int32_t streamTaskSendPreparedCheckpointsourceRsp(SStreamTask* pTask) { +int32_t streamTaskSendCheckpointsourceRsp(SStreamTask* pTask) { int32_t code = 0; if (pTask->info.taskLevel != TASK_LEVEL__SOURCE) { return code; } - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); SStreamTaskState* p = streamTaskGetStatus(pTask); if (p->state == TASK_STATUS__CK) { code = streamTaskSendCheckpointSourceRsp(pTask); } - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); return code; } \ No newline at end of file diff --git a/source/libs/stream/src/streamData.c b/source/libs/stream/src/streamData.c index fae90f4db8..e54794d75f 100644 --- a/source/libs/stream/src/streamData.c +++ b/source/libs/stream/src/streamData.c @@ -131,17 +131,20 @@ int32_t streamRetrieveReqToData(const SStreamRetrieveReq* pReq, SStreamDataBlock return TSDB_CODE_SUCCESS; } -SStreamDataSubmit* streamDataSubmitNew(SPackedData* pData, int32_t type) { +int32_t streamDataSubmitNew(SPackedData* pData, int32_t type, SStreamDataSubmit** pSubmit) { + *pSubmit = NULL; + SStreamDataSubmit* pDataSubmit = (SStreamDataSubmit*)taosAllocateQitem(sizeof(SStreamDataSubmit), DEF_QITEM, pData->msgLen); if (pDataSubmit == NULL) { - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } pDataSubmit->ver = pData->ver; pDataSubmit->submit = *pData; pDataSubmit->type = type; - return pDataSubmit; + *pSubmit = pDataSubmit; + return TSDB_CODE_SUCCESS; } void streamDataSubmitDestroy(SStreamDataSubmit* pDataSubmit) { diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c index 617adaa016..f406c7ac48 100644 --- a/source/libs/stream/src/streamDispatch.c +++ b/source/libs/stream/src/streamDispatch.c @@ -1118,7 +1118,11 @@ int32_t streamAddCheckpointReadyMsg(SStreamTask* pTask, int32_t upstreamTaskId, return TSDB_CODE_SUCCESS; } - SStreamUpstreamEpInfo* pInfo = streamTaskGetUpstreamTaskEpInfo(pTask, upstreamTaskId); + SStreamUpstreamEpInfo* pInfo = NULL; + int32_t code = streamTaskGetUpstreamTaskEpInfo(pTask, upstreamTaskId, &pInfo); + if (code != TSDB_CODE_SUCCESS) { + return code; + } STaskCheckpointReadyInfo info = {0}; initCheckpointReadyInfo(&info, pInfo->nodeId, pInfo->taskId, pInfo->childId, &pInfo->epSet, checkpointId); @@ -1419,8 +1423,11 @@ int32_t streamProcessDispatchMsg(SStreamTask* pTask, SStreamDispatchReq* pReq, S stDebug("s-task:%s receive dispatch msg from taskId:0x%x(vgId:%d), msgLen:%" PRId64 ", msgId:%d", id, pReq->upstreamTaskId, pReq->upstreamNodeId, pReq->totalLen, pReq->msgId); - SStreamUpstreamEpInfo* pInfo = streamTaskGetUpstreamTaskEpInfo(pTask, pReq->upstreamTaskId); - ASSERT(pInfo != NULL); + SStreamUpstreamEpInfo* pInfo = NULL; + int32_t code = streamTaskGetUpstreamTaskEpInfo(pTask, pReq->upstreamTaskId, &pInfo); + if (code != TSDB_CODE_SUCCESS) { + return code; + } if (pMeta->role == NODE_ROLE_FOLLOWER) { stError("s-task:%s task on follower received dispatch msgs, dispatch msg rejected", id); @@ -1453,10 +1460,9 @@ int32_t streamProcessDispatchMsg(SStreamTask* pTask, SStreamDispatchReq* pReq, S { // do send response with the input status - int32_t code = buildDispatchRsp(pTask, pReq, status, &pRsp->pCont); + code = buildDispatchRsp(pTask, pReq, status, &pRsp->pCont); if (code != TSDB_CODE_SUCCESS) { stError("s-task:%s failed to build dispatch rsp, msgId:%d, code:%s", id, pReq->msgId, tstrerror(code)); - terrno = code; return code; } @@ -1465,5 +1471,5 @@ int32_t streamProcessDispatchMsg(SStreamTask* pTask, SStreamDispatchReq* pReq, S } streamTrySchedExec(pTask); - return 0; + return code; } diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index b0915640cc..ffada66cca 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -314,7 +314,8 @@ int32_t streamTransferStateDoPrepare(SStreamTask* pTask) { SStreamMeta* pMeta = pTask->pMeta; const char* id = pTask->id.idStr; - SStreamTask* pStreamTask = streamMetaAcquireTask(pMeta, pTask->streamTaskId.streamId, pTask->streamTaskId.taskId); + SStreamTask* pStreamTask = NULL; + int32_t code = streamMetaAcquireTask(pMeta, pTask->streamTaskId.streamId, pTask->streamTaskId.taskId, &pStreamTask); if (pStreamTask == NULL) { stError( "s-task:%s failed to find related stream task:0x%x, it may have been destroyed or closed, destroy the related " @@ -416,7 +417,8 @@ int32_t streamTransferStatePrepare(SStreamTask* pTask) { code = streamTransferStateDoPrepare(pTask); } else { // no state transfer for sink tasks, and drop fill-history task, followed by opening inputQ of sink task. - SStreamTask* pStreamTask = streamMetaAcquireTask(pMeta, pTask->streamTaskId.streamId, pTask->streamTaskId.taskId); + SStreamTask* pStreamTask = NULL; + code = streamMetaAcquireTask(pMeta, pTask->streamTaskId.streamId, pTask->streamTaskId.taskId, &pStreamTask); if (pStreamTask != NULL) { // halt the related stream sink task code = streamTaskHandleEventAsync(pStreamTask->status.pSM, TASK_EVENT_HALT, haltCallback, NULL); @@ -590,7 +592,8 @@ void flushStateDataInExecutor(SStreamTask* pTask, SStreamQueueItem* pCheckpointB ASSERT(HAS_RELATED_FILLHISTORY_TASK(pTask)); STaskId* pHTaskId = &pTask->hTaskInfo.id; - SStreamTask* pHTask = streamMetaAcquireTask(pTask->pMeta, pHTaskId->streamId, pHTaskId->taskId); + SStreamTask* pHTask = NULL; + int32_t code = streamMetaAcquireTask(pTask->pMeta, pHTaskId->streamId, pHTaskId->taskId, &pHTask); if (pHTask != NULL) { streamTaskReleaseState(pHTask); streamTaskReloadState(pTask); diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index d0b1f6ca93..9cf3909867 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -292,32 +292,39 @@ void streamMetaRemoveDB(void* arg, char* key) { taosThreadMutexUnlock(&pMeta->backendMutex); } -SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, FTaskExpand expandTaskFn, - int32_t vgId, int64_t stage, startComplete_fn_t fn) { +int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, FTaskExpand expandTaskFn, int32_t vgId, + int64_t stage, startComplete_fn_t fn, SStreamMeta** p) { + *p = NULL; + int32_t code = 0; + SStreamMeta* pMeta = taosMemoryCalloc(1, sizeof(SStreamMeta)); if (pMeta == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; stError("vgId:%d failed to prepare stream meta, alloc size:%" PRIzu ", out of memory", vgId, sizeof(SStreamMeta)); - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } int32_t len = strlen(path) + 64; char* tpath = taosMemoryCalloc(1, len); + if (tpath == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } sprintf(tpath, "%s%s%s", path, TD_DIRSEP, "stream"); pMeta->path = tpath; - if (streamMetaOpenTdb(pMeta) < 0) { + code = streamMetaOpenTdb(pMeta); + if (code != TSDB_CODE_SUCCESS) { goto _err; } - if (streamMetaMayCvtDbFormat(pMeta) < 0) { + if ((code = streamMetaMayCvtDbFormat(pMeta)) < 0) { stError("vgId:%d convert sub info format failed, open stream meta failed, reason: %s", pMeta->vgId, tstrerror(terrno)); goto _err; } - if (streamMetaBegin(pMeta) < 0) { + if ((code = streamMetaBegin(pMeta) < 0)) { stError("vgId:%d begin trans for stream meta failed", pMeta->vgId); goto _err; } @@ -325,32 +332,32 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTas _hash_fn_t fp = taosGetDefaultHashFunction(TSDB_DATA_TYPE_VARCHAR); pMeta->pTasksMap = taosHashInit(64, fp, true, HASH_NO_LOCK); if (pMeta->pTasksMap == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } pMeta->updateInfo.pTasks = taosHashInit(64, fp, false, HASH_NO_LOCK); if (pMeta->updateInfo.pTasks == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } pMeta->startInfo.pReadyTaskSet = taosHashInit(64, fp, false, HASH_NO_LOCK); if (pMeta->startInfo.pReadyTaskSet == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } pMeta->startInfo.pFailedTaskSet = taosHashInit(4, fp, false, HASH_NO_LOCK); if (pMeta->startInfo.pFailedTaskSet == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } // task list pMeta->pTaskList = taosArrayInit(4, sizeof(SStreamTaskId)); if (pMeta->pTaskList == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } @@ -376,10 +383,16 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTas // set the attribute when running on Linux OS TdThreadRwlockAttr attr; - taosThreadRwlockAttrInit(&attr); + code = taosThreadRwlockAttrInit(&attr); + if (code != TSDB_CODE_SUCCESS) { + goto _err; + } #ifdef LINUX - pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); + code = pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); + if (code != TSDB_CODE_SUCCESS) { + goto _err; + } #endif taosThreadRwlockInit(&pMeta->lock, &attr); @@ -391,7 +404,7 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTas pMeta->pHbInfo = createMetaHbInfo(pRid); if (pMeta->pHbInfo == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; goto _err; } @@ -403,7 +416,8 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTas } taosThreadMutexInit(&pMeta->backendMutex, NULL); - return pMeta; + *p = pMeta; + return code; _err: taosMemoryFree(pMeta->path); @@ -420,7 +434,7 @@ _err: taosMemoryFree(pMeta); stError("failed to open stream meta, reason:%s", tstrerror(terrno)); - return NULL; + return code; } // todo refactor: the lock shoud be restricted in one function @@ -630,29 +644,30 @@ int32_t streamMetaGetNumOfTasks(SStreamMeta* pMeta) { return (int32_t)size; } -SStreamTask* streamMetaAcquireTaskNoLock(SStreamMeta* pMeta, int64_t streamId, int32_t taskId) { +int32_t streamMetaAcquireTaskNoLock(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, SStreamTask** pTask) { STaskId id = {.streamId = streamId, .taskId = taskId}; SStreamTask** ppTask = (SStreamTask**)taosHashGet(pMeta->pTasksMap, &id, sizeof(id)); if (ppTask == NULL || streamTaskShouldStop(*ppTask)) { - return NULL; + *pTask = NULL; + return TSDB_CODE_FAILED; } int32_t ref = atomic_add_fetch_32(&(*ppTask)->refCnt, 1); stTrace("s-task:%s acquire task, ref:%d", (*ppTask)->id.idStr, ref); - return *ppTask; + *pTask = *ppTask; + return TSDB_CODE_SUCCESS; } -SStreamTask* streamMetaAcquireTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId) { +int32_t streamMetaAcquireTask(SStreamMeta* pMeta, int64_t streamId, int32_t taskId, SStreamTask** pTask) { streamMetaRLock(pMeta); - SStreamTask* p = streamMetaAcquireTaskNoLock(pMeta, streamId, taskId); + int32_t code = streamMetaAcquireTaskNoLock(pMeta, streamId, taskId, pTask); streamMetaRUnLock(pMeta); - return p; + return code; } -SStreamTask* streamMetaAcquireOneTask(SStreamTask* pTask) { +void streamMetaAcquireOneTask(SStreamTask* pTask) { int32_t ref = atomic_add_fetch_32(&pTask->refCnt, 1); stTrace("s-task:%s acquire task, ref:%d", pTask->id.idStr, ref); - return pTask; } void streamMetaReleaseTask(SStreamMeta* UNUSED_PARAM(pMeta), SStreamTask* pTask) { @@ -719,20 +734,19 @@ int32_t streamMetaUnregisterTask(SStreamMeta* pMeta, int64_t streamId, int32_t t stDebug("s-task:0x%x vgId:%d set task status:dropping and start to unregister it", taskId, pMeta->vgId); while (1) { - streamMetaRLock(pMeta); + int32_t timerActive = 0; + streamMetaRLock(pMeta); ppTask = (SStreamTask**)taosHashGet(pMeta->pTasksMap, &id, sizeof(id)); if (ppTask) { - if ((*ppTask)->status.timerActive == 0) { - streamMetaRUnLock(pMeta); - break; - } + timerActive = (*ppTask)->status.timerActive; + } + streamMetaRUnLock(pMeta); - taosMsleep(10); - stDebug("s-task:%s wait for quit from timer", (*ppTask)->id.idStr); - streamMetaRUnLock(pMeta); + if (timerActive > 0) { + taosMsleep(100); + stDebug("s-task:0x%x wait for quit from timer", id.taskId); } else { - streamMetaRUnLock(pMeta); break; } } @@ -1105,8 +1119,10 @@ SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta) { int32_t numOfTasks = taosArrayGetSize(pTaskList); for (int32_t i = 0; i < numOfTasks; ++i) { SStreamTaskId* pTaskId = taosArrayGet(pTaskList, i); - SStreamTask* pTask = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId); - if (pTask == NULL) { + SStreamTask* pTask = NULL; + + int32_t code = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); + if (code != TSDB_CODE_SUCCESS) { continue; } @@ -1201,7 +1217,8 @@ int32_t streamMetaStartAllTasks(SStreamMeta* pMeta) { // initialization, when the operation of check downstream tasks status is executed far quickly. for (int32_t i = 0; i < numOfTasks; ++i) { SStreamTaskId* pTaskId = taosArrayGet(pTaskList, i); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pTaskId->streamId, pTaskId->taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); if (pTask == NULL) { stError("vgId:%d failed to acquire task:0x%x during start tasks", pMeta->vgId, pTaskId->taskId); streamMetaAddFailedTask(pMeta, pTaskId->streamId, pTaskId->taskId); @@ -1223,7 +1240,8 @@ int32_t streamMetaStartAllTasks(SStreamMeta* pMeta) { for (int32_t i = 0; i < numOfTasks; ++i) { SStreamTaskId* pTaskId = taosArrayGet(pTaskList, i); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, pTaskId->streamId, pTaskId->taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); if (pTask == NULL) { stError("vgId:%d failed to acquire task:0x%x during start tasks", pMeta->vgId, pTaskId->taskId); streamMetaAddFailedTask(pMeta, pTaskId->streamId, pTaskId->taskId); @@ -1298,8 +1316,10 @@ int32_t streamMetaStopAllTasks(SStreamMeta* pMeta) { for (int32_t i = 0; i < numOfTasks; ++i) { SStreamTaskId* pTaskId = taosArrayGet(pTaskList, i); - SStreamTask* pTask = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId); - if (pTask == NULL) { + SStreamTask* pTask = NULL; + + int32_t code = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); + if (code != TSDB_CODE_SUCCESS) { continue; } @@ -1339,7 +1359,8 @@ int32_t streamMetaStartOneTask(SStreamMeta* pMeta, int64_t streamId, int32_t tas int32_t vgId = pMeta->vgId; stInfo("vgId:%d start task:0x%x by checking it's downstream status", vgId, taskId); - SStreamTask* pTask = streamMetaAcquireTask(pMeta, streamId, taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTask(pMeta, streamId, taskId, &pTask); if (pTask == NULL) { stError("vgId:%d failed to acquire task:0x%x when starting task", pMeta->vgId, taskId); streamMetaAddFailedTask(pMeta, streamId, taskId); diff --git a/source/libs/stream/src/streamStartHistory.c b/source/libs/stream/src/streamStartHistory.c index 30bccd6479..cf23b776e2 100644 --- a/source/libs/stream/src/streamStartHistory.c +++ b/source/libs/stream/src/streamStartHistory.c @@ -92,7 +92,8 @@ int32_t streamExecScanHistoryInFuture(SStreamTask* pTask, int32_t idleDuration) } // add ref for task - SStreamTask* p = streamMetaAcquireTask(pTask->pMeta, pTask->id.streamId, pTask->id.taskId); + SStreamTask* p = NULL; + int32_t code = streamMetaAcquireTask(pTask->pMeta, pTask->id.streamId, pTask->id.taskId, &p); if (p == NULL) { stError("s-task:0x%x failed to acquire task, status:%s, not exec scan-history data", pTask->id.taskId, streamTaskGetStatus(pTask)->name); @@ -223,7 +224,8 @@ int32_t streamLaunchFillHistoryTask(SStreamTask* pTask) { streamMetaRUnLock(pMeta); if (pHTask != NULL) { // it is already added into stream meta store. - SStreamTask* pHisTask = streamMetaAcquireTask(pMeta, hStreamId, hTaskId); + SStreamTask* pHisTask = NULL; + code = streamMetaAcquireTask(pMeta, hStreamId, hTaskId, &pHisTask); if (pHisTask == NULL) { stDebug("s-task:%s failed acquire and start fill-history task, it may have been dropped/stopped", idStr); streamMetaAddTaskLaunchResult(pMeta, hStreamId, hTaskId, pExecInfo->checkTs, pExecInfo->readyTs, false); @@ -353,7 +355,11 @@ void tryLaunchHistoryTask(void* param, void* tmrId) { return; } - SStreamTask* pTask = streamMetaAcquireTaskNoLock(pMeta, pInfo->id.streamId, pInfo->id.taskId); + SStreamTask* pTask = NULL; + code = streamMetaAcquireTaskNoLock(pMeta, pInfo->id.streamId, pInfo->id.taskId, &pTask); + if (code != TSDB_CODE_SUCCESS) { + // todo + } streamMetaWUnLock(pMeta); if (pTask != NULL) { @@ -373,7 +379,8 @@ void tryLaunchHistoryTask(void* param, void* tmrId) { ASSERT(pTask->status.timerActive >= 1); // abort the timer if intend to stop task - SStreamTask* pHTask = streamMetaAcquireTask(pMeta, pHTaskInfo->id.streamId, pHTaskInfo->id.taskId); + SStreamTask* pHTask = NULL; + code = streamMetaAcquireTask(pMeta, pHTaskInfo->id.streamId, pHTaskInfo->id.taskId, &pHTask); if (pHTask == NULL) { doRetryLaunchFillHistoryTask(pTask, pInfo, now); streamMetaReleaseTask(pMeta, pTask); diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 4cbe0cb136..6264a262da 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -91,14 +91,15 @@ static SStreamUpstreamEpInfo* createStreamTaskEpInfo(const SStreamTask* pTask) { return pEpInfo; } -SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam, - SArray* pTaskList, bool hasFillhistory, int8_t subtableWithoutMd5) { +int32_t tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, bool fillHistory, int64_t triggerParam, + SArray* pTaskList, bool hasFillhistory, int8_t subtableWithoutMd5, SStreamTask** p) { + *p = NULL; + SStreamTask* pTask = (SStreamTask*)taosMemoryCalloc(1, sizeof(SStreamTask)); if (pTask == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; stError("s-task:0x%" PRIx64 " failed malloc new stream task, size:%d, code:%s", streamId, (int32_t)sizeof(SStreamTask), tstrerror(terrno)); - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } pTask->ver = SSTREAM_TASK_VER; @@ -110,10 +111,10 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, pTask->info.delaySchedParam = triggerParam; pTask->subtableWithoutMd5 = subtableWithoutMd5; - pTask->status.pSM = streamCreateStateMachine(pTask); - if (pTask->status.pSM == NULL) { + int32_t code = streamCreateStateMachine(pTask); + if (pTask->status.pSM == NULL || code != TSDB_CODE_SUCCESS) { taosMemoryFreeClear(pTask); - return NULL; + return code; } char buf[128] = {0}; @@ -135,7 +136,9 @@ SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, SEpSet* pEpset, epsetAssign(&(pTask->info.mnodeEpset), pEpset); addToTaskset(pTaskList, pTask); - return pTask; + *p = pTask; + + return code; } int32_t tDecodeStreamTaskChkInfo(SDecoder* pDecoder, SCheckpointInfo* pChkpInfo) { @@ -274,7 +277,9 @@ void tFreeStreamTask(SStreamTask* pTask) { tSimpleHashCleanup(pTask->pNameMap); } - pTask->status.pSM = streamDestroyStateMachine(pTask->status.pSM); + streamDestroyStateMachine(pTask->status.pSM); + pTask->status.pSM = NULL; + streamTaskDestroyUpstreamInfo(&pTask->upstreamInfo); taosMemoryFree(pTask->outputInfo.pTokenBucket); @@ -369,8 +374,9 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i pTask->status.schedStatus = TASK_SCHED_STATUS__INACTIVE; pTask->status.timerActive = 0; - pTask->status.pSM = streamCreateStateMachine(pTask); - if (pTask->status.pSM == NULL) { + + int32_t code = streamCreateStateMachine(pTask); + if (pTask->status.pSM == NULL || code != TSDB_CODE_SUCCESS) { stError("s-task:%s failed create state-machine for stream task, initialization failed, code:%s", pTask->id.idStr, tstrerror(terrno)); return terrno; @@ -391,7 +397,7 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i TdThreadMutexAttr attr = {0}; - int code = taosThreadMutexAttrInit(&attr); + code = taosThreadMutexAttrInit(&attr); if (code != 0) { stError("s-task:%s initElapsed mutex attr failed, code:%s", pTask->id.idStr, tstrerror(code)); return code; @@ -433,10 +439,10 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i } if (pTask->chkInfo.pActiveInfo == NULL) { - pTask->chkInfo.pActiveInfo = streamTaskCreateActiveChkptInfo(); + code = streamTaskCreateActiveChkptInfo(&pTask->chkInfo.pActiveInfo); } - return TSDB_CODE_SUCCESS; + return code; } int32_t streamTaskGetNumOfDownstream(const SStreamTask* pTask) { @@ -636,7 +642,13 @@ void streamTaskOpenAllUpstreamInput(SStreamTask* pTask) { } void streamTaskCloseUpstreamInput(SStreamTask* pTask, int32_t taskId) { - SStreamUpstreamEpInfo* pInfo = streamTaskGetUpstreamTaskEpInfo(pTask, taskId); + SStreamUpstreamEpInfo* pInfo = NULL; + + int32_t code = streamTaskGetUpstreamTaskEpInfo(pTask, taskId, &pInfo); + if (code != TSDB_CODE_SUCCESS) { + return; + } + if ((pInfo != NULL) && pInfo->dataAllowed) { pInfo->dataAllowed = false; int32_t t = atomic_add_fetch_32(&pTask->upstreamInfo.numOfClosed, 1); @@ -645,8 +657,14 @@ void streamTaskCloseUpstreamInput(SStreamTask* pTask, int32_t taskId) { } void streamTaskOpenUpstreamInput(SStreamTask* pTask, int32_t taskId) { - SStreamUpstreamEpInfo* pInfo = streamTaskGetUpstreamTaskEpInfo(pTask, taskId); - if ((pInfo != NULL) && (!pInfo->dataAllowed)) { + SStreamUpstreamEpInfo* pInfo = NULL; + + int32_t code = streamTaskGetUpstreamTaskEpInfo(pTask, taskId, &pInfo); + if (code != TSDB_CODE_SUCCESS) { + return; + } + + if (pInfo != NULL && (!pInfo->dataAllowed)) { int32_t t = atomic_sub_fetch_32(&pTask->upstreamInfo.numOfClosed, 1); ASSERT(t >= 0); pInfo->dataAllowed = true; @@ -941,17 +959,24 @@ int32_t streamTaskSendCheckpointReq(SStreamTask* pTask) { return 0; } -SStreamUpstreamEpInfo* streamTaskGetUpstreamTaskEpInfo(SStreamTask* pTask, int32_t taskId) { +int32_t streamTaskGetUpstreamTaskEpInfo(SStreamTask* pTask, int32_t taskId, SStreamUpstreamEpInfo** pEpInfo) { + *pEpInfo = NULL; + int32_t num = taosArrayGetSize(pTask->upstreamInfo.pList); for (int32_t i = 0; i < num; ++i) { SStreamUpstreamEpInfo* pInfo = taosArrayGetP(pTask->upstreamInfo.pList, i); + if (pInfo == NULL) { + return TSDB_CODE_FAILED; + } + if (pInfo->taskId == taskId) { - return pInfo; + *pEpInfo = pInfo; + return TSDB_CODE_SUCCESS; } } stError("s-task:%s failed to find upstream task:0x%x", pTask->id.idStr, taskId); - return NULL; + return TSDB_CODE_FAILED; } SEpSet* streamTaskGetDownstreamEpInfo(SStreamTask* pTask, int32_t taskId) { @@ -1041,14 +1066,23 @@ int32_t streamTaskSetFailedChkptInfo(SStreamTask* pTask, int32_t transId, int64_ return TSDB_CODE_SUCCESS; } -SActiveCheckpointInfo* streamTaskCreateActiveChkptInfo() { +int32_t streamTaskCreateActiveChkptInfo(SActiveCheckpointInfo** pRes) { SActiveCheckpointInfo* pInfo = taosMemoryCalloc(1, sizeof(SActiveCheckpointInfo)); - taosThreadMutexInit(&pInfo->lock, NULL); + if (pInfo == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + int32_t code = taosThreadMutexInit(&pInfo->lock, NULL); + if (code != TSDB_CODE_SUCCESS) { + return code; + } pInfo->pDispatchTriggerList = taosArrayInit(4, sizeof(STaskTriggerSendInfo)); pInfo->pReadyMsgList = taosArrayInit(4, sizeof(STaskCheckpointReadyInfo)); pInfo->pCheckpointReadyRecvList = taosArrayInit(4, sizeof(STaskDownstreamReadyInfo)); - return pInfo; + + *pRes = pInfo; + return TSDB_CODE_SUCCESS; } void streamTaskDestroyActiveChkptInfo(SActiveCheckpointInfo* pInfo) { diff --git a/source/libs/stream/src/streamTaskSm.c b/source/libs/stream/src/streamTaskSm.c index f2bd99cdaf..e2d988b876 100644 --- a/source/libs/stream/src/streamTaskSm.c +++ b/source/libs/stream/src/streamTaskSm.c @@ -257,43 +257,41 @@ int32_t streamTaskRestoreStatus(SStreamTask* pTask) { return code; } -SStreamTaskSM* streamCreateStateMachine(SStreamTask* pTask) { +int32_t streamCreateStateMachine(SStreamTask* pTask) { initStateTransferTable(); const char* id = pTask->id.idStr; SStreamTaskSM* pSM = taosMemoryCalloc(1, sizeof(SStreamTaskSM)); if (pSM == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; stError("s-task:%s failed to create task stateMachine, size:%d, code:%s", id, (int32_t)sizeof(SStreamTaskSM), tstrerror(terrno)); - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } pSM->pTask = pTask; pSM->pWaitingEventList = taosArrayInit(4, sizeof(SFutureHandleEventInfo)); if (pSM->pWaitingEventList == NULL) { taosMemoryFree(pSM); - - terrno = TSDB_CODE_OUT_OF_MEMORY; stError("s-task:%s failed to create task stateMachine, size:%d, code:%s", id, (int32_t)sizeof(SStreamTaskSM), tstrerror(terrno)); - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } // set the initial state for the state-machine of stream task pSM->current = StreamTaskStatusList[TASK_STATUS__UNINIT]; pSM->startTs = taosGetTimestampMs(); - return pSM; + + pTask->status.pSM = pSM; + return TSDB_CODE_SUCCESS; } -void* streamDestroyStateMachine(SStreamTaskSM* pSM) { +void streamDestroyStateMachine(SStreamTaskSM* pSM) { if (pSM == NULL) { - return NULL; + return; } taosArrayDestroy(pSM->pWaitingEventList); taosMemoryFree(pSM); - return NULL; } static int32_t doHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event, STaskStateTrans* pTrans) { From 931749dca6e1f902be972b26958dca4ada3ee123 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 17 Jul 2024 16:15:19 +0800 Subject: [PATCH 17/45] refactor tsdb code --- include/util/tbuffer.inc | 17 +- include/util/tutil.h | 2 + source/dnode/vnode/src/inc/tsdb.h | 153 ++-- .../dnode/vnode/src/tsdb/tsdbReaderWriter.c | 7 +- source/dnode/vnode/src/tsdb/tsdbUpgrade.c | 37 +- source/dnode/vnode/src/tsdb/tsdbUtil.c | 835 ++++-------------- source/dnode/vnode/src/tsdb/tsdbUtil2.c | 258 +++--- 7 files changed, 387 insertions(+), 922 deletions(-) diff --git a/include/util/tbuffer.inc b/include/util/tbuffer.inc index 2c1405d6c5..595c1e0827 100644 --- a/include/util/tbuffer.inc +++ b/include/util/tbuffer.inc @@ -15,6 +15,7 @@ #include "taoserror.h" #include "tcoding.h" +#include "tutil.h" struct SBuffer { uint32_t size; @@ -67,8 +68,7 @@ static FORCE_INLINE int32_t tBufferEnsureCapacity(SBuffer *buffer, uint32_t capa } static FORCE_INLINE int32_t tBufferPut(SBuffer *buffer, const void *data, uint32_t size) { - int32_t code = tBufferEnsureCapacity(buffer, buffer->size + size); - if (code) return code; + TAOS_CHECK_RETURN(tBufferEnsureCapacity(buffer, buffer->size + size)); memcpy((char *)buffer->data + buffer->size, data, size); buffer->size += size; return 0; @@ -119,10 +119,8 @@ static FORCE_INLINE int32_t tBufferPutU16v(SBuffer *buffer, uint16_t value) { re static FORCE_INLINE int32_t tBufferPutU32v(SBuffer *buffer, uint32_t value) { return tBufferPutU64v(buffer, value); } static FORCE_INLINE int32_t tBufferPutU64v(SBuffer *buffer, uint64_t value) { - int32_t code; while (value >= 0x80) { - code = tBufferPutU8(buffer, (value & 0x7F) | 0x80); - if (code) return code; + TAOS_CHECK_RETURN(tBufferPutU8(buffer, (value & 0x7F) | 0x80)); value >>= 7; } return tBufferPutU8(buffer, value); @@ -141,8 +139,7 @@ static FORCE_INLINE int32_t tBufferPutI64v(SBuffer *buffer, int64_t value) { } static FORCE_INLINE int32_t tBufferPutBinary(SBuffer *buffer, const void *data, uint32_t size) { - int32_t code = tBufferPutU32v(buffer, size); - if (code) return code; + TAOS_CHECK_RETURN(tBufferPutU32v(buffer, size)); return tBufferPut(buffer, data, size); } @@ -324,8 +321,7 @@ static int32_t tBufferGetF32(SBufferReader *reader, float *value) { float f; uint32_t u; } u; - int32_t code = tBufferGetU32(reader, &u.u); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetU32(reader, &u.u)); if (value) { *value = u.f; } @@ -337,8 +333,7 @@ static int32_t tBufferGetF64(SBufferReader *reader, double *value) { double f; uint64_t u; } u; - int32_t code = tBufferGetU64(reader, &u.u); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetU64(reader, &u.u)); if (value) { *value = u.f; } diff --git a/include/util/tutil.h b/include/util/tutil.h index 31ce34f667..2aa28ac1df 100644 --- a/include/util/tutil.h +++ b/include/util/tutil.h @@ -172,6 +172,8 @@ static FORCE_INLINE int32_t taosGetTbHashVal(const char *tbname, int32_t tblen, } \ } while (0) +#define TAOS_UNUSED(expr) (void)(expr) + #ifdef __cplusplus } #endif diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 943ba099f6..21dd48919e 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -147,7 +147,6 @@ int32_t tsdbRowKeyCmpr(const STsdbRowKey *key1, const STsdbRowKey *key2); void tsdbRowGetKey(TSDBROW *row, STsdbRowKey *key); void tColRowGetPrimaryKey(SBlockData *pBlock, int32_t irow, SRowKey *key); - // STSDBRowIter int32_t tsdbRowIterOpen(STSDBRowIter *pIter, TSDBROW *pRow, STSchema *pTSchema); void tsdbRowClose(STSDBRowIter *pIter); @@ -223,11 +222,11 @@ void tMapDataReset(SMapData *pMapData); void tMapDataClear(SMapData *pMapData); int32_t tMapDataPutItem(SMapData *pMapData, void *pItem, int32_t (*tPutItemFn)(uint8_t *, void *)); int32_t tMapDataCopy(SMapData *pFrom, SMapData *pTo); -void tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)); +int32_t tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)); int32_t tMapDataSearch(SMapData *pMapData, void *pSearchItem, int32_t (*tGetItemFn)(uint8_t *, void *), int32_t (*tItemCmprFn)(const void *, const void *), void *pItem); int32_t tPutMapData(uint8_t *p, SMapData *pMapData); -int32_t tGetMapData(uint8_t *p, SMapData *pMapData); +int32_t tGetMapData(uint8_t *p, SMapData *pMapData, int64_t *decodeSize); int32_t tMapDataToArray(SMapData *pMapData, int32_t itemSize, int32_t (*tGetItemFn)(uint8_t *, void *), SArray **ppArray); // other @@ -245,10 +244,10 @@ void tsdbMemTableDestroy(SMemTable *pMemTable, bool proactive); STbData *tsdbGetTbDataFromMemTable(SMemTable *pMemTable, tb_uid_t suid, tb_uid_t uid); int32_t tsdbRefMemTable(SMemTable *pMemTable, SQueryNode *pQNode); int32_t tsdbUnrefMemTable(SMemTable *pMemTable, SQueryNode *pNode, bool proactive); -SArray * tsdbMemTableGetTbDataArray(SMemTable *pMemTable); +SArray *tsdbMemTableGetTbDataArray(SMemTable *pMemTable); // STbDataIter int32_t tsdbTbDataIterCreate(STbData *pTbData, STsdbRowKey *pFrom, int8_t backward, STbDataIter **ppIter); -void * tsdbTbDataIterDestroy(STbDataIter *pIter); +void *tsdbTbDataIterDestroy(STbDataIter *pIter); void tsdbTbDataIterOpen(STbData *pTbData, STsdbRowKey *pFrom, int8_t backward, STbDataIter *pIter); bool tsdbTbDataIterNext(STbDataIter *pIter); void tsdbMemTableCountRows(SMemTable *pMemTable, SSHashObj *pTableMap, int64_t *rowsNum); @@ -301,7 +300,7 @@ int32_t tsdbGetTableSchema(SMeta *pMeta, int64_t uid, STSchema **pSchema, int64_ // tsdbMerge.c ============================================================================================== typedef struct { - STsdb * tsdb; + STsdb *tsdb; int32_t fid; } SMergeArg; @@ -332,22 +331,22 @@ int32_t tsdbDataIterNext2(STsdbDataIter2 *pIter, STsdbFilterInfo *pFilterInfo); // structs ======================= struct STsdbFS { SDelFile *pDelFile; - SArray * aDFileSet; // SArray + SArray *aDFileSet; // SArray }; typedef struct { - rocksdb_t * db; - rocksdb_comparator_t * my_comparator; - rocksdb_cache_t * blockcache; + rocksdb_t *db; + rocksdb_comparator_t *my_comparator; + rocksdb_cache_t *blockcache; rocksdb_block_based_table_options_t *tableoptions; - rocksdb_options_t * options; - rocksdb_flushoptions_t * flushoptions; - rocksdb_writeoptions_t * writeoptions; - rocksdb_readoptions_t * readoptions; - rocksdb_writebatch_t * writebatch; - rocksdb_writebatch_t * rwritebatch; + rocksdb_options_t *options; + rocksdb_flushoptions_t *flushoptions; + rocksdb_writeoptions_t *writeoptions; + rocksdb_readoptions_t *readoptions; + rocksdb_writebatch_t *writebatch; + rocksdb_writebatch_t *rwritebatch; TdThreadMutex rMutex; - STSchema * pTSchema; + STSchema *pTSchema; } SRocksCache; typedef struct { @@ -358,26 +357,26 @@ typedef struct { typedef struct SCompMonitor SCompMonitor; struct STsdb { - char * path; - SVnode * pVnode; + char *path; + SVnode *pVnode; STsdbKeepCfg keepCfg; TdThreadMutex mutex; bool bgTaskDisabled; - SMemTable * mem; - SMemTable * imem; + SMemTable *mem; + SMemTable *imem; STsdbFS fs; // old - SLRUCache * lruCache; + SLRUCache *lruCache; SCacheFlushState flushState; TdThreadMutex lruMutex; - SLRUCache * biCache; + SLRUCache *biCache; TdThreadMutex biMutex; - SLRUCache * bCache; + SLRUCache *bCache; TdThreadMutex bMutex; - SLRUCache * pgCache; + SLRUCache *pgCache; TdThreadMutex pgMutex; struct STFileSystem *pFS; // new SRocksCache rCache; - SCompMonitor *pCompMonitor; + SCompMonitor *pCompMonitor; struct { SVHashTable *ht; SArray *arr; @@ -405,17 +404,17 @@ struct STbData { TSKEY minKey; TSKEY maxKey; SRWLatch lock; - SDelData * pHead; - SDelData * pTail; + SDelData *pHead; + SDelData *pTail; SMemSkipList sl; - STbData * next; + STbData *next; SRBTreeNode rbtn[1]; }; struct SMemTable { SRWLatch latch; - STsdb * pTsdb; - SVBufPool * pPool; + STsdb *pTsdb; + SVBufPool *pPool; volatile int32_t nRef; int64_t minVer; int64_t maxVer; @@ -425,7 +424,7 @@ struct SMemTable { int64_t nDel; int32_t nTbData; int32_t nBucket; - STbData ** aBucket; + STbData **aBucket; SRBTree tbDataTree[1]; }; @@ -434,7 +433,7 @@ struct TSDBROW { union { struct { int64_t version; - SRow * pTSRow; + SRow *pTSRow; }; struct { SBlockData *pBlockData; @@ -535,9 +534,9 @@ struct SBlockData { int64_t suid; // 0 means normal table block data, otherwise child table block data int64_t uid; // 0 means block data in .last file, otherwise in .data file int32_t nRow; // number of rows - int64_t * aUid; // uids of each row, only exist in block data in .last file (uid == 0) - int64_t * aVersion; // versions of each row - TSKEY * aTSKEY; // timestamp of each row + int64_t *aUid; // uids of each row, only exist in block data in .last file (uid == 0) + int64_t *aVersion; // versions of each row + TSKEY *aTSKEY; // timestamp of each row int32_t nColData; SColData *aColData; }; @@ -548,10 +547,10 @@ struct TABLEID { }; struct STbDataIter { - STbData * pTbData; + STbData *pTbData; int8_t backward; SMemSkipListNode *pNode; - TSDBROW * pRow; + TSDBROW *pRow; TSDBROW row; }; @@ -629,9 +628,9 @@ struct SDFileSet { int32_t fid; SHeadFile *pHeadF; SDataFile *pDataF; - SSmaFile * pSmaF; + SSmaFile *pSmaF; uint8_t nSttF; - SSttFile * aSttF[TSDB_STT_TRIGGER_ARRAY_SIZE]; + SSttFile *aSttF[TSDB_STT_TRIGGER_ARRAY_SIZE]; }; struct STSDBRowIter { @@ -647,18 +646,18 @@ struct STSDBRowIter { struct SRowMerger { STSchema *pTSchema; int64_t version; - SArray * pArray; // SArray + SArray *pArray; // SArray }; typedef struct { - char * path; + char *path; int32_t szPage; int32_t flag; TdFilePtr pFD; int64_t pgno; - uint8_t * pBuf; + uint8_t *pBuf; int64_t szFile; - STsdb * pTsdb; + STsdb *pTsdb; const char *objName; uint8_t s3File; int32_t lcn; @@ -668,7 +667,7 @@ typedef struct { } STsdbFD; struct SDelFWriter { - STsdb * pTsdb; + STsdb *pTsdb; SDelFile fDel; STsdbFD *pWriteH; uint8_t *aBuf[1]; @@ -728,15 +727,15 @@ int32_t tDeserializeTsdbRepOpts(void *buf, int32_t bufLen, STsdbRepOpts *pInfo); // snap read struct STsdbReadSnap { - SMemTable * pMem; - SQueryNode * pNode; - SMemTable * pIMem; - SQueryNode * pINode; + SMemTable *pMem; + SQueryNode *pNode; + SMemTable *pIMem; + SQueryNode *pINode; TFileSetArray *pfSetArray; }; struct SDataFWriter { - STsdb * pTsdb; + STsdb *pTsdb; SDFileSet wSet; STsdbFD *pHeadFD; @@ -753,13 +752,13 @@ struct SDataFWriter { }; struct SDataFReader { - STsdb * pTsdb; + STsdb *pTsdb; SDFileSet *pSet; - STsdbFD * pHeadFD; - STsdbFD * pDataFD; - STsdbFD * pSmaFD; - STsdbFD * aSttFD[TSDB_STT_TRIGGER_ARRAY_SIZE]; - uint8_t * aBuf[3]; + STsdbFD *pHeadFD; + STsdbFD *pDataFD; + STsdbFD *pSmaFD; + STsdbFD *aSttFD[TSDB_STT_TRIGGER_ARRAY_SIZE]; + uint8_t *aBuf[3]; }; // NOTE: do NOT change the order of the fields @@ -794,10 +793,10 @@ typedef struct { typedef struct SSttBlockLoadInfo { SBlockDataInfo blockData[2]; // buffered block data - SArray * aSttBlk; + SArray *aSttBlk; int32_t currentLoadBlockIndex; - STSchema * pSchema; - int16_t * colIds; + STSchema *pSchema; + int16_t *colIds; int32_t numOfCols; bool checkRemainingRow; // todo: no assign value? bool isLast; @@ -834,7 +833,7 @@ struct SDiskData { const uint8_t *pUid; const uint8_t *pVer; const uint8_t *pKey; - SArray * aDiskCol; // SArray + SArray *aDiskCol; // SArray }; struct SDiskDataBuilder { @@ -847,15 +846,15 @@ struct SDiskDataBuilder { SCompressor *pVerC; SCompressor *pKeyC; int32_t nBuilder; - SArray * aBuilder; // SArray - uint8_t * aBuf[2]; + SArray *aBuilder; // SArray + uint8_t *aBuf[2]; SDiskData dd; SBlkInfo bi; }; struct SLDataIter { SRBTreeNode node; - SSttBlk * pSttBlk; + SSttBlk *pSttBlk; int64_t cid; // for debug purpose int8_t backward; int32_t iSttBlk; @@ -864,8 +863,8 @@ struct SLDataIter { uint64_t uid; STimeWindow timeWindow; SVersionRange verRange; - SSttBlockLoadInfo * pBlockLoadInfo; - SRowKey * pStartRowKey; // current row key + SSttBlockLoadInfo *pBlockLoadInfo; + SRowKey *pStartRowKey; // current row key bool ignoreEarlierTs; struct SSttFileReader *pReader; }; @@ -878,21 +877,21 @@ typedef int32_t (*_load_tomb_fn)(STsdbReader *pReader, struct SSttFileReader *pS typedef struct SMergeTreeConf { int8_t backward; - STsdb * pTsdb; + STsdb *pTsdb; uint64_t suid; uint64_t uid; STimeWindow timewindow; SVersionRange verRange; bool strictTimeRange; - SArray * pSttFileBlockIterArray; - void * pCurrentFileset; - STSchema * pSchema; - int16_t * pCols; + SArray *pSttFileBlockIterArray; + void *pCurrentFileset; + STSchema *pSchema; + int16_t *pCols; int32_t numOfCols; - SRowKey * pCurRowKey; + SRowKey *pCurRowKey; _load_tomb_fn loadTombFn; - void * pReader; - void * idstr; + void *pReader; + void *idstr; bool rspRows; // response the rows in stt-file, if possible } SMergeTreeConf; @@ -1023,7 +1022,7 @@ struct STsdbDataIter2 { // TSDB_DATA_FILE_DATA_ITER struct { SDataFReader *pReader; - SArray * aBlockIdx; // SArray + SArray *aBlockIdx; // SArray SMapData mDataBlk; SBlockData bData; int32_t iBlockIdx; @@ -1035,7 +1034,7 @@ struct STsdbDataIter2 { struct { SDataFReader *pReader; int32_t iStt; - SArray * aSttBlk; + SArray *aSttBlk; SBlockData bData; int32_t iSttBlk; int32_t iRow; @@ -1043,8 +1042,8 @@ struct STsdbDataIter2 { // TSDB_TOMB_FILE_DATA_ITER struct { SDelFReader *pReader; - SArray * aDelIdx; - SArray * aDelData; + SArray *aDelIdx; + SArray *aDelData; int32_t iDelIdx; int32_t iDelData; } tIter; diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c index 932bf2d92c..8cbcdbc34f 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c +++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c @@ -803,11 +803,8 @@ int32_t tsdbReadDataBlk(SDataFReader *pReader, SBlockIdx *pBlockIdx, SMapData *m if (code) goto _err; // decode - int64_t n = tGetMapData(pReader->aBuf[0], mDataBlk); - if (n < 0) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _err; - } + int64_t n; + TAOS_CHECK_GOTO(tGetMapData(pReader->aBuf[0], mDataBlk, &n), NULL, _err); ASSERT(n == size); return code; diff --git a/source/dnode/vnode/src/tsdb/tsdbUpgrade.c b/source/dnode/vnode/src/tsdb/tsdbUpgrade.c index 09ab2243a0..1052d1c1a1 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUpgrade.c +++ b/source/dnode/vnode/src/tsdb/tsdbUpgrade.c @@ -37,8 +37,8 @@ static int32_t tsdbUpgradeHead(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReader * int8_t cmprAlg; int32_t szPage; SBuffer buffers[10]; - int32_t encryptAlgorithm; - char* encryptKey; + int32_t encryptAlgorithm; + char *encryptKey; // reader SArray *aBlockIdx; SMapData mDataBlk[1]; @@ -96,7 +96,7 @@ static int32_t tsdbUpgradeHead(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReader * for (int32_t iDataBlk = 0; iDataBlk < ctx->mDataBlk->nItem; ++iDataBlk) { SDataBlk dataBlk[1]; - tMapDataGetItemByIdx(ctx->mDataBlk, iDataBlk, dataBlk, tGetDataBlk); + TAOS_CHECK_GOTO(tMapDataGetItemByIdx(ctx->mDataBlk, iDataBlk, dataBlk, tGetDataBlk), &lino, _exit); SBrinRecord record = { .suid = pBlockIdx->suid, @@ -139,8 +139,9 @@ static int32_t tsdbUpgradeHead(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReader * if (ctx->brinBlock->numOfRecords >= ctx->maxRow) { SVersionRange range = {.minVer = VERSION_MAX, .maxVer = VERSION_MIN}; - code = tsdbFileWriteBrinBlock(ctx->fd, ctx->brinBlock, ctx->cmprAlg, &fset->farr[TSDB_FTYPE_HEAD]->f->size, - ctx->brinBlkArray, ctx->buffers, &range, ctx->encryptAlgorithm, ctx->encryptKey); + code = + tsdbFileWriteBrinBlock(ctx->fd, ctx->brinBlock, ctx->cmprAlg, &fset->farr[TSDB_FTYPE_HEAD]->f->size, + ctx->brinBlkArray, ctx->buffers, &range, ctx->encryptAlgorithm, ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); } } @@ -157,8 +158,8 @@ static int32_t tsdbUpgradeHead(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReader * &fset->farr[TSDB_FTYPE_HEAD]->f->size, ctx->encryptAlgorithm, ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); - code = tsdbFileWriteHeadFooter(ctx->fd, &fset->farr[TSDB_FTYPE_HEAD]->f->size, ctx->footer, ctx->encryptAlgorithm, - ctx->encryptKey); + code = tsdbFileWriteHeadFooter(ctx->fd, &fset->farr[TSDB_FTYPE_HEAD]->f->size, ctx->footer, ctx->encryptAlgorithm, + ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); code = tsdbFsyncFile(ctx->fd, ctx->encryptAlgorithm, ctx->encryptKey); @@ -258,7 +259,7 @@ static int32_t tsdbUpgradeSttFile(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReade struct { int32_t szPage; int32_t encryptAlgorithm; - char* encryptKey; + char *encryptKey; // writer STsdbFD *fd; TSttBlkArray sttBlkArray[1]; @@ -290,7 +291,7 @@ static int32_t tsdbUpgradeSttFile(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReade } code = tsdbFileWriteSttBlk(ctx->fd, ctx->sttBlkArray, ctx->footer->sttBlkPtr, &fobj->f->size, ctx->encryptAlgorithm, - ctx->encryptKey); + ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit1); code = tsdbFileWriteSttFooter(ctx->fd, ctx->footer, &fobj->f->size, ctx->encryptAlgorithm, ctx->encryptKey); @@ -442,7 +443,7 @@ static int32_t tsdbUpgradeOpenTombFile(STsdb *tsdb, STFileSet *fset, STsdbFD **f uint8_t hdr[TSDB_FHDR_SIZE] = {0}; int32_t encryptAlgorithm = tsdb->pVnode->config.tsdbCfg.encryptAlgorithm; - char* encryptKey = tsdb->pVnode->config.tsdbCfg.encryptKey; + char *encryptKey = tsdb->pVnode->config.tsdbCfg.encryptKey; code = tsdbWriteFile(fd[0], 0, hdr, TSDB_FHDR_SIZE, encryptAlgorithm, encryptKey); TSDB_CHECK_CODE(code, lino, _exit); @@ -467,8 +468,8 @@ static int32_t tsdbDumpTombDataToFSet(STsdb *tsdb, SDelFReader *reader, SArray * int64_t minKey; int64_t maxKey; SBuffer buffers[10]; - int32_t encryptAlgorithm; - char* encryptKey; + int32_t encryptAlgorithm; + char *encryptKey; // reader SArray *aDelData; // writer @@ -538,20 +539,20 @@ static int32_t tsdbDumpTombDataToFSet(STsdb *tsdb, SDelFReader *reader, SArray * if (ctx->fd != NULL) { if (ctx->toStt) { - code = tsdbFileWriteTombBlk(ctx->fd, ctx->tombBlkArray, ctx->sttFooter->tombBlkPtr, &ctx->fobj->f->size, + code = tsdbFileWriteTombBlk(ctx->fd, ctx->tombBlkArray, ctx->sttFooter->tombBlkPtr, &ctx->fobj->f->size, ctx->encryptAlgorithm, ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); - code = tsdbFileWriteSttFooter(ctx->fd, ctx->sttFooter, &ctx->fobj->f->size, ctx->encryptAlgorithm, - ctx->encryptKey); + code = + tsdbFileWriteSttFooter(ctx->fd, ctx->sttFooter, &ctx->fobj->f->size, ctx->encryptAlgorithm, ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); } else { - code = tsdbFileWriteTombBlk(ctx->fd, ctx->tombBlkArray, ctx->tombFooter->tombBlkPtr, &ctx->fobj->f->size, + code = tsdbFileWriteTombBlk(ctx->fd, ctx->tombBlkArray, ctx->tombFooter->tombBlkPtr, &ctx->fobj->f->size, ctx->encryptAlgorithm, ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); - code = tsdbFileWriteTombFooter(ctx->fd, ctx->tombFooter, &ctx->fobj->f->size, ctx->encryptAlgorithm, - ctx->encryptKey); + code = tsdbFileWriteTombFooter(ctx->fd, ctx->tombFooter, &ctx->fobj->f->size, ctx->encryptAlgorithm, + ctx->encryptKey); TSDB_CHECK_CODE(code, lino, _exit); } diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index 58075cf0ac..025fbf3eb7 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -36,183 +36,47 @@ void tMapDataClear(SMapData *pMapData) { pMapData->aOffset = NULL; } -#ifdef BUILD_NO_CALL -int32_t tMapDataPutItem(SMapData *pMapData, void *pItem, int32_t (*tPutItemFn)(uint8_t *, void *)) { - int32_t code = 0; - int32_t offset = pMapData->nData; - int32_t nItem = pMapData->nItem; - - pMapData->nItem++; - pMapData->nData += tPutItemFn(NULL, pItem); - - // alloc - code = tRealloc((uint8_t **)&pMapData->aOffset, sizeof(int32_t) * pMapData->nItem); - if (code) goto _exit; - code = tRealloc(&pMapData->pData, pMapData->nData); - if (code) goto _exit; - - // put - pMapData->aOffset[nItem] = offset; - tPutItemFn(pMapData->pData + offset, pItem); - -_exit: - return code; -} - -int32_t tMapDataCopy(SMapData *pFrom, SMapData *pTo) { - int32_t code = 0; - - pTo->nItem = pFrom->nItem; - pTo->nData = pFrom->nData; - code = tRealloc((uint8_t **)&pTo->aOffset, sizeof(int32_t) * pFrom->nItem); - if (code) goto _exit; - code = tRealloc(&pTo->pData, pFrom->nData); - if (code) goto _exit; - memcpy(pTo->aOffset, pFrom->aOffset, sizeof(int32_t) * pFrom->nItem); - memcpy(pTo->pData, pFrom->pData, pFrom->nData); - -_exit: - return code; -} - -int32_t tMapDataSearch(SMapData *pMapData, void *pSearchItem, int32_t (*tGetItemFn)(uint8_t *, void *), - int32_t (*tItemCmprFn)(const void *, const void *), void *pItem) { - int32_t code = 0; - int32_t lidx = 0; - int32_t ridx = pMapData->nItem - 1; - int32_t midx; - int32_t c; - - while (lidx <= ridx) { - midx = (lidx + ridx) / 2; - - tMapDataGetItemByIdx(pMapData, midx, pItem, tGetItemFn); - - c = tItemCmprFn(pSearchItem, pItem); - if (c == 0) { - goto _exit; - } else if (c < 0) { - ridx = midx - 1; - } else { - lidx = midx + 1; - } +int32_t tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)) { + if (idx < 0 || idx >= pMapData->nItem) { + return TSDB_CODE_OUT_OF_RANGE; } - code = TSDB_CODE_NOT_FOUND; - -_exit: - return code; -} -#endif - -void tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)) { - ASSERT(idx >= 0 && idx < pMapData->nItem); tGetItemFn(pMapData->pData + pMapData->aOffset[idx], pItem); + return 0; } -#ifdef BUILD_NO_CALL -int32_t tMapDataToArray(SMapData *pMapData, int32_t itemSize, int32_t (*tGetItemFn)(uint8_t *, void *), - SArray **ppArray) { - int32_t code = 0; - - SArray *pArray = taosArrayInit(pMapData->nItem, itemSize); - if (pArray == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _exit; - } - - for (int32_t i = 0; i < pMapData->nItem; i++) { - tMapDataGetItemByIdx(pMapData, i, taosArrayReserve(pArray, 1), tGetItemFn); - } - -_exit: - *ppArray = pArray; - return code; -} - -int32_t tPutMapData(uint8_t *p, SMapData *pMapData) { - int32_t n = 0; - - n += tPutI32v(p ? p + n : p, pMapData->nItem); - if (pMapData->nItem) { - int32_t lOffset = 0; - for (int32_t iItem = 0; iItem < pMapData->nItem; iItem++) { - n += tPutI32v(p ? p + n : p, pMapData->aOffset[iItem] - lOffset); - lOffset = pMapData->aOffset[iItem]; - } - - n += tPutI32v(p ? p + n : p, pMapData->nData); - if (p) { - memcpy(p + n, pMapData->pData, pMapData->nData); - } - n += pMapData->nData; - } - - return n; -} -#endif - -int32_t tGetMapData(uint8_t *p, SMapData *pMapData) { - int32_t n = 0; - int32_t offset; +int32_t tGetMapData(uint8_t *p, SMapData *pMapData, int64_t *decodeSize) { + int64_t size = 0; tMapDataReset(pMapData); - n += tGetI32v(p + n, &pMapData->nItem); + size += tGetI32v(p + size, &pMapData->nItem); if (pMapData->nItem) { - if (tRealloc((uint8_t **)&pMapData->aOffset, sizeof(int32_t) * pMapData->nItem)) return -1; + if (tRealloc((uint8_t **)&pMapData->aOffset, sizeof(int32_t) * pMapData->nItem)) { + return TSDB_CODE_OUT_OF_MEMORY; + } int32_t lOffset = 0; for (int32_t iItem = 0; iItem < pMapData->nItem; iItem++) { - n += tGetI32v(p + n, &pMapData->aOffset[iItem]); + size += tGetI32v(p + size, &pMapData->aOffset[iItem]); pMapData->aOffset[iItem] += lOffset; lOffset = pMapData->aOffset[iItem]; } - n += tGetI32v(p + n, &pMapData->nData); - if (tRealloc(&pMapData->pData, pMapData->nData)) return -1; - memcpy(pMapData->pData, p + n, pMapData->nData); - n += pMapData->nData; + size += tGetI32v(p + size, &pMapData->nData); + if (tRealloc(&pMapData->pData, pMapData->nData)) { + return TSDB_CODE_OUT_OF_MEMORY; + } + memcpy(pMapData->pData, p + size, pMapData->nData); + size += pMapData->nData; } - return n; -} - -#ifdef BUILD_NO_CALL -// TABLEID ======================================================================= -int32_t tTABLEIDCmprFn(const void *p1, const void *p2) { - TABLEID *pId1 = (TABLEID *)p1; - TABLEID *pId2 = (TABLEID *)p2; - - if (pId1->suid < pId2->suid) { - return -1; - } else if (pId1->suid > pId2->suid) { - return 1; + if (decodeSize) { + *decodeSize = size; } - - if (pId1->uid < pId2->uid) { - return -1; - } else if (pId1->uid > pId2->uid) { - return 1; - } - return 0; } -// SBlockIdx ====================================================== -int32_t tPutBlockIdx(uint8_t *p, void *ph) { - int32_t n = 0; - SBlockIdx *pBlockIdx = (SBlockIdx *)ph; - - n += tPutI64(p ? p + n : p, pBlockIdx->suid); - n += tPutI64(p ? p + n : p, pBlockIdx->uid); - n += tPutI64v(p ? p + n : p, pBlockIdx->offset); - n += tPutI64v(p ? p + n : p, pBlockIdx->size); - - return n; -} -#endif - int32_t tGetBlockIdx(uint8_t *p, void *ph) { int32_t n = 0; SBlockIdx *pBlockIdx = (SBlockIdx *)ph; @@ -225,77 +89,6 @@ int32_t tGetBlockIdx(uint8_t *p, void *ph) { return n; } -#ifdef BUILD_NO_CALL -int32_t tCmprBlockIdx(void const *lhs, void const *rhs) { - SBlockIdx *lBlockIdx = (SBlockIdx *)lhs; - SBlockIdx *rBlockIdx = (SBlockIdx *)rhs; - - if (lBlockIdx->suid < rBlockIdx->suid) { - return -1; - } else if (lBlockIdx->suid > rBlockIdx->suid) { - return 1; - } - - if (lBlockIdx->uid < rBlockIdx->uid) { - return -1; - } else if (lBlockIdx->uid > rBlockIdx->uid) { - return 1; - } - - return 0; -} - -int32_t tCmprBlockL(void const *lhs, void const *rhs) { - SBlockIdx *lBlockIdx = (SBlockIdx *)lhs; - SSttBlk *rBlockL = (SSttBlk *)rhs; - - if (lBlockIdx->suid < rBlockL->suid) { - return -1; - } else if (lBlockIdx->suid > rBlockL->suid) { - return 1; - } - - if (lBlockIdx->uid < rBlockL->minUid) { - return -1; - } else if (lBlockIdx->uid > rBlockL->maxUid) { - return 1; - } - - return 0; -} - -// SDataBlk ====================================================== -void tDataBlkReset(SDataBlk *pDataBlk) { - *pDataBlk = (SDataBlk){.minKey = TSDBKEY_MAX, .maxKey = TSDBKEY_MIN, .minVer = VERSION_MAX, .maxVer = VERSION_MIN}; -} - -int32_t tPutDataBlk(uint8_t *p, void *ph) { - int32_t n = 0; - SDataBlk *pDataBlk = (SDataBlk *)ph; - - n += tPutI64v(p ? p + n : p, pDataBlk->minKey.version); - n += tPutI64v(p ? p + n : p, pDataBlk->minKey.ts); - n += tPutI64v(p ? p + n : p, pDataBlk->maxKey.version); - n += tPutI64v(p ? p + n : p, pDataBlk->maxKey.ts); - n += tPutI64v(p ? p + n : p, pDataBlk->minVer); - n += tPutI64v(p ? p + n : p, pDataBlk->maxVer); - n += tPutI32v(p ? p + n : p, pDataBlk->nRow); - n += tPutI8(p ? p + n : p, pDataBlk->hasDup); - n += tPutI8(p ? p + n : p, pDataBlk->nSubBlock); - for (int8_t iSubBlock = 0; iSubBlock < pDataBlk->nSubBlock; iSubBlock++) { - n += tPutI64v(p ? p + n : p, pDataBlk->aSubBlock[iSubBlock].offset); - n += tPutI32v(p ? p + n : p, pDataBlk->aSubBlock[iSubBlock].szBlock); - n += tPutI32v(p ? p + n : p, pDataBlk->aSubBlock[iSubBlock].szKey); - } - if (pDataBlk->nSubBlock == 1 && !pDataBlk->hasDup) { - n += tPutI64v(p ? p + n : p, pDataBlk->smaInfo.offset); - n += tPutI32v(p ? p + n : p, pDataBlk->smaInfo.size); - } - - return n; -} -#endif - int32_t tGetDataBlk(uint8_t *p, void *ph) { int32_t n = 0; SDataBlk *pDataBlk = (SDataBlk *)ph; @@ -325,48 +118,6 @@ int32_t tGetDataBlk(uint8_t *p, void *ph) { return n; } -#ifdef BUILD_NO_CALL -int32_t tDataBlkCmprFn(const void *p1, const void *p2) { - SDataBlk *pBlock1 = (SDataBlk *)p1; - SDataBlk *pBlock2 = (SDataBlk *)p2; - - if (tsdbKeyCmprFn(&pBlock1->maxKey, &pBlock2->minKey) < 0) { - return -1; - } else if (tsdbKeyCmprFn(&pBlock1->minKey, &pBlock2->maxKey) > 0) { - return 1; - } - - return 0; -} - -bool tDataBlkHasSma(SDataBlk *pDataBlk) { - if (pDataBlk->nSubBlock > 1) return false; - if (pDataBlk->hasDup) return false; - - return pDataBlk->smaInfo.size > 0; -} - -// SSttBlk ====================================================== -int32_t tPutSttBlk(uint8_t *p, void *ph) { - int32_t n = 0; - SSttBlk *pSttBlk = (SSttBlk *)ph; - - n += tPutI64(p ? p + n : p, pSttBlk->suid); - n += tPutI64(p ? p + n : p, pSttBlk->minUid); - n += tPutI64(p ? p + n : p, pSttBlk->maxUid); - n += tPutI64v(p ? p + n : p, pSttBlk->minKey); - n += tPutI64v(p ? p + n : p, pSttBlk->maxKey); - n += tPutI64v(p ? p + n : p, pSttBlk->minVer); - n += tPutI64v(p ? p + n : p, pSttBlk->maxVer); - n += tPutI32v(p ? p + n : p, pSttBlk->nRow); - n += tPutI64v(p ? p + n : p, pSttBlk->bInfo.offset); - n += tPutI32v(p ? p + n : p, pSttBlk->bInfo.szBlock); - n += tPutI32v(p ? p + n : p, pSttBlk->bInfo.szKey); - - return n; -} -#endif - int32_t tGetSttBlk(uint8_t *p, void *ph) { int32_t n = 0; SSttBlk *pSttBlk = (SSttBlk *)ph; @@ -391,47 +142,42 @@ int32_t tGetSttBlk(uint8_t *p, void *ph) { static const int32_t BLOCK_WITH_ALG_VER = 2; int32_t tPutBlockCol(SBuffer *buffer, const SBlockCol *pBlockCol, int32_t ver, uint32_t defaultCmprAlg) { - int32_t code; - ASSERT(pBlockCol->flag && (pBlockCol->flag != HAS_NONE)); - if ((code = tBufferPutI16v(buffer, pBlockCol->cid))) return code; - if ((code = tBufferPutI8(buffer, pBlockCol->type))) return code; - if ((code = tBufferPutI8(buffer, pBlockCol->cflag))) return code; - if ((code = tBufferPutI8(buffer, pBlockCol->flag))) return code; - if ((code = tBufferPutI32v(buffer, pBlockCol->szOrigin))) return code; + TAOS_CHECK_RETURN(tBufferPutI16v(buffer, pBlockCol->cid)); + TAOS_CHECK_RETURN(tBufferPutI8(buffer, pBlockCol->type)); + TAOS_CHECK_RETURN(tBufferPutI8(buffer, pBlockCol->cflag)); + TAOS_CHECK_RETURN(tBufferPutI8(buffer, pBlockCol->flag)); + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szOrigin)); if (pBlockCol->flag != HAS_NULL) { if (pBlockCol->flag != HAS_VALUE) { - if ((code = tBufferPutI32v(buffer, pBlockCol->szBitmap))) return code; + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szBitmap)); } if (IS_VAR_DATA_TYPE(pBlockCol->type)) { - if ((code = tBufferPutI32v(buffer, pBlockCol->szOffset))) return code; + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szOffset)); } if (pBlockCol->flag != (HAS_NULL | HAS_NONE)) { - if ((code = tBufferPutI32v(buffer, pBlockCol->szValue))) return code; + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szValue)); } - - if ((code = tBufferPutI32v(buffer, pBlockCol->offset))) return code; + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->offset)); } if (ver >= BLOCK_WITH_ALG_VER) { - if ((code = tBufferPutU32(buffer, pBlockCol->alg))) return code; + TAOS_CHECK_RETURN(tBufferPutU32(buffer, pBlockCol->alg)); } else { - if ((code = tBufferPutU32(buffer, defaultCmprAlg))) return code; + TAOS_CHECK_RETURN(tBufferPutU32(buffer, defaultCmprAlg)); } return 0; } int32_t tGetBlockCol(SBufferReader *br, SBlockCol *pBlockCol, int32_t ver, uint32_t defaultCmprAlg) { - int32_t code; - - if ((code = tBufferGetI16v(br, &pBlockCol->cid))) return code; - if ((code = tBufferGetI8(br, &pBlockCol->type))) return code; - if ((code = tBufferGetI8(br, &pBlockCol->cflag))) return code; - if ((code = tBufferGetI8(br, &pBlockCol->flag))) return code; - if ((code = tBufferGetI32v(br, &pBlockCol->szOrigin))) return code; + TAOS_CHECK_RETURN(tBufferGetI16v(br, &pBlockCol->cid)); + TAOS_CHECK_RETURN(tBufferGetI8(br, &pBlockCol->type)); + TAOS_CHECK_RETURN(tBufferGetI8(br, &pBlockCol->cflag)); + TAOS_CHECK_RETURN(tBufferGetI8(br, &pBlockCol->flag)); + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szOrigin)); ASSERT(pBlockCol->flag && (pBlockCol->flag != HAS_NONE)); @@ -442,22 +188,22 @@ int32_t tGetBlockCol(SBufferReader *br, SBlockCol *pBlockCol, int32_t ver, uint3 if (pBlockCol->flag != HAS_NULL) { if (pBlockCol->flag != HAS_VALUE) { - if ((code = tBufferGetI32v(br, &pBlockCol->szBitmap))) return code; + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szBitmap)); } if (IS_VAR_DATA_TYPE(pBlockCol->type)) { - if ((code = tBufferGetI32v(br, &pBlockCol->szOffset))) return code; + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szOffset)); } if (pBlockCol->flag != (HAS_NULL | HAS_NONE)) { - if ((code = tBufferGetI32v(br, &pBlockCol->szValue))) return code; + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szValue)); } - if ((code = tBufferGetI32v(br, &pBlockCol->offset))) return code; + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->offset)); } if (ver >= BLOCK_WITH_ALG_VER) { - if ((code = tBufferGetU32(br, &pBlockCol->alg))) return code; + TAOS_CHECK_RETURN(tBufferGetU32(br, &pBlockCol->alg)); } else { pBlockCol->alg = defaultCmprAlg; } @@ -465,50 +211,6 @@ int32_t tGetBlockCol(SBufferReader *br, SBlockCol *pBlockCol, int32_t ver, uint3 return 0; } -#ifdef BUILD_NO_CALL -int32_t tBlockColCmprFn(const void *p1, const void *p2) { - if (((SBlockCol *)p1)->cid < ((SBlockCol *)p2)->cid) { - return -1; - } else if (((SBlockCol *)p1)->cid > ((SBlockCol *)p2)->cid) { - return 1; - } - - return 0; -} - -// SDelIdx ====================================================== -int32_t tCmprDelIdx(void const *lhs, void const *rhs) { - SDelIdx *lDelIdx = (SDelIdx *)lhs; - SDelIdx *rDelIdx = (SDelIdx *)rhs; - - if (lDelIdx->suid < rDelIdx->suid) { - return -1; - } else if (lDelIdx->suid > rDelIdx->suid) { - return 1; - } - - if (lDelIdx->uid < rDelIdx->uid) { - return -1; - } else if (lDelIdx->uid > rDelIdx->uid) { - return 1; - } - - return 0; -} - -int32_t tPutDelIdx(uint8_t *p, void *ph) { - SDelIdx *pDelIdx = (SDelIdx *)ph; - int32_t n = 0; - - n += tPutI64(p ? p + n : p, pDelIdx->suid); - n += tPutI64(p ? p + n : p, pDelIdx->uid); - n += tPutI64v(p ? p + n : p, pDelIdx->offset); - n += tPutI64v(p ? p + n : p, pDelIdx->size); - - return n; -} -#endif - int32_t tGetDelIdx(uint8_t *p, void *ph) { SDelIdx *pDelIdx = (SDelIdx *)ph; int32_t n = 0; @@ -521,20 +223,6 @@ int32_t tGetDelIdx(uint8_t *p, void *ph) { return n; } -#ifdef BUILD_NO_CALL -// SDelData ====================================================== -int32_t tPutDelData(uint8_t *p, void *ph) { - SDelData *pDelData = (SDelData *)ph; - int32_t n = 0; - - n += tPutI64v(p ? p + n : p, pDelData->version); - n += tPutI64(p ? p + n : p, pDelData->sKey); - n += tPutI64(p ? p + n : p, pDelData->eKey); - - return n; -} -#endif - int32_t tGetDelData(uint8_t *p, void *ph) { SDelData *pDelData = (SDelData *)ph; int32_t n = 0; @@ -680,20 +368,16 @@ int32_t tsdbRowCompareWithoutVersion(const void *p1, const void *p2) { // STSDBRowIter ====================================================== int32_t tsdbRowIterOpen(STSDBRowIter *pIter, TSDBROW *pRow, STSchema *pTSchema) { - int32_t code = 0; - pIter->pRow = pRow; if (pRow->type == TSDBROW_ROW_FMT) { - code = tRowIterOpen(pRow->pTSRow, pTSchema, &pIter->pIter); - if (code) goto _exit; + TAOS_CHECK_RETURN(tRowIterOpen(pRow->pTSRow, pTSchema, &pIter->pIter)); } else if (pRow->type == TSDBROW_COL_FMT) { pIter->iColData = 0; } else { ASSERT(0); } -_exit: - return code; + return 0; } void tsdbRowClose(STSDBRowIter *pIter) { @@ -748,8 +432,7 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) *pColVal = COL_VAL_VALUE(pTColumn->colId, ((SValue){.type = pTColumn->type, .val = key.ts})); if (taosArrayPush(pMerger->pArray, pColVal) == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - return code; + return TSDB_CODE_OUT_OF_MEMORY; } // other @@ -760,7 +443,9 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) --iCol; continue; } else if (pTSchema->columns[jCol].colId > pTColumn->colId) { - taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)); + if (taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)) == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } continue; } @@ -769,10 +454,7 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) uint8_t *pVal = pColVal->value.pData; pColVal->value.pData = NULL; - code = tRealloc(&pColVal->value.pData, pColVal->value.nData); - if (code) { - return TSDB_CODE_OUT_OF_MEMORY; - } + TAOS_CHECK_RETURN(tRealloc(&pColVal->value.pData, pColVal->value.nData)); if (pColVal->value.nData) { memcpy(pColVal->value.pData, pVal, pColVal->value.nData); @@ -780,14 +462,15 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) } if (taosArrayPush(pMerger->pArray, pColVal) == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - return code; + return TSDB_CODE_OUT_OF_MEMORY; } } for (; iCol < pMerger->pTSchema->numOfCols; ++iCol) { pTColumn = &pMerger->pTSchema->columns[iCol]; - taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)); + if (taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)) == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } pMerger->version = key.version; @@ -812,8 +495,7 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) if (IS_VAR_DATA_TYPE(pColVal->value.type)) { SColVal *pTColVal = taosArrayGet(pMerger->pArray, iCol); if (!COL_VAL_IS_NULL(pColVal)) { - code = tRealloc(&pTColVal->value.pData, pColVal->value.nData); - if (code) return code; + TAOS_CHECK_RETURN(tRealloc(&pTColVal->value.pData, pColVal->value.nData)); pTColVal->value.nData = pColVal->value.nData; if (pTColVal->value.nData) { @@ -832,8 +514,7 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) SColVal *tColVal = (SColVal *)taosArrayGet(pMerger->pArray, iCol); if (COL_VAL_IS_NONE(tColVal) && !COL_VAL_IS_NONE(pColVal)) { if ((!COL_VAL_IS_NULL(pColVal)) && IS_VAR_DATA_TYPE(pColVal->value.type)) { - code = tRealloc(&tColVal->value.pData, pColVal->value.nData); - if (code) return code; + TAOS_CHECK_RETURN(tRealloc(&tColVal->value.pData, pColVal->value.nData)); tColVal->value.nData = pColVal->value.nData; if (pColVal->value.nData) { @@ -891,79 +572,8 @@ int32_t tsdbRowMergerGetRow(SRowMerger *pMerger, SRow **ppRow) { return tRowBuild(pMerger->pArray, pMerger->pTSchema, ppRow); } -/* -// delete skyline ====================================================== -static int32_t tsdbMergeSkyline2(SArray *aSkyline1, SArray *aSkyline2, SArray *aSkyline) { - int32_t code = 0; - int32_t i1 = 0; - int32_t n1 = taosArrayGetSize(aSkyline1); - int32_t i2 = 0; - int32_t n2 = taosArrayGetSize(aSkyline2); - TSDBKEY *pSkyline1; - TSDBKEY *pSkyline2; - TSDBKEY item; - int64_t version1 = 0; - int64_t version2 = 0; - - ASSERT(n1 > 0 && n2 > 0); - - taosArrayClear(aSkyline); - - while (i1 < n1 && i2 < n2) { - pSkyline1 = (TSDBKEY *)taosArrayGet(aSkyline1, i1); - pSkyline2 = (TSDBKEY *)taosArrayGet(aSkyline2, i2); - - if (pSkyline1->ts < pSkyline2->ts) { - version1 = pSkyline1->version; - i1++; - } else if (pSkyline1->ts > pSkyline2->ts) { - version2 = pSkyline2->version; - i2++; - } else { - version1 = pSkyline1->version; - version2 = pSkyline2->version; - i1++; - i2++; - } - - item.ts = TMIN(pSkyline1->ts, pSkyline2->ts); - item.version = TMAX(version1, version2); - if (taosArrayPush(aSkyline, &item) == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _exit; - } - } - - while (i1 < n1) { - pSkyline1 = (TSDBKEY *)taosArrayGet(aSkyline1, i1); - item.ts = pSkyline1->ts; - item.version = pSkyline1->version; - if (taosArrayPush(aSkyline, &item) == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _exit; - } - i1++; - } - - while (i2 < n2) { - pSkyline2 = (TSDBKEY *)taosArrayGet(aSkyline2, i2); - item.ts = pSkyline2->ts; - item.version = pSkyline2->version; - if (taosArrayPush(aSkyline, &item) == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _exit; - } - i2++; - } - -_exit: - return code; -} -*/ - // delete skyline ====================================================== static int32_t tsdbMergeSkyline(SArray *pSkyline1, SArray *pSkyline2, SArray *pSkyline) { - int32_t code = 0; int32_t i1 = 0; int32_t n1 = taosArrayGetSize(pSkyline1); int32_t i2 = 0; @@ -1017,7 +627,7 @@ static int32_t tsdbMergeSkyline(SArray *pSkyline1, SArray *pSkyline2, SArray *pS } pSkyline->size = TARRAY_ELEM_IDX(pSkyline, pItem); - return code; + return 0; } int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, SArray *pSkyline) { @@ -1029,8 +639,12 @@ int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, if (sidx == eidx) { TSDBKEY *pItem1 = taosArrayGet(aSkyline, sidx * 2); TSDBKEY *pItem2 = taosArrayGet(aSkyline, sidx * 2 + 1); - taosArrayPush(pSkyline, &pItem1); - taosArrayPush(pSkyline, &pItem2); + if (taosArrayPush(pSkyline, &pItem1) == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + if (taosArrayPush(pSkyline, &pItem2) == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } else { SArray *pSkyline1 = NULL; SArray *pSkyline2 = NULL; @@ -1043,11 +657,8 @@ int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, goto _clear; } - code = tsdbBuildDeleteSkylineImpl(aSkyline, sidx, midx, pSkyline1); - if (code) goto _clear; - - code = tsdbBuildDeleteSkylineImpl(aSkyline, midx + 1, eidx, pSkyline2); - if (code) goto _clear; + TAOS_CHECK_GOTO(tsdbBuildDeleteSkylineImpl(aSkyline, sidx, midx, pSkyline1), NULL, _clear); + TAOS_CHECK_GOTO(tsdbBuildDeleteSkylineImpl(aSkyline, midx + 1, eidx, pSkyline2), NULL, _clear); code = tsdbMergeSkyline(pSkyline1, pSkyline2, pSkyline); @@ -1063,72 +674,48 @@ int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SAr SDelData *pDelData; int32_t code = 0; int32_t dataNum = eidx - sidx + 1; - SArray *aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY)); - SArray *pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES); + SArray *aTmpSkyline; + SArray *pSkyline; + + aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY)); + if (aTmpSkyline == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES); + if (pSkyline) { + taosArrayDestroy(aTmpSkyline); + return TSDB_CODE_OUT_OF_MEMORY; + } taosArrayClear(aSkyline); for (int32_t i = sidx; i <= eidx; ++i) { pDelData = (SDelData *)taosArrayGet(aDelData, i); - taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}); - taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}); + if (taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}) == NULL) { + TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _clear); + } + + if (taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}) == NULL) { + TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _clear); + } } - code = tsdbBuildDeleteSkylineImpl(aTmpSkyline, sidx, eidx, pSkyline); - if (code) goto _clear; + TAOS_CHECK_GOTO(tsdbBuildDeleteSkylineImpl(aTmpSkyline, sidx, eidx, pSkyline), NULL, _clear); int32_t skylineNum = taosArrayGetSize(pSkyline); for (int32_t i = 0; i < skylineNum; ++i) { TSDBKEY *p = taosArrayGetP(pSkyline, i); - taosArrayPush(aSkyline, p); + if (taosArrayPush(aSkyline, p) == NULL) { + TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _clear); + } } _clear: taosArrayDestroy(aTmpSkyline); taosArrayDestroy(pSkyline); - return code; } -/* -int32_t tsdbBuildDeleteSkyline2(SArray *aDelData, int32_t sidx, int32_t eidx, SArray *aSkyline) { - int32_t code = 0; - SDelData *pDelData; - int32_t midx; - - taosArrayClear(aSkyline); - if (sidx == eidx) { - pDelData = (SDelData *)taosArrayGet(aDelData, sidx); - taosArrayPush(aSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}); - taosArrayPush(aSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}); - } else { - SArray *aSkyline1 = NULL; - SArray *aSkyline2 = NULL; - - aSkyline1 = taosArrayInit(0, sizeof(TSDBKEY)); - aSkyline2 = taosArrayInit(0, sizeof(TSDBKEY)); - if (aSkyline1 == NULL || aSkyline2 == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _clear; - } - midx = (sidx + eidx) / 2; - - code = tsdbBuildDeleteSkyline(aDelData, sidx, midx, aSkyline1); - if (code) goto _clear; - - code = tsdbBuildDeleteSkyline(aDelData, midx + 1, eidx, aSkyline2); - if (code) goto _clear; - - code = tsdbMergeSkyline(aSkyline1, aSkyline2, aSkyline); - - _clear: - taosArrayDestroy(aSkyline1); - taosArrayDestroy(aSkyline2); - } - - return code; -} -*/ - // SBlockData ====================================================== int32_t tBlockDataCreate(SBlockData *pBlockData) { pBlockData->suid = 0; @@ -1158,8 +745,6 @@ void tBlockDataDestroy(SBlockData *pBlockData) { } static int32_t tBlockDataAdjustColData(SBlockData *pBlockData, int32_t nColData) { - int32_t code = 0; - if (pBlockData->nColData > nColData) { for (int32_t i = nColData; i < pBlockData->nColData; i++) { tColDataDestroy(&pBlockData->aColData[i]); @@ -1167,8 +752,7 @@ static int32_t tBlockDataAdjustColData(SBlockData *pBlockData, int32_t nColData) } else if (pBlockData->nColData < nColData) { SColData *aColData = taosMemoryRealloc(pBlockData->aColData, sizeof(SBlockData) * nColData); if (aColData == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; - goto _exit; + return TSDB_CODE_OUT_OF_MEMORY; } pBlockData->aColData = aColData; @@ -1176,12 +760,10 @@ static int32_t tBlockDataAdjustColData(SBlockData *pBlockData, int32_t nColData) } pBlockData->nColData = nColData; -_exit: - return code; + return 0; } -int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, int16_t *aCid, int32_t nCid) { - int32_t code = 0; +int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, int16_t *aCid, int32_t nCid) { ASSERT(pId->suid || pId->uid); pBlockData->suid = pId->suid; @@ -1189,8 +771,7 @@ int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, pBlockData->nRow = 0; if (aCid) { - code = tBlockDataAdjustColData(pBlockData, nCid); - if (code) goto _exit; + TAOS_CHECK_RETURN(tBlockDataAdjustColData(pBlockData, nCid)); int32_t iColumn = 1; STColumn *pTColumn = &pTSchema->columns[iColumn]; @@ -1217,17 +798,14 @@ int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, pTColumn = (iColumn < pTSchema->numOfCols) ? &pTSchema->columns[iColumn] : NULL; } } else { - code = tBlockDataAdjustColData(pBlockData, pTSchema->numOfCols - 1); - if (code) goto _exit; + TAOS_CHECK_RETURN(tBlockDataAdjustColData(pBlockData, pTSchema->numOfCols - 1)); for (int32_t iColData = 0; iColData < pBlockData->nColData; iColData++) { STColumn *pTColumn = &pTSchema->columns[iColData + 1]; tColDataInit(&pBlockData->aColData[iColData], pTColumn->colId, pTColumn->type, pTColumn->flags); } } - -_exit: - return code; + return 0; } void tBlockDataReset(SBlockData *pBlockData) { @@ -1309,43 +887,35 @@ _exit: } int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema, int64_t uid) { - int32_t code = 0; - ASSERT(pBlockData->suid || pBlockData->uid); // uid if (pBlockData->uid == 0) { ASSERT(uid); - code = tRealloc((uint8_t **)&pBlockData->aUid, sizeof(int64_t) * (pBlockData->nRow + 1)); - if (code) goto _exit; + TAOS_CHECK_RETURN(tRealloc((uint8_t **)&pBlockData->aUid, sizeof(int64_t) * (pBlockData->nRow + 1))); pBlockData->aUid[pBlockData->nRow] = uid; } // version - code = tRealloc((uint8_t **)&pBlockData->aVersion, sizeof(int64_t) * (pBlockData->nRow + 1)); - if (code) goto _exit; + TAOS_CHECK_RETURN(tRealloc((uint8_t **)&pBlockData->aVersion, sizeof(int64_t) * (pBlockData->nRow + 1))); pBlockData->aVersion[pBlockData->nRow] = TSDBROW_VERSION(pRow); // timestamp - code = tRealloc((uint8_t **)&pBlockData->aTSKEY, sizeof(TSKEY) * (pBlockData->nRow + 1)); - if (code) goto _exit; + TAOS_CHECK_RETURN(tRealloc((uint8_t **)&pBlockData->aTSKEY, sizeof(TSKEY) * (pBlockData->nRow + 1))); pBlockData->aTSKEY[pBlockData->nRow] = TSDBROW_TS(pRow); if (pRow->type == TSDBROW_ROW_FMT) { - code = tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, 0 /* append */); - if (code) goto _exit; + TAOS_CHECK_RETURN( + tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, 0 /* append */)); } else if (pRow->type == TSDBROW_COL_FMT) { - code = tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, 0 /* append */); - if (code) goto _exit; + TAOS_CHECK_RETURN(tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, 0 /* append */)); } else { ASSERT(0); } pBlockData->nRow++; -_exit: - return code; + return 0; } -int32_t tBlockDataUpdateRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema) { - int32_t code = 0; +int32_t tBlockDataUpdateRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema) { // version int64_t lversion = pBlockData->aVersion[pBlockData->nRow - 1]; int64_t rversion = TSDBROW_VERSION(pRow); @@ -1356,40 +926,18 @@ int32_t tBlockDataUpdateRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTS // update other rows if (pRow->type == TSDBROW_ROW_FMT) { - code = tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, - (rversion > lversion) ? 1 : -1 /* update */); - if (code) goto _exit; + TAOS_CHECK_RETURN(tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, + (rversion > lversion) ? 1 : -1 /* update */)); } else if (pRow->type == TSDBROW_COL_FMT) { - code = tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, (rversion > lversion) ? 1 : -1); - if (code) goto _exit; + TAOS_CHECK_RETURN( + tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, (rversion > lversion) ? 1 : -1)); } else { ASSERT(0); } -_exit: - return code; + return 0; } -#ifdef BUILD_NO_CALL -int32_t tBlockDataTryUpsertRow(SBlockData *pBlockData, TSDBROW *pRow, int64_t uid) { - if (pBlockData->nRow == 0) { - return 1; - } else if (pBlockData->aTSKEY[pBlockData->nRow - 1] == TSDBROW_TS(pRow)) { - return pBlockData->nRow; - } else { - return pBlockData->nRow + 1; - } -} - -int32_t tBlockDataUpsertRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema, int64_t uid) { - if (pBlockData->nRow > 0 && pBlockData->aTSKEY[pBlockData->nRow - 1] == TSDBROW_TS(pRow)) { - return tBlockDataUpdateRow(pBlockData, pRow, pTSchema); - } else { - return tBlockDataAppendRow(pBlockData, pRow, pTSchema, uid); - } -} -#endif - SColData *tBlockDataGetColData(SBlockData *pBlockData, int16_t cid) { ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID); int32_t lidx = 0; @@ -1422,7 +970,8 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB int32_t lino = 0; SColCompressInfo *pInfo = pCompr; - code = tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, 1, &pInfo->defaultCmprAlg); + + TAOS_CHECK_GOTO(tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, 1, &pInfo->defaultCmprAlg), &lino, _exit); SDiskDataHdr hdr = { .delimiter = TSDB_FILE_DLMT, @@ -1440,8 +989,7 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB // Key part tBufferClear(&buffers[1]); - code = tBlockDataCompressKeyPart(bData, &hdr, &buffers[1], assist, (SColCompressInfo *)pInfo); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tBlockDataCompressKeyPart(bData, &hdr, &buffers[1], assist, (SColCompressInfo *)pInfo), &lino, _exit); // Regulart column part tBufferClear(&buffers[2]); @@ -1459,14 +1007,10 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB SColDataCompressInfo cinfo = { .cmprAlg = pInfo->defaultCmprAlg, }; - code = tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, colData->cid, &cinfo.cmprAlg); - if (code < 0) { - // - } + TAOS_UNUSED(tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, colData->cid, &cinfo.cmprAlg)); int32_t offset = buffers[3].size; - code = tColDataCompress(colData, &cinfo, &buffers[3], assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tColDataCompress(colData, &cinfo, &buffers[3], assist), &lino, _exit); SBlockCol blockCol = (SBlockCol){.cid = cinfo.columnId, .type = cinfo.dataType, @@ -1479,15 +1023,13 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB .offset = offset, .alg = cinfo.cmprAlg}; - code = tPutBlockCol(&buffers[2], &blockCol, hdr.fmtVer, hdr.cmprAlg); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tPutBlockCol(&buffers[2], &blockCol, hdr.fmtVer, hdr.cmprAlg), &lino, _exit); } hdr.szBlkCol = buffers[2].size; // SDiskDataHdr part tBufferClear(&buffers[0]); - code = tPutDiskDataHdr(&buffers[0], &hdr); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tPutDiskDataHdr(&buffers[0], &hdr), &lino, _exit); _exit: return code; @@ -1500,8 +1042,7 @@ int32_t tBlockDataDecompress(SBufferReader *br, SBlockData *blockData, SBuffer * SCompressInfo cinfo; // SDiskDataHdr - code = tGetDiskDataHdr(br, &hdr); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tGetDiskDataHdr(br, &hdr), &lino, _exit); tBlockDataReset(blockData); blockData->suid = hdr.suid; @@ -1509,8 +1050,7 @@ int32_t tBlockDataDecompress(SBufferReader *br, SBlockData *blockData, SBuffer * blockData->nRow = hdr.nRow; // Key part - code = tBlockDataDecompressKeyPart(&hdr, br, blockData, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tBlockDataDecompressKeyPart(&hdr, br, blockData, assist), &lino, _exit); // Column part SBufferReader br2 = *br; @@ -1518,11 +1058,11 @@ int32_t tBlockDataDecompress(SBufferReader *br, SBlockData *blockData, SBuffer * for (uint32_t startOffset = br2.offset; br2.offset - startOffset < hdr.szBlkCol;) { SBlockCol blockCol; - code = tGetBlockCol(&br2, &blockCol, hdr.fmtVer, hdr.cmprAlg); + TAOS_CHECK_GOTO(tGetBlockCol(&br2, &blockCol, hdr.fmtVer, hdr.cmprAlg), &lino, _exit); + if (blockCol.alg == 0) blockCol.alg = hdr.cmprAlg; - TSDB_CHECK_CODE(code, lino, _exit); - code = tBlockDataDecompressColData(&hdr, &blockCol, br, blockData, assist); - TSDB_CHECK_CODE(code, lino, _exit); + + TAOS_CHECK_GOTO(tBlockDataDecompressColData(&hdr, &blockCol, br, blockData, assist), &lino, _exit); } _exit: @@ -1531,28 +1071,26 @@ _exit: // SDiskDataHdr ============================== int32_t tPutDiskDataHdr(SBuffer *buffer, const SDiskDataHdr *pHdr) { - int32_t code; - - if ((code = tBufferPutU32(buffer, pHdr->delimiter))) return code; - if ((code = tBufferPutU32v(buffer, pHdr->fmtVer))) return code; - if ((code = tBufferPutI64(buffer, pHdr->suid))) return code; - if ((code = tBufferPutI64(buffer, pHdr->uid))) return code; - if ((code = tBufferPutI32v(buffer, pHdr->szUid))) return code; - if ((code = tBufferPutI32v(buffer, pHdr->szVer))) return code; - if ((code = tBufferPutI32v(buffer, pHdr->szKey))) return code; - if ((code = tBufferPutI32v(buffer, pHdr->szBlkCol))) return code; - if ((code = tBufferPutI32v(buffer, pHdr->nRow))) return code; + TAOS_CHECK_RETURN(tBufferPutU32(buffer, pHdr->delimiter)); + TAOS_CHECK_RETURN(tBufferPutU32v(buffer, pHdr->fmtVer)); + TAOS_CHECK_RETURN(tBufferPutI64(buffer, pHdr->suid)); + TAOS_CHECK_RETURN(tBufferPutI64(buffer, pHdr->uid)); + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szUid)); + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szVer)); + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szKey)); + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szBlkCol)); + TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->nRow)); if (pHdr->fmtVer < 2) { - if ((code = tBufferPutI8(buffer, pHdr->cmprAlg))) return code; + TAOS_CHECK_RETURN(tBufferPutI8(buffer, pHdr->cmprAlg)); } else if (pHdr->fmtVer == 2) { - if ((code = tBufferPutU32(buffer, pHdr->cmprAlg))) return code; + TAOS_CHECK_RETURN(tBufferPutU32(buffer, pHdr->cmprAlg)); } else { // more data fmt ver } if (pHdr->fmtVer >= 1) { - if ((code = tBufferPutI8(buffer, pHdr->numOfPKs))) return code; + TAOS_CHECK_RETURN(tBufferPutI8(buffer, pHdr->numOfPKs)); for (int i = 0; i < pHdr->numOfPKs; i++) { - if ((code = tPutBlockCol(buffer, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg))) return code; + TAOS_CHECK_RETURN(tPutBlockCol(buffer, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg)); } } @@ -1560,32 +1098,28 @@ int32_t tPutDiskDataHdr(SBuffer *buffer, const SDiskDataHdr *pHdr) { } int32_t tGetDiskDataHdr(SBufferReader *br, SDiskDataHdr *pHdr) { - int32_t code; - - if ((code = tBufferGetU32(br, &pHdr->delimiter))) return code; - if ((code = tBufferGetU32v(br, &pHdr->fmtVer))) return code; - if ((code = tBufferGetI64(br, &pHdr->suid))) return code; - if ((code = tBufferGetI64(br, &pHdr->uid))) return code; - if ((code = tBufferGetI32v(br, &pHdr->szUid))) return code; - if ((code = tBufferGetI32v(br, &pHdr->szVer))) return code; - if ((code = tBufferGetI32v(br, &pHdr->szKey))) return code; - if ((code = tBufferGetI32v(br, &pHdr->szBlkCol))) return code; - if ((code = tBufferGetI32v(br, &pHdr->nRow))) return code; + TAOS_CHECK_RETURN(tBufferGetU32(br, &pHdr->delimiter)); + TAOS_CHECK_RETURN(tBufferGetU32v(br, &pHdr->fmtVer)); + TAOS_CHECK_RETURN(tBufferGetI64(br, &pHdr->suid)); + TAOS_CHECK_RETURN(tBufferGetI64(br, &pHdr->uid)); + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szUid)); + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szVer)); + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szKey)); + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szBlkCol)); + TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->nRow)); if (pHdr->fmtVer < 2) { int8_t cmprAlg = 0; - if ((code = tBufferGetI8(br, &cmprAlg))) return code; + TAOS_CHECK_RETURN(tBufferGetI8(br, &cmprAlg)); pHdr->cmprAlg = cmprAlg; } else if (pHdr->fmtVer == 2) { - if ((code = tBufferGetU32(br, &pHdr->cmprAlg))) return code; + TAOS_CHECK_RETURN(tBufferGetU32(br, &pHdr->cmprAlg)); } else { // more data fmt ver } if (pHdr->fmtVer >= 1) { - if ((code = tBufferGetI8(br, &pHdr->numOfPKs))) return code; + TAOS_CHECK_RETURN(tBufferGetI8(br, &pHdr->numOfPKs)); for (int i = 0; i < pHdr->numOfPKs; i++) { - if ((code = tGetBlockCol(br, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg))) { - return code; - } + TAOS_CHECK_RETURN(tGetBlockCol(br, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg)); } } else { pHdr->numOfPKs = 0; @@ -1596,26 +1130,20 @@ int32_t tGetDiskDataHdr(SBufferReader *br, SDiskDataHdr *pHdr) { // ALGORITHM ============================== int32_t tPutColumnDataAgg(SBuffer *buffer, SColumnDataAgg *pColAgg) { - int32_t code; - - if ((code = tBufferPutI16v(buffer, pColAgg->colId))) return code; - if ((code = tBufferPutI16v(buffer, pColAgg->numOfNull))) return code; - if ((code = tBufferPutI64(buffer, pColAgg->sum))) return code; - if ((code = tBufferPutI64(buffer, pColAgg->max))) return code; - if ((code = tBufferPutI64(buffer, pColAgg->min))) return code; - + TAOS_CHECK_RETURN(tBufferPutI16v(buffer, pColAgg->colId)); + TAOS_CHECK_RETURN(tBufferPutI16v(buffer, pColAgg->numOfNull)); + TAOS_CHECK_RETURN(tBufferPutI64(buffer, pColAgg->sum)); + TAOS_CHECK_RETURN(tBufferPutI64(buffer, pColAgg->max)); + TAOS_CHECK_RETURN(tBufferPutI64(buffer, pColAgg->min)); return 0; } int32_t tGetColumnDataAgg(SBufferReader *br, SColumnDataAgg *pColAgg) { - int32_t code; - - if ((code = tBufferGetI16v(br, &pColAgg->colId))) return code; - if ((code = tBufferGetI16v(br, &pColAgg->numOfNull))) return code; - if ((code = tBufferGetI64(br, &pColAgg->sum))) return code; - if ((code = tBufferGetI64(br, &pColAgg->max))) return code; - if ((code = tBufferGetI64(br, &pColAgg->min))) return code; - + TAOS_CHECK_RETURN(tBufferGetI16v(br, &pColAgg->colId)); + TAOS_CHECK_RETURN(tBufferGetI16v(br, &pColAgg->numOfNull)); + TAOS_CHECK_RETURN(tBufferGetI64(br, &pColAgg->sum)); + TAOS_CHECK_RETURN(tBufferGetI64(br, &pColAgg->max)); + TAOS_CHECK_RETURN(tBufferGetI64(br, &pColAgg->min)); return 0; } @@ -1632,8 +1160,7 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S .dataType = TSDB_DATA_TYPE_BIGINT, .originalSize = sizeof(int64_t) * bData->nRow, }; - code = tCompressDataToBuffer(bData->aUid, &cinfo, buffer, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tCompressDataToBuffer(bData->aUid, &cinfo, buffer, assist), &lino, _exit); hdr->szUid = cinfo.compressedSize; } @@ -1643,8 +1170,7 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S .dataType = TSDB_DATA_TYPE_BIGINT, .originalSize = sizeof(int64_t) * bData->nRow, }; - code = tCompressDataToBuffer((uint8_t *)bData->aVersion, &cinfo, buffer, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tCompressDataToBuffer((uint8_t *)bData->aVersion, &cinfo, buffer, assist), &lino, _exit); hdr->szVer = cinfo.compressedSize; // ts @@ -1654,8 +1180,7 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S .originalSize = sizeof(TSKEY) * bData->nRow, }; - code = tCompressDataToBuffer((uint8_t *)bData->aTSKEY, &cinfo, buffer, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tCompressDataToBuffer((uint8_t *)bData->aTSKEY, &cinfo, buffer, assist), &lino, _exit); hdr->szKey = cinfo.compressedSize; // primary keys @@ -1672,14 +1197,9 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S SColDataCompressInfo info = { .cmprAlg = hdr->cmprAlg, }; - code = tsdbGetColCmprAlgFromSet(compressInfo->pColCmpr, colData->cid, &info.cmprAlg); - if (code < 0) { - // do nothing - } else { - } + TAOS_UNUSED(tsdbGetColCmprAlgFromSet(compressInfo->pColCmpr, colData->cid, &info.cmprAlg)); - code = tColDataCompress(colData, &info, buffer, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tColDataCompress(colData, &info, buffer, assist), &lino, _exit); *blockCol = (SBlockCol){ .cid = info.columnId, @@ -1706,8 +1226,8 @@ int32_t tBlockDataDecompressColData(const SDiskDataHdr *hdr, const SBlockCol *bl SColData *colData; - code = tBlockDataAddColData(blockData, blockCol->cid, blockCol->type, blockCol->cflag, &colData); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tBlockDataAddColData(blockData, blockCol->cid, blockCol->type, blockCol->cflag, &colData), &lino, + _exit); // ASSERT(blockCol->flag != HAS_NONE); @@ -1737,8 +1257,7 @@ int32_t tBlockDataDecompressColData(const SDiskDataHdr *hdr, const SBlockCol *bl break; } - code = tColDataDecompress(BR_PTR(br), &info, colData, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tColDataDecompress(BR_PTR(br), &info, colData, assist), &lino, _exit); br->offset += blockCol->szBitmap + blockCol->szOffset + blockCol->szValue; _exit: @@ -1760,10 +1279,8 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, .originalSize = sizeof(int64_t) * hdr->nRow, }; - code = tRealloc((uint8_t **)&blockData->aUid, cinfo.originalSize); - TSDB_CHECK_CODE(code, lino, _exit); - code = tDecompressData(BR_PTR(br), &cinfo, blockData->aUid, cinfo.originalSize, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tRealloc((uint8_t **)&blockData->aUid, cinfo.originalSize), &lino, _exit); + TAOS_CHECK_GOTO(tDecompressData(BR_PTR(br), &cinfo, blockData->aUid, cinfo.originalSize, assist), &lino, _exit); br->offset += cinfo.compressedSize; } @@ -1774,10 +1291,8 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, .compressedSize = hdr->szVer, .originalSize = sizeof(int64_t) * hdr->nRow, }; - code = tRealloc((uint8_t **)&blockData->aVersion, cinfo.originalSize); - TSDB_CHECK_CODE(code, lino, _exit); - code = tDecompressData(BR_PTR(br), &cinfo, blockData->aVersion, cinfo.originalSize, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tRealloc((uint8_t **)&blockData->aVersion, cinfo.originalSize), &lino, _exit); + TAOS_CHECK_GOTO(tDecompressData(BR_PTR(br), &cinfo, blockData->aVersion, cinfo.originalSize, assist), &lino, _exit); br->offset += cinfo.compressedSize; // ts @@ -1787,10 +1302,8 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, .compressedSize = hdr->szKey, .originalSize = sizeof(TSKEY) * hdr->nRow, }; - code = tRealloc((uint8_t **)&blockData->aTSKEY, cinfo.originalSize); - TSDB_CHECK_CODE(code, lino, _exit); - code = tDecompressData(BR_PTR(br), &cinfo, blockData->aTSKEY, cinfo.originalSize, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tRealloc((uint8_t **)&blockData->aTSKEY, cinfo.originalSize), &lino, _exit); + TAOS_CHECK_GOTO(tDecompressData(BR_PTR(br), &cinfo, blockData->aTSKEY, cinfo.originalSize, assist), &lino, _exit); br->offset += cinfo.compressedSize; // primary keys @@ -1800,8 +1313,7 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, ASSERT(blockCol->flag == HAS_VALUE); ASSERT(blockCol->cflag & COL_IS_KEY); - code = tBlockDataDecompressColData(hdr, blockCol, br, blockData, assist); - TSDB_CHECK_CODE(code, lino, _exit); + TAOS_CHECK_GOTO(tBlockDataDecompressColData(hdr, blockCol, br, blockData, assist), &lino, _exit); } _exit: @@ -1809,14 +1321,19 @@ _exit: } int32_t tsdbGetColCmprAlgFromSet(SHashObj *set, int16_t colId, uint32_t *alg) { - if (set == NULL) return -1; + if (set == NULL) { + return TSDB_CODE_INVALID_PARA; + } uint32_t *ret = taosHashGet(set, &colId, sizeof(colId)); - if (ret == NULL) return -1; + if (ret == NULL) { + return TSDB_CODE_NOT_FOUND; + } *alg = *ret; return 0; } + uint32_t tsdbCvtTimestampAlg(uint32_t alg) { DEFINE_VAR(alg) diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil2.c b/source/dnode/vnode/src/tsdb/tsdbUtil2.c index 9b88500ad1..97fea598cd 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil2.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil2.c @@ -17,17 +17,24 @@ // SDelBlock ---------- int32_t tTombBlockInit(STombBlock *tombBlock) { + int32_t code; + tombBlock->numOfRecords = 0; for (int32_t i = 0; i < TOMB_RECORD_ELEM_NUM; ++i) { - tBufferInit(&tombBlock->buffers[i]); + TAOS_CHECK_GOTO(tBufferInit(&tombBlock->buffers[i]), NULL, _exit); } - return 0; + +_exit: + if (code) { + TAOS_UNUSED(tTombBlockDestroy(tombBlock)); + } + return code; } int32_t tTombBlockDestroy(STombBlock *tombBlock) { tombBlock->numOfRecords = 0; for (int32_t i = 0; i < TOMB_RECORD_ELEM_NUM; ++i) { - tBufferDestroy(&tombBlock->buffers[i]); + TAOS_UNUSED(tBufferDestroy(&tombBlock->buffers[i])); } return 0; } @@ -35,15 +42,14 @@ int32_t tTombBlockDestroy(STombBlock *tombBlock) { int32_t tTombBlockClear(STombBlock *tombBlock) { tombBlock->numOfRecords = 0; for (int32_t i = 0; i < TOMB_RECORD_ELEM_NUM; ++i) { - tBufferClear(&tombBlock->buffers[i]); + TAOS_UNUSED(tBufferClear(&tombBlock->buffers[i])); } return 0; } int32_t tTombBlockPut(STombBlock *tombBlock, const STombRecord *record) { for (int32_t i = 0; i < TOMB_RECORD_ELEM_NUM; ++i) { - int32_t code = tBufferPutI64(&tombBlock->buffers[i], record->data[i]); - if (code) return code; + TAOS_CHECK_RETURN(tBufferPutI64(&tombBlock->buffers[i], record->data[i])); } tombBlock->numOfRecords++; return 0; @@ -56,8 +62,7 @@ int32_t tTombBlockGet(STombBlock *tombBlock, int32_t idx, STombRecord *record) { for (int32_t i = 0; i < TOMB_RECORD_ELEM_NUM; ++i) { SBufferReader br = BUFFER_READER_INITIALIZER(sizeof(int64_t) * idx, &tombBlock->buffers[i]); - int32_t code = tBufferGetI64(&br, &record->data[i]); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&br, &record->data[i])); } return 0; } @@ -74,27 +79,34 @@ int32_t tTombRecordCompare(const STombRecord *r1, const STombRecord *r2) { // STbStatisBlock ---------- int32_t tStatisBlockInit(STbStatisBlock *statisBlock) { + int32_t code; + statisBlock->numOfPKs = 0; statisBlock->numOfRecords = 0; for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) { - tBufferInit(&statisBlock->buffers[i]); + TAOS_CHECK_GOTO(tBufferInit(&statisBlock->buffers[i]), NULL, _exit); } for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) { - tValueColumnInit(&statisBlock->firstKeyPKs[i]); - tValueColumnInit(&statisBlock->lastKeyPKs[i]); + TAOS_CHECK_GOTO(tValueColumnInit(&statisBlock->firstKeyPKs[i]), NULL, _exit); + TAOS_CHECK_GOTO(tValueColumnInit(&statisBlock->lastKeyPKs[i]), NULL, _exit); } - return 0; + +_exit: + if (code) { + TAOS_UNUSED(tStatisBlockDestroy(statisBlock)); + } + return code; } int32_t tStatisBlockDestroy(STbStatisBlock *statisBlock) { statisBlock->numOfPKs = 0; statisBlock->numOfRecords = 0; for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) { - tBufferDestroy(&statisBlock->buffers[i]); + TAOS_UNUSED(tBufferDestroy(&statisBlock->buffers[i])); } for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) { - tValueColumnDestroy(&statisBlock->firstKeyPKs[i]); - tValueColumnDestroy(&statisBlock->lastKeyPKs[i]); + TAOS_UNUSED(tValueColumnDestroy(&statisBlock->firstKeyPKs[i])); + TAOS_UNUSED(tValueColumnDestroy(&statisBlock->lastKeyPKs[i])); } return 0; } @@ -103,17 +115,16 @@ int32_t tStatisBlockClear(STbStatisBlock *statisBlock) { statisBlock->numOfPKs = 0; statisBlock->numOfRecords = 0; for (int32_t i = 0; i < ARRAY_SIZE(statisBlock->buffers); ++i) { - tBufferClear(&statisBlock->buffers[i]); + TAOS_UNUSED(tBufferClear(&statisBlock->buffers[i])); } for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) { - tValueColumnClear(&statisBlock->firstKeyPKs[i]); - tValueColumnClear(&statisBlock->lastKeyPKs[i]); + TAOS_UNUSED(tValueColumnClear(&statisBlock->firstKeyPKs[i])); + TAOS_UNUSED(tValueColumnClear(&statisBlock->lastKeyPKs[i])); } return 0; } static int32_t tStatisBlockAppend(STbStatisBlock *block, SRowInfo *row) { - int32_t code; STsdbRowKey key; tsdbRowGetKey(&row->row, &key); @@ -129,14 +140,14 @@ static int32_t tStatisBlockAppend(STbStatisBlock *block, SRowInfo *row) { } } - if ((code = tBufferPutI64(&block->suids, row->suid))) return code; - if ((code = tBufferPutI64(&block->uids, row->uid))) return code; - if ((code = tBufferPutI64(&block->firstKeyTimestamps, key.key.ts))) return code; - if ((code = tBufferPutI64(&block->lastKeyTimestamps, key.key.ts))) return code; - if ((code = tBufferPutI64(&block->counts, 1))) return code; + TAOS_CHECK_RETURN(tBufferPutI64(&block->suids, row->suid)); + TAOS_CHECK_RETURN(tBufferPutI64(&block->uids, row->uid)); + TAOS_CHECK_RETURN(tBufferPutI64(&block->firstKeyTimestamps, key.key.ts)); + TAOS_CHECK_RETURN(tBufferPutI64(&block->lastKeyTimestamps, key.key.ts)); + TAOS_CHECK_RETURN(tBufferPutI64(&block->counts, 1)); for (int32_t i = 0; i < block->numOfPKs; ++i) { - if ((code = tValueColumnAppend(block->firstKeyPKs + i, key.key.pks + i))) return code; - if ((code = tValueColumnAppend(block->lastKeyPKs + i, key.key.pks + i))) return code; + TAOS_CHECK_RETURN(tValueColumnAppend(block->firstKeyPKs + i, key.key.pks + i)); + TAOS_CHECK_RETURN(tValueColumnAppend(block->lastKeyPKs + i, key.key.pks + i)); } block->numOfRecords++; @@ -147,9 +158,8 @@ static int32_t tStatisBlockUpdate(STbStatisBlock *block, SRowInfo *row) { STbStatisRecord record; STsdbRowKey key; int32_t c; - int32_t code; - tStatisBlockGet(block, block->numOfRecords - 1, &record); + TAOS_CHECK_RETURN(tStatisBlockGet(block, block->numOfRecords - 1, &record)); tsdbRowGetKey(&row->row, &key); c = tRowKeyCompare(&record.lastKey, &key.key); @@ -157,21 +167,18 @@ static int32_t tStatisBlockUpdate(STbStatisBlock *block, SRowInfo *row) { return 0; } else if (c < 0) { // last ts - code = tBufferPutAt(&block->lastKeyTimestamps, (block->numOfRecords - 1) * sizeof(record.lastKey.ts), &key.key.ts, - sizeof(key.key.ts)); - if (code) return code; + TAOS_CHECK_RETURN(tBufferPutAt(&block->lastKeyTimestamps, (block->numOfRecords - 1) * sizeof(record.lastKey.ts), + &key.key.ts, sizeof(key.key.ts))); // last primary keys for (int i = 0; i < block->numOfPKs; i++) { - code = tValueColumnUpdate(&block->lastKeyPKs[i], block->numOfRecords - 1, &key.key.pks[i]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnUpdate(&block->lastKeyPKs[i], block->numOfRecords - 1, &key.key.pks[i])); } // count record.count++; - code = tBufferPutAt(&block->counts, (block->numOfRecords - 1) * sizeof(record.count), &record.count, - sizeof(record.count)); - if (code) return code; + TAOS_CHECK_RETURN(tBufferPutAt(&block->counts, (block->numOfRecords - 1) * sizeof(record.count), &record.count, + sizeof(record.count))); } else { ASSERT(0); } @@ -183,8 +190,7 @@ int32_t tStatisBlockPut(STbStatisBlock *block, SRowInfo *row, int32_t maxRecords if (block->numOfRecords > 0) { int64_t lastUid; SBufferReader br = BUFFER_READER_INITIALIZER(sizeof(int64_t) * (block->numOfRecords - 1), &block->uids); - int32_t code = tBufferGetI64(&br, &lastUid); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&br, &lastUid)); if (lastUid == row->uid) { return tStatisBlockUpdate(block, row); @@ -196,7 +202,6 @@ int32_t tStatisBlockPut(STbStatisBlock *block, SRowInfo *row, int32_t maxRecords } int32_t tStatisBlockGet(STbStatisBlock *statisBlock, int32_t idx, STbStatisRecord *record) { - int32_t code; SBufferReader reader; if (idx < 0 || idx >= statisBlock->numOfRecords) { @@ -204,36 +209,29 @@ int32_t tStatisBlockGet(STbStatisBlock *statisBlock, int32_t idx, STbStatisRecor } reader = BUFFER_READER_INITIALIZER(idx * sizeof(record->suid), &statisBlock->suids); - code = tBufferGetI64(&reader, &record->suid); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->suid)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(record->uid), &statisBlock->uids); - code = tBufferGetI64(&reader, &record->uid); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->uid)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(record->firstKey.ts), &statisBlock->firstKeyTimestamps); - code = tBufferGetI64(&reader, &record->firstKey.ts); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->firstKey.ts)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(record->lastKey.ts), &statisBlock->lastKeyTimestamps); - code = tBufferGetI64(&reader, &record->lastKey.ts); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->lastKey.ts)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(record->count), &statisBlock->counts); - code = tBufferGetI64(&reader, &record->count); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->count)); // primary keys for (record->firstKey.numOfPKs = 0; record->firstKey.numOfPKs < statisBlock->numOfPKs; record->firstKey.numOfPKs++) { - code = tValueColumnGet(&statisBlock->firstKeyPKs[record->firstKey.numOfPKs], idx, - &record->firstKey.pks[record->firstKey.numOfPKs]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnGet(&statisBlock->firstKeyPKs[record->firstKey.numOfPKs], idx, + &record->firstKey.pks[record->firstKey.numOfPKs])); } for (record->lastKey.numOfPKs = 0; record->lastKey.numOfPKs < statisBlock->numOfPKs; record->lastKey.numOfPKs++) { - code = tValueColumnGet(&statisBlock->lastKeyPKs[record->lastKey.numOfPKs], idx, - &record->lastKey.pks[record->lastKey.numOfPKs]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnGet(&statisBlock->lastKeyPKs[record->lastKey.numOfPKs], idx, + &record->lastKey.pks[record->lastKey.numOfPKs])); } return 0; @@ -241,27 +239,34 @@ int32_t tStatisBlockGet(STbStatisBlock *statisBlock, int32_t idx, STbStatisRecor // SBrinRecord ---------- int32_t tBrinBlockInit(SBrinBlock *brinBlock) { + int32_t code; + brinBlock->numOfPKs = 0; brinBlock->numOfRecords = 0; for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) { - tBufferInit(&brinBlock->buffers[i]); + TAOS_CHECK_GOTO(tBufferInit(&brinBlock->buffers[i]), NULL, _exit); } for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) { - tValueColumnInit(&brinBlock->firstKeyPKs[i]); - tValueColumnInit(&brinBlock->lastKeyPKs[i]); + TAOS_CHECK_GOTO(tValueColumnInit(&brinBlock->firstKeyPKs[i]), NULL, _exit); + TAOS_CHECK_GOTO(tValueColumnInit(&brinBlock->lastKeyPKs[i]), NULL, _exit); } - return 0; + +_exit: + if (code) { + TAOS_UNUSED(tBrinBlockDestroy(brinBlock)); + } + return code; } int32_t tBrinBlockDestroy(SBrinBlock *brinBlock) { brinBlock->numOfPKs = 0; brinBlock->numOfRecords = 0; for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) { - tBufferDestroy(&brinBlock->buffers[i]); + TAOS_UNUSED(tBufferDestroy(&brinBlock->buffers[i])); } for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) { - tValueColumnDestroy(&brinBlock->firstKeyPKs[i]); - tValueColumnDestroy(&brinBlock->lastKeyPKs[i]); + TAOS_UNUSED(tValueColumnDestroy(&brinBlock->firstKeyPKs[i])); + TAOS_UNUSED(tValueColumnDestroy(&brinBlock->lastKeyPKs[i])); } return 0; } @@ -270,18 +275,16 @@ int32_t tBrinBlockClear(SBrinBlock *brinBlock) { brinBlock->numOfPKs = 0; brinBlock->numOfRecords = 0; for (int32_t i = 0; i < ARRAY_SIZE(brinBlock->buffers); ++i) { - tBufferClear(&brinBlock->buffers[i]); + TAOS_UNUSED(tBufferClear(&brinBlock->buffers[i])); } for (int32_t i = 0; i < TD_MAX_PK_COLS; ++i) { - tValueColumnClear(&brinBlock->firstKeyPKs[i]); - tValueColumnClear(&brinBlock->lastKeyPKs[i]); + TAOS_UNUSED(tValueColumnClear(&brinBlock->firstKeyPKs[i])); + TAOS_UNUSED(tValueColumnClear(&brinBlock->lastKeyPKs[i])); } return 0; } int32_t tBrinBlockPut(SBrinBlock *brinBlock, const SBrinRecord *record) { - int32_t code; - ASSERT(record->firstKey.key.numOfPKs == record->lastKey.key.numOfPKs); if (brinBlock->numOfRecords == 0) { // the first row @@ -298,60 +301,29 @@ int32_t tBrinBlockPut(SBrinBlock *brinBlock, const SBrinRecord *record) { } } - code = tBufferPutI64(&brinBlock->suids, record->suid); - if (code) return code; - - code = tBufferPutI64(&brinBlock->uids, record->uid); - if (code) return code; - - code = tBufferPutI64(&brinBlock->firstKeyTimestamps, record->firstKey.key.ts); - if (code) return code; - - code = tBufferPutI64(&brinBlock->firstKeyVersions, record->firstKey.version); - if (code) return code; - - code = tBufferPutI64(&brinBlock->lastKeyTimestamps, record->lastKey.key.ts); - if (code) return code; - - code = tBufferPutI64(&brinBlock->lastKeyVersions, record->lastKey.version); - if (code) return code; - - code = tBufferPutI64(&brinBlock->minVers, record->minVer); - if (code) return code; - - code = tBufferPutI64(&brinBlock->maxVers, record->maxVer); - if (code) return code; - - code = tBufferPutI64(&brinBlock->blockOffsets, record->blockOffset); - if (code) return code; - - code = tBufferPutI64(&brinBlock->smaOffsets, record->smaOffset); - if (code) return code; - - code = tBufferPutI32(&brinBlock->blockSizes, record->blockSize); - if (code) return code; - - code = tBufferPutI32(&brinBlock->blockKeySizes, record->blockKeySize); - if (code) return code; - - code = tBufferPutI32(&brinBlock->smaSizes, record->smaSize); - if (code) return code; - - code = tBufferPutI32(&brinBlock->numRows, record->numRow); - if (code) return code; - - code = tBufferPutI32(&brinBlock->counts, record->count); - if (code) return code; + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->suids, record->suid)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->uids, record->uid)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->firstKeyTimestamps, record->firstKey.key.ts)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->firstKeyVersions, record->firstKey.version)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->lastKeyTimestamps, record->lastKey.key.ts)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->lastKeyVersions, record->lastKey.version)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->minVers, record->minVer)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->maxVers, record->maxVer)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->blockOffsets, record->blockOffset)); + TAOS_CHECK_RETURN(tBufferPutI64(&brinBlock->smaOffsets, record->smaOffset)); + TAOS_CHECK_RETURN(tBufferPutI32(&brinBlock->blockSizes, record->blockSize)); + TAOS_CHECK_RETURN(tBufferPutI32(&brinBlock->blockKeySizes, record->blockKeySize)); + TAOS_CHECK_RETURN(tBufferPutI32(&brinBlock->smaSizes, record->smaSize)); + TAOS_CHECK_RETURN(tBufferPutI32(&brinBlock->numRows, record->numRow)); + TAOS_CHECK_RETURN(tBufferPutI32(&brinBlock->counts, record->count)); if (brinBlock->numOfPKs > 0) { for (int32_t i = 0; i < brinBlock->numOfPKs; ++i) { - code = tValueColumnAppend(&brinBlock->firstKeyPKs[i], &record->firstKey.key.pks[i]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnAppend(&brinBlock->firstKeyPKs[i], &record->firstKey.key.pks[i])); } for (int32_t i = 0; i < brinBlock->numOfPKs; ++i) { - code = tValueColumnAppend(&brinBlock->lastKeyPKs[i], &record->lastKey.key.pks[i]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnAppend(&brinBlock->lastKeyPKs[i], &record->lastKey.key.pks[i])); } } @@ -361,7 +333,6 @@ int32_t tBrinBlockPut(SBrinBlock *brinBlock, const SBrinRecord *record) { } int32_t tBrinBlockGet(SBrinBlock *brinBlock, int32_t idx, SBrinRecord *record) { - int32_t code; SBufferReader reader; if (idx < 0 || idx >= brinBlock->numOfRecords) { @@ -369,78 +340,61 @@ int32_t tBrinBlockGet(SBrinBlock *brinBlock, int32_t idx, SBrinRecord *record) { } reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->suids); - code = tBufferGetI64(&reader, &record->suid); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->suid)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->uids); - code = tBufferGetI64(&reader, &record->uid); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->uid)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->firstKeyTimestamps); - code = tBufferGetI64(&reader, &record->firstKey.key.ts); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->firstKey.key.ts)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->firstKeyVersions); - code = tBufferGetI64(&reader, &record->firstKey.version); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->firstKey.version)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->lastKeyTimestamps); - code = tBufferGetI64(&reader, &record->lastKey.key.ts); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->lastKey.key.ts)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->lastKeyVersions); - code = tBufferGetI64(&reader, &record->lastKey.version); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->lastKey.version)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->minVers); - code = tBufferGetI64(&reader, &record->minVer); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->minVer)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->maxVers); - code = tBufferGetI64(&reader, &record->maxVer); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->maxVer)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->blockOffsets); - code = tBufferGetI64(&reader, &record->blockOffset); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->blockOffset)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int64_t), &brinBlock->smaOffsets); - code = tBufferGetI64(&reader, &record->smaOffset); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI64(&reader, &record->smaOffset)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int32_t), &brinBlock->blockSizes); - code = tBufferGetI32(&reader, &record->blockSize); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI32(&reader, &record->blockSize)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int32_t), &brinBlock->blockKeySizes); - code = tBufferGetI32(&reader, &record->blockKeySize); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI32(&reader, &record->blockKeySize)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int32_t), &brinBlock->smaSizes); - code = tBufferGetI32(&reader, &record->smaSize); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI32(&reader, &record->smaSize)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int32_t), &brinBlock->numRows); - code = tBufferGetI32(&reader, &record->numRow); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI32(&reader, &record->numRow)); reader = BUFFER_READER_INITIALIZER(idx * sizeof(int32_t), &brinBlock->counts); - code = tBufferGetI32(&reader, &record->count); - if (code) return code; + TAOS_CHECK_RETURN(tBufferGetI32(&reader, &record->count)); // primary keys for (record->firstKey.key.numOfPKs = 0; record->firstKey.key.numOfPKs < brinBlock->numOfPKs; record->firstKey.key.numOfPKs++) { - code = tValueColumnGet(&brinBlock->firstKeyPKs[record->firstKey.key.numOfPKs], idx, - &record->firstKey.key.pks[record->firstKey.key.numOfPKs]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnGet(&brinBlock->firstKeyPKs[record->firstKey.key.numOfPKs], idx, + &record->firstKey.key.pks[record->firstKey.key.numOfPKs])); } for (record->lastKey.key.numOfPKs = 0; record->lastKey.key.numOfPKs < brinBlock->numOfPKs; record->lastKey.key.numOfPKs++) { - code = tValueColumnGet(&brinBlock->lastKeyPKs[record->lastKey.key.numOfPKs], idx, - &record->lastKey.key.pks[record->lastKey.key.numOfPKs]); - if (code) return code; + TAOS_CHECK_RETURN(tValueColumnGet(&brinBlock->lastKeyPKs[record->lastKey.key.numOfPKs], idx, + &record->lastKey.key.pks[record->lastKey.key.numOfPKs])); } return 0; From 30186f466b30b2cba3713d4d34d821372eba0989 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 16:47:56 +0800 Subject: [PATCH 18/45] refactor: check return value for each function. --- include/libs/stream/tstream.h | 4 +- source/dnode/snode/src/snode.c | 2 +- source/dnode/vnode/src/tq/tq.c | 12 +++--- source/dnode/vnode/src/tq/tqStreamTask.c | 14 +++---- source/dnode/vnode/src/tqCommon/tqCommon.c | 28 ++++++------- source/libs/stream/src/streamCheckStatus.c | 26 ++++++------ source/libs/stream/src/streamCheckpoint.c | 36 ++++++++-------- source/libs/stream/src/streamDispatch.c | 8 ++-- source/libs/stream/src/streamExec.c | 42 +++++++++---------- source/libs/stream/src/streamMeta.c | 6 +-- source/libs/stream/src/streamSched.c | 8 ++-- source/libs/stream/src/streamStartHistory.c | 46 ++++++++++----------- source/libs/stream/src/streamTask.c | 14 +++---- source/libs/stream/src/streamTaskSm.c | 8 ++-- 14 files changed, 128 insertions(+), 126 deletions(-) diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 8f6b512741..609b977536 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -628,7 +628,9 @@ int32_t streamProcessDispatchMsg(SStreamTask* pTask, SStreamDispatchReq* pReq, S int32_t streamProcessDispatchRsp(SStreamTask* pTask, SStreamDispatchRsp* pRsp, int32_t code); int32_t streamTaskGetUpstreamTaskEpInfo(SStreamTask* pTask, int32_t taskId, SStreamUpstreamEpInfo** pEpInfo); +#if 0 SEpSet* streamTaskGetDownstreamEpInfo(SStreamTask* pTask, int32_t taskId); +#endif void streamTaskInputFail(SStreamTask* pTask); @@ -638,7 +640,7 @@ bool streamTaskIsIdle(const SStreamTask* pTask); bool streamTaskReadyToRun(const SStreamTask* pTask, char** pStatus); char* createStreamTaskIdStr(int64_t streamId, int32_t taskId); -SStreamTaskState* streamTaskGetStatus(const SStreamTask* pTask); +SStreamTaskState streamTaskGetStatus(const SStreamTask* pTask); const char* streamTaskGetStatusStr(ETaskStatus status); void streamTaskResetStatus(SStreamTask* pTask); void streamTaskSetStatusReady(SStreamTask* pTask); diff --git a/source/dnode/snode/src/snode.c b/source/dnode/snode/src/snode.c index db2ead2f37..da60d7d30e 100644 --- a/source/dnode/snode/src/snode.c +++ b/source/dnode/snode/src/snode.c @@ -41,7 +41,7 @@ int32_t sndBuildStreamTask(SSnode *pSnode, SStreamTask *pTask, int64_t nextProce SCheckpointInfo *pChkInfo = &pTask->chkInfo; tqSetRestoreVersionInfo(pTask); - char *p = streamTaskGetStatus(pTask)->name; + char *p = streamTaskGetStatus(pTask).name; if (pTask->info.fillHistory) { sndInfo("vgId:%d build stream task, s-task:%s, checkpointId:%" PRId64 " checkpointVer:%" PRId64 " nextProcessVer:%" PRId64 diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 1c3866080b..99d57bd5bd 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -768,7 +768,7 @@ int32_t tqBuildStreamTask(void* pTqObj, SStreamTask* pTask, int64_t nextProcessV SCheckpointInfo* pChkInfo = &pTask->chkInfo; tqSetRestoreVersionInfo(pTask); - char* p = streamTaskGetStatus(pTask)->name; + char* p = streamTaskGetStatus(pTask).name; const char* pNext = streamTaskGetStatusStr(pTask->status.taskStatus); if (pTask->info.fillHistory) { @@ -886,7 +886,7 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { // do recovery step1 const char* id = pTask->id.idStr; - char* pStatus = streamTaskGetStatus(pTask)->name; + char* pStatus = streamTaskGetStatus(pTask).name; // avoid multi-thread exec while (1) { @@ -942,15 +942,15 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { if (retInfo.ret == TASK_SCANHISTORY_REXEC) { streamExecScanHistoryInFuture(pTask, retInfo.idleTime); } else { - SStreamTaskState* p = streamTaskGetStatus(pTask); - ETaskStatus s = p->state; + SStreamTaskState p = streamTaskGetStatus(pTask); + ETaskStatus s = p.state; if (s == TASK_STATUS__PAUSE) { tqDebug("s-task:%s is paused in the step1, elapsed time:%.2fs total:%.2fs, sched-status:%d", pTask->id.idStr, el, pTask->execInfo.step1El, status); } else if (s == TASK_STATUS__STOP || s == TASK_STATUS__DROPPING) { tqDebug("s-task:%s status:%p not continue scan-history data, total elapsed time:%.2fs quit", pTask->id.idStr, - p->name, pTask->execInfo.step1El); + p.name, pTask->execInfo.step1El); } } @@ -1152,7 +1152,7 @@ int32_t tqProcessTaskCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg, SRpcMsg* pRsp) // todo save the checkpoint failed info taosThreadMutexLock(&pTask->lock); - ETaskStatus status = streamTaskGetStatus(pTask)->state; + ETaskStatus status = streamTaskGetStatus(pTask).state; if (req.mndTrigger == 1) { if (status == TASK_STATUS__HALT || status == TASK_STATUS__PAUSE) { diff --git a/source/dnode/vnode/src/tq/tqStreamTask.c b/source/dnode/vnode/src/tq/tqStreamTask.c index 22658cc650..b4829d1dd8 100644 --- a/source/dnode/vnode/src/tq/tqStreamTask.c +++ b/source/dnode/vnode/src/tq/tqStreamTask.c @@ -226,15 +226,15 @@ bool taskReadyForDataFromWal(SStreamTask* pTask) { } // not in ready state, do not handle the data from wal - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state != TASK_STATUS__READY) { - tqTrace("s-task:%s not ready for submit block in wal, status:%s", pTask->id.idStr, pState->name); + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state != TASK_STATUS__READY) { + tqTrace("s-task:%s not ready for submit block in wal, status:%s", pTask->id.idStr, pState.name); return false; } // fill-history task has entered into the last phase, no need to anything if ((pTask->info.fillHistory == 1) && pTask->status.appendTranstateBlock) { - ASSERT(pState->state == TASK_STATUS__READY); + ASSERT(pState.state == TASK_STATUS__READY); // the maximum version of data in the WAL has reached already, the step2 is done tqDebug("s-task:%s fill-history reach the maximum ver:%" PRId64 ", not scan wal anymore", pTask->id.idStr, pTask->dataRange.range.maxVer); @@ -349,9 +349,9 @@ int32_t doScanWalForAllTasks(SStreamMeta* pStreamMeta, bool* pScanIdle) { taosThreadMutexLock(&pTask->lock); - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state != TASK_STATUS__READY) { - tqDebug("s-task:%s not ready for submit block from wal, status:%s", pTask->id.idStr, pState->name); + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state != TASK_STATUS__READY) { + tqDebug("s-task:%s not ready for submit block from wal, status:%s", pTask->id.idStr, pState.name); taosThreadMutexUnlock(&pTask->lock); streamMetaReleaseTask(pStreamMeta, pTask); continue; diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c index 95ee1b70f8..3c6100a8f4 100644 --- a/source/dnode/vnode/src/tqCommon/tqCommon.c +++ b/source/dnode/vnode/src/tqCommon/tqCommon.c @@ -885,8 +885,8 @@ int32_t tqStreamTaskProcessTaskResetReq(SStreamMeta* pMeta, char* pMsg) { streamTaskClearCheckInfo(pTask, true); // clear flag set during do checkpoint, and open inputQ for all upstream tasks - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state == TASK_STATUS__CK) { + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state == TASK_STATUS__CK) { int32_t tranId = 0; int64_t activeChkId = 0; streamTaskGetActiveCheckpointInfo(pTask, &tranId, &activeChkId); @@ -895,13 +895,13 @@ int32_t tqStreamTaskProcessTaskResetReq(SStreamMeta* pMeta, char* pMsg) { pTask->id.idStr, activeChkId, tranId); streamTaskSetStatusReady(pTask); - } else if (pState->state == TASK_STATUS__UNINIT) { + } else if (pState.state == TASK_STATUS__UNINIT) { // tqDebug("s-task:%s start task by checking downstream tasks", pTask->id.idStr); // ASSERT(pTask->status.downstreamReady == 0); // tqStreamTaskRestoreCheckpoint(pMeta, pTask->id.streamId, pTask->id.taskId); - tqDebug("s-task:%s status:%s do nothing after receiving reset-task from mnode", pTask->id.idStr, pState->name); + tqDebug("s-task:%s status:%s do nothing after receiving reset-task from mnode", pTask->id.idStr, pState.name); } else { - tqDebug("s-task:%s status:%s do nothing after receiving reset-task from mnode", pTask->id.idStr, pState->name); + tqDebug("s-task:%s status:%s do nothing after receiving reset-task from mnode", pTask->id.idStr, pState.name); } taosThreadMutexUnlock(&pTask->lock); @@ -936,8 +936,8 @@ int32_t tqStreamTaskProcessRetrieveTriggerReq(SStreamMeta* pMeta, SRpcMsg* pMsg) return TSDB_CODE_SUCCESS; } - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state == TASK_STATUS__CK) { // recv the checkpoint-source/trigger already + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state == TASK_STATUS__CK) { // recv the checkpoint-source/trigger already int32_t transId = 0; int64_t checkpointId = 0; @@ -966,7 +966,7 @@ int32_t tqStreamTaskProcessRetrieveTriggerReq(SStreamMeta* pMeta, SRpcMsg* pMsg) TSDB_CODE_ACTION_IN_PROGRESS); } } else { // upstream not recv the checkpoint-source/trigger till now - ASSERT(pState->state == TASK_STATUS__READY || pState->state == TASK_STATUS__HALT); + ASSERT(pState.state == TASK_STATUS__READY || pState.state == TASK_STATUS__HALT); tqWarn( "s-task:%s not recv checkpoint-source from mnode or checkpoint-trigger from upstream yet, wait for all " "upstream sending checkpoint-source/trigger", @@ -1017,7 +1017,7 @@ int32_t tqStreamTaskProcessTaskPauseReq(SStreamMeta* pMeta, char* pMsg) { SStreamTask* pHistoryTask = NULL; if (HAS_RELATED_FILLHISTORY_TASK(pTask)) { pHistoryTask = NULL; - int32_t code = streamMetaAcquireTask(pMeta, pTask->hTaskInfo.id.streamId, pTask->hTaskInfo.id.taskId, &pHistoryTask); + code = streamMetaAcquireTask(pMeta, pTask->hTaskInfo.id.streamId, pTask->hTaskInfo.id.taskId, &pHistoryTask); if (pHistoryTask == NULL) { tqError("vgId:%d process pause req, failed to acquire fill-history task:0x%" PRIx64 ", it may have been dropped already", @@ -1047,7 +1047,7 @@ static int32_t tqProcessTaskResumeImpl(void* handle, SStreamTask* pTask, int64_t } streamTaskResume(pTask); - ETaskStatus status = streamTaskGetStatus(pTask)->state; + ETaskStatus status = streamTaskGetStatus(pTask).state; int32_t level = pTask->info.taskLevel; if (status == TASK_STATUS__READY || status == TASK_STATUS__SCAN_HISTORY || status == TASK_STATUS__CK) { @@ -1092,8 +1092,8 @@ int32_t tqStreamTaskProcessTaskResumeReq(void* handle, int64_t sversion, char* m } taosThreadMutexLock(&pTask->lock); - SStreamTaskState* pState = streamTaskGetStatus(pTask); - tqDebug("s-task:%s start to resume from paused, current status:%s", pTask->id.idStr, pState->name); + SStreamTaskState pState = streamTaskGetStatus(pTask); + tqDebug("s-task:%s start to resume from paused, current status:%s", pTask->id.idStr, pState.name); taosThreadMutexUnlock(&pTask->lock); code = tqProcessTaskResumeImpl(handle, pTask, sversion, pReq->igUntreated, fromVnode); @@ -1106,8 +1106,8 @@ int32_t tqStreamTaskProcessTaskResumeReq(void* handle, int64_t sversion, char* m code = streamMetaAcquireTask(pMeta, pHTaskId->streamId, pHTaskId->taskId, &pHTask); if (pHTask) { taosThreadMutexLock(&pHTask->lock); - SStreamTaskState* p = streamTaskGetStatus(pHTask); - tqDebug("s-task:%s related history task start to resume from paused, current status:%s", pHTask->id.idStr, p->name); + SStreamTaskState p = streamTaskGetStatus(pHTask); + tqDebug("s-task:%s related history task start to resume from paused, current status:%s", pHTask->id.idStr, p.name); taosThreadMutexUnlock(&pHTask->lock); code = tqProcessTaskResumeImpl(handle, pHTask, sversion, pReq->igUntreated, fromVnode); diff --git a/source/libs/stream/src/streamCheckStatus.c b/source/libs/stream/src/streamCheckStatus.c index c73b245940..e588be0784 100644 --- a/source/libs/stream/src/streamCheckStatus.c +++ b/source/libs/stream/src/streamCheckStatus.c @@ -66,7 +66,7 @@ int32_t streamTaskCheckStatus(SStreamTask* pTask, int32_t upstreamTaskId, int32_ id, upstreamTaskId, vgId, stage, pInfo->stage); // record the checkpoint failure id and sent to mnode taosThreadMutexLock(&pTask->lock); - ETaskStatus status = streamTaskGetStatus(pTask)->state; + ETaskStatus status = streamTaskGetStatus(pTask).state; if (status == TASK_STATUS__CK) { streamTaskSetFailedCheckpointId(pTask); } @@ -75,7 +75,7 @@ int32_t streamTaskCheckStatus(SStreamTask* pTask, int32_t upstreamTaskId, int32_ if (pInfo->stage != stage) { taosThreadMutexLock(&pTask->lock); - ETaskStatus status = streamTaskGetStatus(pTask)->state; + ETaskStatus status = streamTaskGetStatus(pTask).state; if (status == TASK_STATUS__CK) { streamTaskSetFailedCheckpointId(pTask); } @@ -175,10 +175,10 @@ void streamTaskProcessCheckMsg(SStreamMeta* pMeta, SStreamTaskCheckReq* pReq, SS pRsp->status = streamTaskCheckStatus(pTask, pReq->upstreamTaskId, pReq->upstreamNodeId, pReq->stage, &pRsp->oldStage); - SStreamTaskState* pState = streamTaskGetStatus(pTask); + SStreamTaskState pState = streamTaskGetStatus(pTask); stDebug("s-task:%s status:%s, stage:%" PRId64 " recv task check req(reqId:0x%" PRIx64 ") task:0x%x (vgId:%d), check_status:%d", - pTask->id.idStr, pState->name, pRsp->oldStage, pRsp->reqId, pRsp->upstreamTaskId, pRsp->upstreamNodeId, + pTask->id.idStr, pState.name, pRsp->oldStage, pRsp->reqId, pRsp->upstreamTaskId, pRsp->upstreamNodeId, pRsp->status); streamMetaReleaseTask(pMeta, pTask); } else { @@ -651,12 +651,12 @@ int32_t addDownstreamFailedStatusResultAsync(SMsgCb* pMsgCb, int32_t vgId, int64 void rspMonitorFn(void* param, void* tmrId) { SStreamTask* pTask = param; SStreamMeta* pMeta = pTask->pMeta; - SStreamTaskState* pStat = streamTaskGetStatus(pTask); + SStreamTaskState pStat = streamTaskGetStatus(pTask); STaskCheckInfo* pInfo = &pTask->taskCheckInfo; int32_t vgId = pTask->pMeta->vgId; int64_t now = taosGetTimestampMs(); int64_t timeoutDuration = now - pInfo->timeoutStartTs; - ETaskStatus state = pStat->state; + ETaskStatus state = pStat.state; const char* id = pTask->id.idStr; int32_t numOfReady = 0; int32_t numOfFault = 0; @@ -669,7 +669,7 @@ void rspMonitorFn(void* param, void* tmrId) { if (state == TASK_STATUS__STOP) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); - stDebug("s-task:%s status:%s vgId:%d quit from monitor check-rsp tmr, ref:%d", id, pStat->name, vgId, ref); + stDebug("s-task:%s status:%s vgId:%d quit from monitor check-rsp tmr, ref:%d", id, pStat.name, vgId, ref); streamTaskCompleteCheckRsp(pInfo, true, id); @@ -685,7 +685,7 @@ void rspMonitorFn(void* param, void* tmrId) { if (state == TASK_STATUS__DROPPING || state == TASK_STATUS__READY) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); - stDebug("s-task:%s status:%s vgId:%d quit from monitor check-rsp tmr, ref:%d", id, pStat->name, vgId, ref); + stDebug("s-task:%s status:%s vgId:%d quit from monitor check-rsp tmr, ref:%d", id, pStat.name, vgId, ref); streamTaskCompleteCheckRsp(pInfo, true, id); streamMetaReleaseTask(pMeta, pTask); @@ -695,7 +695,7 @@ void rspMonitorFn(void* param, void* tmrId) { taosThreadMutexLock(&pInfo->checkInfoLock); if (pInfo->notReadyTasks == 0) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); - stDebug("s-task:%s status:%s vgId:%d all downstream ready, quit from monitor rsp tmr, ref:%d", id, pStat->name, + stDebug("s-task:%s status:%s vgId:%d all downstream ready, quit from monitor rsp tmr, ref:%d", id, pStat.name, vgId, ref); streamTaskCompleteCheckRsp(pInfo, false, id); @@ -707,7 +707,7 @@ void rspMonitorFn(void* param, void* tmrId) { SArray* pNotReadyList = taosArrayInit(4, sizeof(int64_t)); SArray* pTimeoutList = taosArrayInit(4, sizeof(int64_t)); - if (pStat->state == TASK_STATUS__UNINIT) { + if (pStat.state == TASK_STATUS__UNINIT) { getCheckRspStatus(pInfo, timeoutDuration, &numOfReady, &numOfFault, &numOfNotRsp, pTimeoutList, pNotReadyList, id); numOfNotReady = (int32_t)taosArrayGetSize(pNotReadyList); @@ -720,7 +720,7 @@ void rspMonitorFn(void* param, void* tmrId) { stDebug( "s-task:%s status:%s vgId:%d all rsp. quit from monitor rsp tmr, since vnode-transfer/leader-change/restart " "detected, total:%d, notRsp:%d, notReady:%d, fault:%d, timeout:%d, ready:%d ref:%d", - id, pStat->name, vgId, total, numOfNotRsp, numOfNotReady, numOfFault, numOfTimeout, numOfReady, ref); + id, pStat.name, vgId, total, numOfNotRsp, numOfNotReady, numOfFault, numOfTimeout, numOfReady, ref); streamTaskCompleteCheckRsp(pInfo, false, id); taosThreadMutexUnlock(&pInfo->checkInfoLock); @@ -731,7 +731,7 @@ void rspMonitorFn(void* param, void* tmrId) { return; } } else { // unexpected status - stError("s-task:%s unexpected task status:%s during waiting for check rsp", id, pStat->name); + stError("s-task:%s unexpected task status:%s during waiting for check rsp", id, pStat.name); } // checking of downstream tasks has been stopped by other threads @@ -740,7 +740,7 @@ void rspMonitorFn(void* param, void* tmrId) { stDebug( "s-task:%s status:%s vgId:%d stopped by other threads to check downstream process, total:%d, notRsp:%d, " "notReady:%d, fault:%d, timeout:%d, ready:%d ref:%d", - id, pStat->name, vgId, total, numOfNotRsp, numOfNotReady, numOfFault, numOfTimeout, numOfReady, ref); + id, pStat.name, vgId, total, numOfNotRsp, numOfNotReady, numOfFault, numOfTimeout, numOfReady, ref); streamTaskCompleteCheckRsp(pInfo, false, id); taosThreadMutexUnlock(&pInfo->checkInfoLock); diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index 6906f1eccd..3b15e5122d 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -219,7 +219,7 @@ int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock return code; } - if (streamTaskGetStatus(pTask)->state == TASK_STATUS__CK) { + if (streamTaskGetStatus(pTask).state == TASK_STATUS__CK) { if (pActiveInfo->activeId != checkpointId) { stError("s-task:%s vgId:%d active checkpointId:%" PRId64 ", recv invalid checkpoint-trigger checkpointId:%" PRId64 " discard", @@ -265,7 +265,7 @@ int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock id, vgId, pTask->chkInfo.checkpointId, pTask->chkInfo.checkpointVer, transId, checkpointId); // set task status - if (streamTaskGetStatus(pTask)->state != TASK_STATUS__CK) { + if (streamTaskGetStatus(pTask).state != TASK_STATUS__CK) { pActiveInfo->activeId = checkpointId; pActiveInfo->transId = transId; @@ -354,9 +354,9 @@ int32_t streamProcessCheckpointReadyMsg(SStreamTask* pTask, int64_t checkpointId ASSERT(total > 0); // 1. not in checkpoint status now - SStreamTaskState* pStat = streamTaskGetStatus(pTask); - if (pStat->state != TASK_STATUS__CK) { - stError("s-task:%s status:%s discard checkpoint-ready msg from task:0x%x", id, pStat->name, downstreamTaskId); + SStreamTaskState pStat = streamTaskGetStatus(pTask); + if (pStat.state != TASK_STATUS__CK) { + stError("s-task:%s status:%s discard checkpoint-ready msg from task:0x%x", id, pStat.name, downstreamTaskId); return TSDB_CODE_STREAM_TASK_IVLD_STATUS; } @@ -364,7 +364,7 @@ int32_t streamProcessCheckpointReadyMsg(SStreamTask* pTask, int64_t checkpointId if (pTask->chkInfo.checkpointId > checkpointId || pInfo->activeId != checkpointId) { stError("s-task:%s status:%s checkpointId:%" PRId64 " new arrival checkpoint-ready msg (checkpointId:%" PRId64 ") from task:0x%x, expired and discard ", - id, pStat->name, pTask->chkInfo.checkpointId, checkpointId, downstreamTaskId); + id, pStat.name, pTask->chkInfo.checkpointId, checkpointId, downstreamTaskId); return -1; } @@ -482,17 +482,17 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV return TSDB_CODE_SUCCESS; } - SStreamTaskState* pStatus = streamTaskGetStatus(pTask); + SStreamTaskState pStatus = streamTaskGetStatus(pTask); if (!restored) { // during restore procedure, do update checkpoint-info stDebug("s-task:%s vgId:%d status:%s update the checkpoint-info during restore, checkpointId:%" PRId64 "->%" PRId64 " checkpointVer:%" PRId64 "->%" PRId64 " checkpointTs:%" PRId64 "->%" PRId64, - id, vgId, pStatus->name, pInfo->checkpointId, pReq->checkpointId, pInfo->checkpointVer, pReq->checkpointVer, + id, vgId, pStatus.name, pInfo->checkpointId, pReq->checkpointId, pInfo->checkpointVer, pReq->checkpointVer, pInfo->checkpointTime, pReq->checkpointTs); } else { // not in restore status, must be in checkpoint status stDebug("s-task:%s vgId:%d status:%s start to update the checkpoint-info, checkpointId:%" PRId64 "->%" PRId64 " checkpointVer:%" PRId64 "->%" PRId64 " checkpointTs:%" PRId64 "->%" PRId64, - id, vgId, pStatus->name, pInfo->checkpointId, pReq->checkpointId, pInfo->checkpointVer, pReq->checkpointVer, + id, vgId, pStatus.name, pInfo->checkpointId, pReq->checkpointId, pInfo->checkpointVer, pReq->checkpointVer, pInfo->checkpointTime, pReq->checkpointTs); } @@ -505,11 +505,11 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV streamTaskClearCheckInfo(pTask, true); - if (pStatus->state == TASK_STATUS__CK) { + if (pStatus.state == TASK_STATUS__CK) { // todo handle error code = streamTaskHandleEvent(pTask->status.pSM, TASK_EVENT_CHECKPOINT_DONE); } else { - stDebug("s-task:0x%x vgId:%d not handle checkpoint-done event, status:%s", pReq->taskId, vgId, pStatus->name); + stDebug("s-task:0x%x vgId:%d not handle checkpoint-done event, status:%s", pReq->taskId, vgId, pStatus.name); } if (pReq->dropRelHTask) { @@ -519,7 +519,7 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV } stDebug("s-task:0x%x set the persistent status attr to be ready, prev:%s, status in sm:%s", pReq->taskId, - streamTaskGetStatusStr(pTask->status.taskStatus), streamTaskGetStatus(pTask)->name); + streamTaskGetStatusStr(pTask->status.taskStatus), streamTaskGetStatus(pTask).name); pTask->status.taskStatus = TASK_STATUS__READY; @@ -770,8 +770,8 @@ void checkpointTriggerMonitorFn(void* param, void* tmrId) { stDebug("s-task:%s vgId:%d checkpoint-trigger monitor in tmr, ts:%" PRId64, id, vgId, now); (void) taosThreadMutexLock(&pTask->lock); - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state != TASK_STATUS__CK) { + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state != TASK_STATUS__CK) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); stDebug("s-task:%s vgId:%d not in checkpoint status, quit from monitor checkpoint-trigger, ref:%d", id, vgId, ref); @@ -890,9 +890,9 @@ bool streamTaskAlreadySendTrigger(SStreamTask* pTask, int32_t downstreamNodeId) int64_t now = taosGetTimestampMs(); const char* id = pTask->id.idStr; SActiveCheckpointInfo* pInfo = pTask->chkInfo.pActiveInfo; - SStreamTaskState* pStatus = streamTaskGetStatus(pTask); + SStreamTaskState pStatus = streamTaskGetStatus(pTask); - if (pStatus->state != TASK_STATUS__CK) { + if (pStatus.state != TASK_STATUS__CK) { return false; } @@ -1207,8 +1207,8 @@ int32_t streamTaskSendCheckpointsourceRsp(SStreamTask* pTask) { } (void) taosThreadMutexLock(&pTask->lock); - SStreamTaskState* p = streamTaskGetStatus(pTask); - if (p->state == TASK_STATUS__CK) { + SStreamTaskState p = streamTaskGetStatus(pTask); + if (p.state == TASK_STATUS__CK) { code = streamTaskSendCheckpointSourceRsp(pTask); } (void) taosThreadMutexUnlock(&pTask->lock); diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c index f406c7ac48..d6929c5f00 100644 --- a/source/libs/stream/src/streamDispatch.c +++ b/source/libs/stream/src/streamDispatch.c @@ -799,11 +799,11 @@ static void checkpointReadyMsgSendMonitorFn(void* param, void* tmrId) { stDebug("s-task:%s in sending checkpoint-ready msg monitor timer", id); taosThreadMutexLock(&pTask->lock); - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state != TASK_STATUS__CK) { + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state != TASK_STATUS__CK) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); stDebug("s-task:%s vgId:%d status:%s not in checkpoint, quit from monitor checkpoint-ready send, ref:%d", id, vgId, - pState->name, ref); + pState.name, ref); taosThreadMutexUnlock(&pTask->lock); streamMetaReleaseTask(pTask->pMeta, pTask); return; @@ -1303,7 +1303,7 @@ int32_t streamProcessDispatchRsp(SStreamTask* pTask, SStreamDispatchRsp* pRsp, i if (delayDispatch) { taosThreadMutexLock(&pTask->lock); // we only set the dispatch msg info for current checkpoint trans - if (streamTaskGetStatus(pTask)->state == TASK_STATUS__CK && + if (streamTaskGetStatus(pTask).state == TASK_STATUS__CK && pTask->chkInfo.pActiveInfo->activeId == pMsgInfo->checkpointId) { ASSERT(pTask->chkInfo.pActiveInfo->transId == pMsgInfo->transId); stDebug("s-task:%s checkpoint-trigger msg to 0x%x rsp for checkpointId:%" PRId64 " transId:%d confirmed", diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index ffada66cca..b2c491de05 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -27,12 +27,12 @@ static int32_t streamTransferStateDoPrepare(SStreamTask* pTask); static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, int64_t* totalSize, int32_t* totalBlocks); bool streamTaskShouldStop(const SStreamTask* pTask) { - SStreamTaskState* pState = streamTaskGetStatus(pTask); - return (pState->state == TASK_STATUS__STOP) || (pState->state == TASK_STATUS__DROPPING); + SStreamTaskState pState = streamTaskGetStatus(pTask); + return (pState.state == TASK_STATUS__STOP) || (pState.state == TASK_STATUS__DROPPING); } bool streamTaskShouldPause(const SStreamTask* pTask) { - return (streamTaskGetStatus(pTask)->state == TASK_STATUS__PAUSE); + return (streamTaskGetStatus(pTask).state == TASK_STATUS__PAUSE); } static int32_t doOutputResultBlockImpl(SStreamTask* pTask, SStreamDataBlock* pBlock) { @@ -337,10 +337,10 @@ int32_t streamTransferStateDoPrepare(SStreamTask* pTask) { stDebug( "s-task:%s fill-history task end, status:%s, scan wal elapsed time:%.2fSec, update related stream task:%s " "info, prepare transfer exec state", - id, streamTaskGetStatus(pTask)->name, el, pStreamTask->id.idStr); + id, streamTaskGetStatus(pTask).name, el, pStreamTask->id.idStr); } - ETaskStatus status = streamTaskGetStatus(pStreamTask)->state; + ETaskStatus status = streamTaskGetStatus(pStreamTask).state; STimeWindow* pTimeWindow = &pStreamTask->dataRange.window; // It must be halted for a source stream task, since when the related scan-history-data task start scan the history @@ -350,7 +350,7 @@ int32_t streamTransferStateDoPrepare(SStreamTask* pTask) { } else { ASSERT(status == TASK_STATUS__READY || status == TASK_STATUS__PAUSE || status == TASK_STATUS__DROPPING || status == TASK_STATUS__STOP); - int32_t code = streamTaskHandleEvent(pStreamTask->status.pSM, TASK_EVENT_HALT); + code = streamTaskHandleEvent(pStreamTask->status.pSM, TASK_EVENT_HALT); if (code != TSDB_CODE_SUCCESS) { stError("s-task:%s halt stream task:%s failed, code:%s not transfer state to stream task", id, pStreamTask->id.idStr, tstrerror(code)); @@ -364,9 +364,9 @@ int32_t streamTransferStateDoPrepare(SStreamTask* pTask) { // In case of sink tasks, no need to halt them. // In case of source tasks and agg tasks, we should HALT them, and wait for them to be idle. And then, it's safe to // start the task state transfer procedure. - SStreamTaskState* pState = streamTaskGetStatus(pStreamTask); - status = pState->state; - char* p = pState->name; + SStreamTaskState pState = streamTaskGetStatus(pStreamTask); + status = pState.state; + char* p = pState.name; if (status == TASK_STATUS__STOP || status == TASK_STATUS__DROPPING) { stError("s-task:%s failed to transfer state from fill-history task:%s, status:%s", id, pStreamTask->id.idStr, p); streamMetaReleaseTask(pMeta, pStreamTask); @@ -391,7 +391,7 @@ int32_t streamTransferStateDoPrepare(SStreamTask* pTask) { streamTaskSendCheckpointReq(pStreamTask); // 3. assign the status to the value that will be kept in disk - pStreamTask->status.taskStatus = streamTaskGetStatus(pStreamTask)->state; + pStreamTask->status.taskStatus = streamTaskGetStatus(pStreamTask).state; // 4. open the inputQ for all upstream tasks streamTaskOpenAllUpstreamInput(pStreamTask); @@ -598,7 +598,7 @@ void flushStateDataInExecutor(SStreamTask* pTask, SStreamQueueItem* pCheckpointB streamTaskReleaseState(pHTask); streamTaskReloadState(pTask); stDebug("s-task:%s transfer state from fill-history task:%s, status:%s completed", id, pHTask->id.idStr, - streamTaskGetStatus(pHTask)->name); + streamTaskGetStatus(pHTask).name); streamMetaReleaseTask(pTask->pMeta, pHTask); } else { @@ -628,7 +628,7 @@ static int32_t doStreamExecTask(SStreamTask* pTask) { int32_t numOfBlocks = 0; SStreamQueueItem* pInput = NULL; - if (streamTaskShouldStop(pTask) || (streamTaskGetStatus(pTask)->state == TASK_STATUS__UNINIT)) { + if (streamTaskShouldStop(pTask) || (streamTaskGetStatus(pTask).state == TASK_STATUS__UNINIT)) { stDebug("s-task:%s stream task is stopped", id); return 0; } @@ -706,9 +706,9 @@ static int32_t doStreamExecTask(SStreamTask* pTask) { } else { // todo other thread may change the status // do nothing after sync executor state to storage backend, untill the vnode-level checkpoint is completed. taosThreadMutexLock(&pTask->lock); - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state == TASK_STATUS__CK) { - stDebug("s-task:%s checkpoint block received, set status:%s", id, pState->name); + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state == TASK_STATUS__CK) { + stDebug("s-task:%s checkpoint block received, set status:%s", id, pState.name); streamTaskBuildCheckpoint(pTask); } else { // todo refactor int32_t code = 0; @@ -735,17 +735,17 @@ static int32_t doStreamExecTask(SStreamTask* pTask) { // the task may be set dropping/stopping, while it is still in the task queue, therefore, the sched-status can not // be updated by tryExec function, therefore, the schedStatus will always be the TASK_SCHED_STATUS__WAITING. bool streamTaskIsIdle(const SStreamTask* pTask) { - ETaskStatus status = streamTaskGetStatus(pTask)->state; + ETaskStatus status = streamTaskGetStatus(pTask).state; return (pTask->status.schedStatus == TASK_SCHED_STATUS__INACTIVE || status == TASK_STATUS__STOP || status == TASK_STATUS__DROPPING); } bool streamTaskReadyToRun(const SStreamTask* pTask, char** pStatus) { - SStreamTaskState* pState = streamTaskGetStatus(pTask); + SStreamTaskState pState = streamTaskGetStatus(pTask); - ETaskStatus st = pState->state; + ETaskStatus st = pState.state; if (pStatus != NULL) { - *pStatus = pState->name; + *pStatus = pState.name; } // pause & halt will still run for sink tasks. @@ -776,7 +776,7 @@ int32_t streamResumeTask(SStreamTask* pTask) { setLastExecTs(pTask, taosGetTimestampMs()); - char* p = streamTaskGetStatus(pTask)->name; + char* p = streamTaskGetStatus(pTask).name; stDebug("s-task:%s exec completed, status:%s, sched-status:%d, lastExecTs:%" PRId64, id, p, pTask->status.schedStatus, pTask->status.lastExecTs); @@ -804,7 +804,7 @@ int32_t streamExecTask(SStreamTask* pTask) { if (schedStatus == TASK_SCHED_STATUS__WAITING) { streamResumeTask(pTask); } else { - char* p = streamTaskGetStatus(pTask)->name; + char* p = streamTaskGetStatus(pTask).name; stDebug("s-task:%s already started to exec by other thread, status:%s, sched-status:%d", id, p, pTask->status.schedStatus); } diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 9cf3909867..a3f833294a 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -1128,11 +1128,11 @@ SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta) { taosThreadMutexLock(&pTask->lock); - SStreamTaskState* pState = streamTaskGetStatus(pTask); - if (pState->state == TASK_STATUS__CK) { + SStreamTaskState pState = streamTaskGetStatus(pTask); + if (pState.state == TASK_STATUS__CK) { streamTaskSetFailedCheckpointId(pTask); } else { - stDebug("s-task:%s status:%s not reset the checkpoint", pTask->id.idStr, pState->name); + stDebug("s-task:%s status:%s not reset the checkpoint", pTask->id.idStr, pState.name); } taosThreadMutexUnlock(&pTask->lock); diff --git a/source/libs/stream/src/streamSched.c b/source/libs/stream/src/streamSched.c index 0a54dfa4c8..4cb87820c6 100644 --- a/source/libs/stream/src/streamSched.c +++ b/source/libs/stream/src/streamSched.c @@ -94,13 +94,13 @@ int32_t streamTaskResumeInFuture(SStreamTask* pTask) { void streamTaskResumeHelper(void* param, void* tmrId) { SStreamTask* pTask = (SStreamTask*)param; SStreamTaskId* pId = &pTask->id; - SStreamTaskState* p = streamTaskGetStatus(pTask); + SStreamTaskState p = streamTaskGetStatus(pTask); - if (p->state == TASK_STATUS__DROPPING || p->state == TASK_STATUS__STOP) { + if (p.state == TASK_STATUS__DROPPING || p.state == TASK_STATUS__STOP) { streamTaskSetSchedStatusInactive(pTask); int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); - stDebug("s-task:%s status:%s not resume task, ref:%d", pId->idStr, p->name, ref); + stDebug("s-task:%s status:%s not resume task, ref:%d", pId->idStr, p.name, ref); streamMetaReleaseTask(pTask->pMeta, pTask); return; @@ -130,7 +130,7 @@ void streamTaskSchedHelper(void* param, void* tmrId) { return; } - if (streamTaskGetStatus(pTask)->state == TASK_STATUS__CK) { + if (streamTaskGetStatus(pTask).state == TASK_STATUS__CK) { stDebug("s-task:%s in checkpoint procedure, not retrieve result, next:%dms", id, nextTrigger); } else { if (status == TASK_TRIGGER_STATUS__ACTIVE) { diff --git a/source/libs/stream/src/streamStartHistory.c b/source/libs/stream/src/streamStartHistory.c index cf23b776e2..3c7ad2639a 100644 --- a/source/libs/stream/src/streamStartHistory.c +++ b/source/libs/stream/src/streamStartHistory.c @@ -44,13 +44,13 @@ static void doRetryLaunchFillHistoryTask(SStreamTask* pTask, SLaunc static void notRetryLaunchFillHistoryTask(SStreamTask* pTask, SLaunchHTaskInfo* pInfo, int64_t now); static int32_t streamTaskSetReady(SStreamTask* pTask) { - int32_t numOfDowns = streamTaskGetNumOfDownstream(pTask); - SStreamTaskState* p = streamTaskGetStatus(pTask); + int32_t numOfDowns = streamTaskGetNumOfDownstream(pTask); + SStreamTaskState p = streamTaskGetStatus(pTask); - if ((p->state == TASK_STATUS__SCAN_HISTORY) && pTask->info.taskLevel != TASK_LEVEL__SOURCE) { + if ((p.state == TASK_STATUS__SCAN_HISTORY) && pTask->info.taskLevel != TASK_LEVEL__SOURCE) { int32_t numOfUps = taosArrayGetSize(pTask->upstreamInfo.pList); stDebug("s-task:%s level:%d task wait for %d upstream tasks complete scan-history procedure, status:%s", - pTask->id.idStr, pTask->info.taskLevel, numOfUps, p->name); + pTask->id.idStr, pTask->info.taskLevel, numOfUps, p.name); } ASSERT(pTask->status.downstreamReady == 0); @@ -59,7 +59,7 @@ static int32_t streamTaskSetReady(SStreamTask* pTask) { pTask->execInfo.readyTs = taosGetTimestampMs(); int64_t el = (pTask->execInfo.readyTs - pTask->execInfo.checkTs); stDebug("s-task:%s all %d downstream ready, init completed, elapsed time:%" PRId64 "ms, task status:%s", - pTask->id.idStr, numOfDowns, el, p->name); + pTask->id.idStr, numOfDowns, el, p.name); return TSDB_CODE_SUCCESS; } @@ -96,7 +96,7 @@ int32_t streamExecScanHistoryInFuture(SStreamTask* pTask, int32_t idleDuration) int32_t code = streamMetaAcquireTask(pTask->pMeta, pTask->id.streamId, pTask->id.taskId, &p); if (p == NULL) { stError("s-task:0x%x failed to acquire task, status:%s, not exec scan-history data", pTask->id.taskId, - streamTaskGetStatus(pTask)->name); + streamTaskGetStatus(pTask).name); return TSDB_CODE_SUCCESS; } @@ -118,7 +118,7 @@ int32_t streamExecScanHistoryInFuture(SStreamTask* pTask, int32_t idleDuration) int32_t streamTaskStartScanHistory(SStreamTask* pTask) { int32_t level = pTask->info.taskLevel; - ETaskStatus status = streamTaskGetStatus(pTask)->state; + ETaskStatus status = streamTaskGetStatus(pTask).state; ASSERT((pTask->status.downstreamReady == 1) && (status == TASK_STATUS__SCAN_HISTORY) && (pTask->info.fillHistory == 1)); @@ -139,8 +139,8 @@ int32_t streamTaskOnNormalTaskReady(SStreamTask* pTask) { streamTaskSetReady(pTask); streamTaskSetRangeStreamCalc(pTask); - SStreamTaskState* p = streamTaskGetStatus(pTask); - ASSERT(p->state == TASK_STATUS__READY); + SStreamTaskState p = streamTaskGetStatus(pTask); + ASSERT(p.state == TASK_STATUS__READY); int8_t schedStatus = pTask->status.schedStatus; if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) { @@ -149,10 +149,10 @@ int32_t streamTaskOnNormalTaskReady(SStreamTask* pTask) { startVer = pTask->chkInfo.nextProcessVer; } - stDebug("s-task:%s status:%s, sched-status:%d, ready for data from wal ver:%" PRId64, id, p->name, schedStatus, + stDebug("s-task:%s status:%s, sched-status:%d, ready for data from wal ver:%" PRId64, id, p.name, schedStatus, startVer); } else { - stDebug("s-task:%s level:%d status:%s sched-status:%d", id, pTask->info.taskLevel, p->name, schedStatus); + stDebug("s-task:%s level:%d status:%s sched-status:%d", id, pTask->info.taskLevel, p.name, schedStatus); } return TSDB_CODE_SUCCESS; @@ -163,10 +163,10 @@ int32_t streamTaskOnScanHistoryTaskReady(SStreamTask* pTask) { streamTaskSetReady(pTask); streamTaskSetRangeStreamCalc(pTask); - SStreamTaskState* p = streamTaskGetStatus(pTask); - ASSERT((p->state == TASK_STATUS__SCAN_HISTORY) && (pTask->info.fillHistory == 1)); + SStreamTaskState p = streamTaskGetStatus(pTask); + ASSERT((p.state == TASK_STATUS__SCAN_HISTORY) && (pTask->info.fillHistory == 1)); - stDebug("s-task:%s fill-history task enters into scan-history data stage, status:%s", pTask->id.idStr, p->name); + stDebug("s-task:%s fill-history task enters into scan-history data stage, status:%s", pTask->id.idStr, p.name); streamTaskStartScanHistory(pTask); // NOTE: there will be an deadlock if launch fill history here. @@ -206,11 +206,11 @@ int32_t streamLaunchFillHistoryTask(SStreamTask* pTask) { ASSERT(hTaskId != 0); // check stream task status in the first place. - SStreamTaskState* pStatus = streamTaskGetStatus(pTask); - if (pStatus->state != TASK_STATUS__READY && pStatus->state != TASK_STATUS__HALT && - pStatus->state != TASK_STATUS__PAUSE) { + SStreamTaskState pStatus = streamTaskGetStatus(pTask); + if (pStatus.state != TASK_STATUS__READY && pStatus.state != TASK_STATUS__HALT && + pStatus.state != TASK_STATUS__PAUSE) { stDebug("s-task:%s not launch related fill-history task:0x%" PRIx64 "-0x%x, status:%s", idStr, hStreamId, hTaskId, - pStatus->name); + pStatus.name); streamMetaAddTaskLaunchResult(pMeta, hStreamId, hTaskId, pExecInfo->checkTs, pExecInfo->readyTs, false); return -1; // todo set the correct error code @@ -310,7 +310,7 @@ void doRetryLaunchFillHistoryTask(SStreamTask* pTask, SLaunchHTaskInfo* pInfo, i streamMetaAddTaskLaunchResult(pMeta, pInfo->hTaskId.streamId, pInfo->hTaskId.taskId, 0, now, false); taosMemoryFree(pInfo); } else { - char* p = streamTaskGetStatus(pTask)->name; + char* p = streamTaskGetStatus(pTask).name; int32_t hTaskId = pHTaskInfo->id.taskId; stDebug("s-task:%s status:%s failed to launch fill-history task:0x%x, retry launch:%dms, retryCount:%d", @@ -342,7 +342,7 @@ void tryLaunchHistoryTask(void* param, void* tmrId) { if (streamTaskShouldStop(*ppTask)) { ASSERT((*ppTask)->status.timerActive >= 1); - char* p = streamTaskGetStatus(*ppTask)->name; + char* p = streamTaskGetStatus(*ppTask).name; int32_t ref = atomic_sub_fetch_32(&(*ppTask)->status.timerActive, 1); stDebug("s-task:%s status:%s should stop, quit launch fill-history task timer, retry:%d, ref:%d", (*ppTask)->id.idStr, p, (*ppTask)->hTaskInfo.retryTimes, ref); @@ -544,10 +544,10 @@ void doExecScanhistoryInFuture(void* param, void* tmrId) { SStreamTask* pTask = param; pTask->schedHistoryInfo.numOfTicks -= 1; - SStreamTaskState* p = streamTaskGetStatus(pTask); - if (p->state == TASK_STATUS__DROPPING || p->state == TASK_STATUS__STOP) { + SStreamTaskState p = streamTaskGetStatus(pTask); + if (p.state == TASK_STATUS__DROPPING || p.state == TASK_STATUS__STOP) { int32_t ref = atomic_sub_fetch_32(&pTask->status.timerActive, 1); - stDebug("s-task:%s status:%s not start scan-history again, ref:%d", pTask->id.idStr, p->name, ref); + stDebug("s-task:%s status:%s not start scan-history again, ref:%d", pTask->id.idStr, p.name, ref); streamMetaReleaseTask(pTask->pMeta, pTask); return; diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 6264a262da..6876cf5beb 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -199,9 +199,9 @@ void tFreeStreamTask(SStreamTask* pTask) { ETaskStatus status1 = TASK_STATUS__UNINIT; taosThreadMutexLock(&pTask->lock); if (pTask->status.pSM != NULL) { - SStreamTaskState* pStatus = streamTaskGetStatus(pTask); - p = pStatus->name; - status1 = pStatus->state; + SStreamTaskState pStatus = streamTaskGetStatus(pTask); + p = pStatus.name; + status1 = pStatus.state; } taosThreadMutexUnlock(&pTask->lock); @@ -728,7 +728,7 @@ int32_t streamTaskClearHTaskAttr(SStreamTask* pTask, int32_t resetRelHalt) { if (resetRelHalt) { stDebug("s-task:0x%" PRIx64 " set the persistent status attr to be ready, prev:%s, status in sm:%s", sTaskId.taskId, streamTaskGetStatusStr((*ppStreamTask)->status.taskStatus), - streamTaskGetStatus(*ppStreamTask)->name); + streamTaskGetStatus(*ppStreamTask).name); (*ppStreamTask)->status.taskStatus = TASK_STATUS__READY; } @@ -861,7 +861,7 @@ STaskStatusEntry streamTaskGetStatusEntry(SStreamTask* pTask) { STaskStatusEntry entry = { .id = streamTaskGetTaskId(pTask), - .status = streamTaskGetStatus(pTask)->state, + .status = streamTaskGetStatus(pTask).state, .nodeId = pMeta->vgId, .stage = pMeta->stage, @@ -906,12 +906,12 @@ void streamTaskPause(SStreamTask* pTask) { } void streamTaskResume(SStreamTask* pTask) { - SStreamTaskState prevState = *streamTaskGetStatus(pTask); + SStreamTaskState prevState = streamTaskGetStatus(pTask); SStreamMeta* pMeta = pTask->pMeta; int32_t code = streamTaskRestoreStatus(pTask); if (code == TSDB_CODE_SUCCESS) { - char* pNew = streamTaskGetStatus(pTask)->name; + char* pNew = streamTaskGetStatus(pTask).name; int32_t num = atomic_sub_fetch_32(&pMeta->numOfPausedTasks, 1); stInfo("s-task:%s status:%s resume from %s, paused task(s):%d", pTask->id.idStr, pNew, prevState.name, num); } else { diff --git a/source/libs/stream/src/streamTaskSm.c b/source/libs/stream/src/streamTaskSm.c index e2d988b876..1af47cf43f 100644 --- a/source/libs/stream/src/streamTaskSm.c +++ b/source/libs/stream/src/streamTaskSm.c @@ -67,7 +67,7 @@ static STaskStateTrans createStateTransform(ETaskStatus current, ETaskStatus nex static int32_t dummyFn(SStreamTask* UNUSED_PARAM(p)) { return TSDB_CODE_SUCCESS; } static int32_t attachWaitedEvent(SStreamTask* pTask, SFutureHandleEventInfo* pEvtInfo) { - char* p = streamTaskGetStatus(pTask)->name; + char* p = streamTaskGetStatus(pTask).name; stDebug("s-task:%s status:%s attach event:%s required status:%s, since not allowed to handle it", pTask->id.idStr, p, GET_EVT_NAME(pEvtInfo->event), StreamTaskStatusList[pEvtInfo->status].name); @@ -305,7 +305,7 @@ static int32_t doHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event, STaskSt while (1) { // wait for the task to be here taosThreadMutexLock(&pTask->lock); - ETaskStatus s = streamTaskGetStatus(pTask)->state; + ETaskStatus s = streamTaskGetStatus(pTask).state; taosThreadMutexUnlock(&pTask->lock); if ((s == pTrans->next.state) && (pSM->prev.evt == pTrans->event)) {// this event has been handled already @@ -510,8 +510,8 @@ int32_t streamTaskOnHandleEventSuccess(SStreamTaskSM* pSM, EStreamTaskEvent even return TSDB_CODE_SUCCESS; } -SStreamTaskState* streamTaskGetStatus(const SStreamTask* pTask) { - return &pTask->status.pSM->current; // copy one obj in case of multi-thread environment +SStreamTaskState streamTaskGetStatus(const SStreamTask* pTask) { + return pTask->status.pSM->current; // copy one obj in case of multi-thread environment } ETaskStatus streamTaskGetPrevStatus(const SStreamTask* pTask) { From 2aa4d6028ba40fda38dccd02ebec045f7da9b193 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 16:56:36 +0800 Subject: [PATCH 19/45] refactor: check return value for each function. --- include/libs/stream/tstream.h | 4 ++-- source/libs/stream/inc/streamInt.h | 5 ----- source/libs/stream/src/streamMeta.c | 16 +++++++++++----- source/libs/stream/src/streamTask.c | 12 +++++++++--- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 609b977536..b6569ea771 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -639,7 +639,7 @@ bool streamTaskShouldPause(const SStreamTask* pStatus); bool streamTaskIsIdle(const SStreamTask* pTask); bool streamTaskReadyToRun(const SStreamTask* pTask, char** pStatus); -char* createStreamTaskIdStr(int64_t streamId, int32_t taskId); +int32_t createStreamTaskIdStr(int64_t streamId, int32_t taskId, const char** pId); SStreamTaskState streamTaskGetStatus(const SStreamTask* pTask); const char* streamTaskGetStatusStr(ETaskStatus status); void streamTaskResetStatus(SStreamTask* pTask); @@ -758,7 +758,7 @@ void streamMetaRUnLock(SStreamMeta* pMeta); void streamMetaWLock(SStreamMeta* pMeta); void streamMetaWUnLock(SStreamMeta* pMeta); void streamMetaResetStartInfo(STaskStartInfo* pMeta, int32_t vgId); -SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta); +int32_t streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta, SArray** pTaskList); void streamMetaUpdateStageRole(SStreamMeta* pMeta, int64_t stage, bool isLeader); void streamMetaLoadAllTasks(SStreamMeta* pMeta); int32_t streamMetaStartAllTasks(SStreamMeta* pMeta); diff --git a/source/libs/stream/inc/streamInt.h b/source/libs/stream/inc/streamInt.h index 008d066717..3027abc4be 100644 --- a/source/libs/stream/inc/streamInt.h +++ b/source/libs/stream/inc/streamInt.h @@ -65,11 +65,6 @@ struct SActiveCheckpointInfo { tmr_h pSendReadyMsgTmr; }; -struct SConsensusCheckpoint { - int8_t inProcess; - -}; - typedef struct { int8_t type; SSDataBlock* pBlock; diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index a3f833294a..3940866488 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -1104,13 +1104,14 @@ int32_t streamMetaAsyncExec(SStreamMeta* pMeta, __stream_async_exec_fn_t fn, voi return taosScheduleTask(pMeta->qHandle, &schedMsg); } -SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta) { +int32_t streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta, SArray** pList) { + *pList = NULL; SArray* pTaskList = taosArrayDup(pMeta->pTaskList, NULL); bool sendMsg = pMeta->sendMsgBeforeClosing; if (!sendMsg) { stDebug("vgId:%d no need to send msg to mnode before closing tasks", pMeta->vgId); - return pTaskList; + return TSDB_CODE_SUCCESS; } stDebug("vgId:%d send msg to mnode before closing all tasks", pMeta->vgId); @@ -1141,7 +1142,7 @@ SArray* streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta) { streamMetaSendHbHelper(pMeta); pMeta->sendMsgBeforeClosing = false; - return pTaskList; + return TSDB_CODE_SUCCESS; } void streamMetaUpdateStageRole(SStreamMeta* pMeta, int64_t stage, bool isLeader) { @@ -1311,14 +1312,19 @@ int32_t streamMetaStopAllTasks(SStreamMeta* pMeta) { int64_t st = taosGetTimestampMs(); // send hb msg to mnode before closing all tasks. - SArray* pTaskList = streamMetaSendMsgBeforeCloseTasks(pMeta); + SArray* pTaskList = NULL; + int32_t code = streamMetaSendMsgBeforeCloseTasks(pMeta, &pTaskList); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + int32_t numOfTasks = taosArrayGetSize(pTaskList); for (int32_t i = 0; i < numOfTasks; ++i) { SStreamTaskId* pTaskId = taosArrayGet(pTaskList, i); SStreamTask* pTask = NULL; - int32_t code = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); + code = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); if (code != TSDB_CODE_SUCCESS) { continue; } diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 6876cf5beb..892ed6f5bf 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -359,7 +359,7 @@ static void setInitialVersionInfo(SStreamTask* pTask, int64_t ver) { } int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, int64_t ver) { - pTask->id.idStr = createStreamTaskIdStr(pTask->id.streamId, pTask->id.taskId); + (void) createStreamTaskIdStr(pTask->id.streamId, pTask->id.taskId, &pTask->id.idStr); pTask->refCnt = 1; pTask->inputq.status = TASK_INPUT_STATUS__NORMAL; @@ -997,10 +997,16 @@ SEpSet* streamTaskGetDownstreamEpInfo(SStreamTask* pTask, int32_t taskId) { return NULL; } -char* createStreamTaskIdStr(int64_t streamId, int32_t taskId) { +int32_t createStreamTaskIdStr(int64_t streamId, int32_t taskId, const char** pId) { char buf[128] = {0}; sprintf(buf, "0x%" PRIx64 "-0x%x", streamId, taskId); - return taosStrdup(buf); + *pId = taosStrdup(buf); + + if (*pId == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } else { + return TSDB_CODE_SUCCESS; + } } static int32_t streamTaskEnqueueRetrieve(SStreamTask* pTask, SStreamRetrieveReq* pReq) { From db40210a63e7daf25e322bda7ab77070fcdd9a58 Mon Sep 17 00:00:00 2001 From: zhiyong Date: Wed, 17 Jul 2024 17:27:14 +0800 Subject: [PATCH 20/45] add cast case --- tests/army/query/function/cast.py | 477 +++++++++++++++++++++++++++--- 1 file changed, 429 insertions(+), 48 deletions(-) diff --git a/tests/army/query/function/cast.py b/tests/army/query/function/cast.py index 66718ce715..af72f1de2c 100644 --- a/tests/army/query/function/cast.py +++ b/tests/army/query/function/cast.py @@ -11,61 +11,216 @@ class TDTestCase(TBase): def init(self, conn, logSql, replicaVar=1): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor(), True) - self.dbname = "cast_db" self._datetime_epoch = datetime.datetime.fromtimestamp(0) - def cast_without_from(self): + def cast_from_int_to_other(self): # int - int_num = 2147483648 - tdSql.query(f"select cast({int_num} as int) re;") - tdSql.checkData(0, 0, -int_num) + int_num1 = 2147483647 + int_num2 = 2147483648 + tdSql.query(f"select cast({int_num1} as int) re;") + tdSql.checkData(0, 0, int_num1) - tdSql.query(f"select cast(2147483647 as int) re;") - tdSql.checkData(0, 0, 2147483647) + tdSql.query(f"select cast({int_num2} as int) re;") + tdSql.checkData(0, 0, -int_num2) - tdSql.query(f"select cast({int_num} as int unsigned) re;") - tdSql.checkData(0, 0, int_num) + tdSql.query(f"select cast({int_num2} as int unsigned) re;") + tdSql.checkData(0, 0, int_num2) - tdSql.query(f"select cast({int_num} as bigint) re;") - tdSql.checkData(0, 0, int_num) + tdSql.query(f"select cast({int_num1} as bigint) re;") + tdSql.checkData(0, 0, int_num1) - tdSql.query(f"select cast({int_num} as bigint unsigned) re;") - tdSql.checkData(0, 0, int_num) + tdSql.query(f"select cast({int_num1} as bigint unsigned) re;") + tdSql.checkData(0, 0, int_num1) - tdSql.query(f"select cast({int_num} as smallint) re;") - tdSql.checkData(0, 0, 0) + tdSql.query(f"select cast({int_num1} as smallint) re;") + tdSql.checkData(0, 0, -1) - tdSql.query(f"select cast({int_num} as smallint unsigned) re;") - tdSql.checkData(0, 0, 0) + tdSql.query(f"select cast({int_num1} as smallint unsigned) re;") + tdSql.checkData(0, 0, 65535) - tdSql.query(f"select cast({int_num} as tinyint) re;") - tdSql.checkData(0, 0, 0) + tdSql.query(f"select cast({int_num1} as tinyint) re;") + tdSql.checkData(0, 0, -1) - tdSql.query(f"select cast({int_num} as tinyint unsigned) re;") - tdSql.checkData(0, 0, 0) + tdSql.query(f"select cast({int_num1} as tinyint unsigned) re;") + tdSql.checkData(0, 0, 255) - tdSql.query(f"select cast({int_num} as float) re;") - tdSql.checkData(0, 0, '2147483648.0') + tdSql.query(f"select cast({int_num2} as float) re;") + tdSql.checkData(0, 0, "2147483648.0") - tdSql.query(f"select cast({int_num} as double) re;") - tdSql.checkData(0, 0, '2147483648.0') + tdSql.query(f"select cast({int_num2} as double) re;") + tdSql.checkData(0, 0, "2147483648.0") - tdSql.query(f"select cast({int_num} as bool) as re;") + tdSql.query(f"select cast({int_num2} as bool) as re;") tdSql.checkData(0, 0, True) - tdSql.query(f"select cast({int_num} as timestamp) as re;") - tdSql.checkData(0, 0, self._datetime_epoch + datetime.timedelta(seconds=int(int_num) / 1000)) + tdSql.query(f"select cast({int_num2} as timestamp) as re;") + tdSql.checkData(0, 0, self._datetime_epoch + datetime.timedelta(seconds=int(int_num2) / 1000)) - tdSql.query(f"select cast({int_num} as varchar(10)) as re;") - tdSql.checkData(0, 0, int_num) + tdSql.query(f"select cast({int_num1} as varchar(5)) as re;") + tdSql.checkData(0, 0, "21474") - tdSql.query(f"select cast({int_num} as binary(10)) as re;") - tdSql.checkData(0, 0, int_num) + tdSql.query(f"select cast({int_num1} as binary(5)) as re;") + tdSql.checkData(0, 0, "21474") - sql = f"select cast({int_num} as nchar(10));" - tdSql.query(sql) - tdSql.checkData(0, 0, int_num) + tdSql.query(f"select cast({int_num1} as nchar(5));") + tdSql.checkData(0, 0, "21474") + def cast_from_bigint_to_other(self): + # bigint + bigint_num = 9223372036854775807 + bigint_num2 = 9223372036854775808 + tdSql.query(f"select cast({bigint_num} as int) re;") + tdSql.checkData(0, 0, -1) + + tdSql.query(f"select cast({bigint_num} as int unsigned) re;") + tdSql.checkData(0, 0, 4294967295) + + tdSql.query(f"select cast({bigint_num} as bigint) re;") + tdSql.checkData(0, 0, bigint_num) + + tdSql.query(f"select cast({bigint_num2} as bigint) re;") + tdSql.checkData(0, 0, -bigint_num2) + + tdSql.query(f"select cast({bigint_num2} as bigint unsigned) re;") + tdSql.checkData(0, 0, bigint_num2) + + tdSql.query(f"select cast({bigint_num} as smallint) re;") + tdSql.checkData(0, 0, -1) + + tdSql.query(f"select cast({bigint_num} as smallint unsigned) re;") + tdSql.checkData(0, 0, 65535) + + tdSql.query(f"select cast({bigint_num} as tinyint) re;") + tdSql.checkData(0, 0, -1) + + tdSql.query(f"select cast({bigint_num} as tinyint unsigned) re;") + tdSql.checkData(0, 0, 255) + + tdSql.query(f"select cast({bigint_num} as float) re;") + tdSql.checkData(0, 0, 9.2233720e18) + + tdSql.query(f"select cast({bigint_num} as double) re;") + tdSql.checkData(0, 0, 9.2233720e18) + + tdSql.query(f"select cast({bigint_num} as bool) as re;") + tdSql.checkData(0, 0, True) + + # WARN: datetime overflow dont worry + tdSql.query(f"select cast({bigint_num} as timestamp) as re;") + # tdSql.checkData(0, 0, "292278994-08-17 15:12:55.807") + + tdSql.query(f"select cast({bigint_num} as varchar(5)) as re;") + tdSql.checkData(0, 0, "92233") + + tdSql.query(f"select cast({bigint_num} as binary(5)) as re;") + tdSql.checkData(0, 0, "92233") + + tdSql.query(f"select cast({bigint_num} as nchar(5));") + tdSql.checkData(0, 0, "92233") + + def cast_from_smallint_to_other(self): + smallint_num = 32767 + smallint_num2 = 32768 + tdSql.query(f"select cast({smallint_num} as int) re;") + tdSql.checkData(0, 0, smallint_num) + + tdSql.query(f"select cast({smallint_num} as int unsigned) re;") + tdSql.checkData(0, 0, smallint_num) + + tdSql.query(f"select cast({smallint_num} as bigint) re;") + tdSql.checkData(0, 0, smallint_num) + + tdSql.query(f"select cast({smallint_num2} as bigint unsigned) re;") + tdSql.checkData(0, 0, smallint_num2) + + tdSql.query(f"select cast({smallint_num} as smallint) re;") + tdSql.checkData(0, 0, smallint_num) + + tdSql.query(f"select cast({smallint_num2} as smallint) re;") + tdSql.checkData(0, 0, -smallint_num2) + + tdSql.query(f"select cast({smallint_num2} as smallint unsigned) re;") + tdSql.checkData(0, 0, smallint_num2) + + tdSql.query(f"select cast({smallint_num} as tinyint) re;") + tdSql.checkData(0, 0, -1) + + tdSql.query(f"select cast({smallint_num} as tinyint unsigned) re;") + tdSql.checkData(0, 0, 255) + + tdSql.query(f"select cast({smallint_num} as float) re;") + tdSql.checkData(0, 0, "32767.0") + + tdSql.query(f"select cast({smallint_num} as double) re;") + tdSql.checkData(0, 0, "32767.0") + + tdSql.query(f"select cast({smallint_num} as bool) as re;") + tdSql.checkData(0, 0, True) + + tdSql.query(f"select cast({smallint_num} as timestamp) as re;") + tdSql.checkData(0, 0, self._datetime_epoch + datetime.timedelta(seconds=int(smallint_num) / 1000)) + + tdSql.query(f"select cast({smallint_num} as varchar(3)) as re;") + tdSql.checkData(0, 0, "327") + + tdSql.query(f"select cast({smallint_num} as binary(3)) as re;") + tdSql.checkData(0, 0, "327") + + tdSql.query(f"select cast({smallint_num} as nchar(3));") + tdSql.checkData(0, 0, "327") + + def cast_from_tinyint_to_other(self): + tinyint_num = 127 + tinyint_num2 = 128 + tdSql.query(f"select cast({tinyint_num} as int) re;") + tdSql.checkData(0, 0, tinyint_num) + + tdSql.query(f"select cast({tinyint_num} as int unsigned) re;") + tdSql.checkData(0, 0, tinyint_num) + + tdSql.query(f"select cast({tinyint_num} as bigint) re;") + tdSql.checkData(0, 0, tinyint_num) + + tdSql.query(f"select cast({tinyint_num2} as bigint unsigned) re;") + tdSql.checkData(0, 0, tinyint_num2) + + tdSql.query(f"select cast({tinyint_num} as smallint) re;") + tdSql.checkData(0, 0, tinyint_num) + + tdSql.query(f"select cast({tinyint_num} as smallint unsigned) re;") + tdSql.checkData(0, 0, tinyint_num) + + tdSql.query(f"select cast({tinyint_num} as tinyint) re;") + tdSql.checkData(0, 0, tinyint_num) + + tdSql.query(f"select cast({tinyint_num2} as tinyint) re;") + tdSql.checkData(0, 0, -tinyint_num2) + + tdSql.query(f"select cast({tinyint_num2} as tinyint unsigned) re;") + tdSql.checkData(0, 0, tinyint_num2) + + tdSql.query(f"select cast({tinyint_num} as float) re;") + tdSql.checkData(0, 0, "127.0") + + tdSql.query(f"select cast({tinyint_num} as double) re;") + tdSql.checkData(0, 0, "127.0") + + tdSql.query(f"select cast({tinyint_num} as bool) as re;") + tdSql.checkData(0, 0, True) + + tdSql.query(f"select cast({tinyint_num} as timestamp) as re;") + tdSql.checkData(0, 0, self._datetime_epoch + datetime.timedelta(seconds=int(tinyint_num) / 1000)) + + tdSql.query(f"select cast({tinyint_num} as varchar(2)) as re;") + tdSql.checkData(0, 0, "12") + + tdSql.query(f"select cast({tinyint_num} as binary(2)) as re;") + tdSql.checkData(0, 0, "12") + + tdSql.query(f"select cast({tinyint_num} as nchar(2));") + tdSql.checkData(0, 0, "12") + + def cast_from_float_to_other(self): # float float_1001 = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642019 @@ -116,22 +271,31 @@ class TDTestCase(TBase): tdSql.query(f"select cast({float_1001} as nchar(5));") tdSql.checkData(0, 0, 3.141) + def cast_from_str_to_other(self): # str - str_410 = "bcdefghigk" * 41 - big_str = "bcdefghigk" * 6552 + _str = "bcdefghigk" + str_410 = _str * 41 + str_401 = _str * 40 + "b" + big_str = _str * 6552 - tdSql.query(f"select cast('{str_410}' as binary(3)) as re;") - tdSql.checkData(0, 0, "bcd") + tdSql.query(f"select cast('{str_410}' as binary(401)) as re;") + tdSql.checkData(0, 0, str_401) - tdSql.query(f"select cast('{str_410}' as varchar(2)) as re;") - tdSql.checkData(0, 0, "bc") + tdSql.query(f"select cast('{str_410}' as varchar(401)) as re;") + tdSql.checkData(0, 0, str_401) - tdSql.query(f"select cast('{str_410}' as nchar(10));") - tdSql.checkData(0, 0, "bcdefghigk") + tdSql.query(f"select cast('{big_str}' as varchar(420)) as re;") + tdSql.checkData(0, 0, _str * 42) + + tdSql.query(f"select cast('{str_410}' as nchar(401));") + tdSql.checkData(0, 0, str_401) tdSql.query(f"select cast('北京' as nchar(10));") tdSql.checkData(0, 0, "北京") + # tdSql.query(f"select cast('北京涛思数据有限公司' as nchar(6));") + # tdSql.checkData(0, 0, "北京涛思数据") + tdSql.query(f"select cast('{str_410}' as int) as re;") tdSql.checkData(0, 0, 0) @@ -165,15 +329,232 @@ class TDTestCase(TBase): tdSql.query(f"select cast('{str_410}' as bool) as re") tdSql.checkData(0, 0, False) - tdSql.query( f"select cast('{str_410}' as timestamp) as re") + tdSql.query(f"select cast('{str_410}' as timestamp) as re") tdSql.checkData(0, 0, "1970-01-01 08:00:00.000") + def cast_from_bool_to_other(self): + true_val = True + false_val = False + tdSql.query(f"select cast({false_val} as int) re, cast({true_val} as int) re;") + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query(f"select cast({false_val} as int unsigned) re, cast({true_val} as int unsigned) re;") + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query(f"select cast({false_val} as bigint) re, cast({true_val} as bigint) re;") + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query( + f"select cast({false_val} as bigint unsigned) re, cast({true_val} as bigint unsigned) re;" + ) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query(f"select cast({false_val} as smallint) re, cast({true_val} as smallint) re;") + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query( + f"select cast({false_val} as smallint unsigned) re, cast({true_val} as smallint unsigned) re;" + ) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query(f"select cast({false_val} as tinyint) re, cast({true_val} as tinyint) re;") + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query( + f"select cast({false_val} as tinyint unsigned) re, cast({true_val} as tinyint unsigned) re;" + ) + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query(f"select cast({false_val} as smallint) re, cast({true_val} as smallint) re;") + tdSql.checkData(0, 0, 0) + tdSql.checkData(0, 1, 1) + + tdSql.query(f"select cast({false_val} as float) re, cast({true_val} as float) re;") + tdSql.checkData(0, 0, 0.0000000) + tdSql.checkData(0, 1, 1.0000000) + + tdSql.query(f"select cast({false_val} as double) re, cast({true_val} as double) re;") + tdSql.checkData(0, 0, 0.000000000000000) + tdSql.checkData(0, 1, 1.000000000000000) + + tdSql.query(f"select cast({false_val} as bool) re, cast({true_val} as bool) re;") + tdSql.checkData(0, 0, false_val) + tdSql.checkData(0, 1, true_val) + + tdSql.query(f"select cast({false_val} as timestamp) re, cast({true_val} as timestamp) re;") + tdSql.checkData(0, 0, "1970-01-01 08:00:00.000") + tdSql.checkData(0, 1, "1970-01-01 08:00:00.001") + + tdSql.query(f"select cast({false_val} as varchar(3)) re, cast({true_val} as varchar(3)) re;") + tdSql.checkData(0, 0, "fal") + tdSql.checkData(0, 1, "tru") + + tdSql.query(f"select cast({false_val} as binary(3)) re, cast({true_val} as binary(3)) re;") + tdSql.checkData(0, 0, "fal") + tdSql.checkData(0, 1, "tru") + + tdSql.query(f"select cast({false_val} as nchar(3)) re, cast({true_val} as nchar(3)) re;") + tdSql.checkData(0, 0, "fal") + tdSql.checkData(0, 1, "tru") + + def cast_from_timestamp_to_other(self): + # ts = self._datetime_epoch + # tdSql.query(f"select cast({ts} as int) re;") + # tdSql.checkData(0, 0, None) + # todo + pass + + def cast_from_null_to_other(self): + tdSql.query(f"select cast(null as int) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as int unsigned) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as bigint) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as bigint unsigned) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as smallint) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as smallint unsigned) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as tinyint) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as tinyint unsigned) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as float) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as double) re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as bool) as re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as timestamp) as re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as varchar(55)) as re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as binary(5)) as re;") + tdSql.checkData(0, 0, None) + + tdSql.query(f"select cast(null as nchar(5));") + tdSql.checkData(0, 0, None) + + def cast_from_compute_to_other(self): + add1 = 123 + add2 = 456 + re = 579 + tdSql.query(f"select cast({add1}+{add2} as int) re;") + tdSql.checkData(0, 0, re) + + tdSql.query(f"select cast({add1}+{add2} as int unsigned) re;") + tdSql.checkData(0, 0, re) + + tdSql.query(f"select cast({add1}+{add2} as bigint) re;") + tdSql.checkData(0, 0, re) + + tdSql.query(f"select cast({add1}+{add2} as bigint unsigned) re;") + tdSql.checkData(0, 0, re) + + tdSql.query(f"select cast({add1}+{add2} as smallint) re;") + tdSql.checkData(0, 0, re) + + tdSql.query(f"select cast({add1}+{add2} as smallint unsigned) re;") + tdSql.checkData(0, 0, re) + + tdSql.query(f"select cast({add1}+{add2} as tinyint) re;") + tdSql.checkData(0, 0, 67) + + tdSql.query(f"select cast({add1}+{add2} as tinyint unsigned) re;") + tdSql.checkData(0, 0, 67) + + tdSql.query(f"select cast({add1}+{add2} as float) re;") + tdSql.checkData(0, 0, "579.0") + + tdSql.query(f"select cast({add1}+{add2} as double) re;") + tdSql.checkData(0, 0, "579.0") + + tdSql.query(f"select cast({add1}+{add2} as bool) as re;") + tdSql.checkData(0, 0, True) + + tdSql.query(f"select cast({add1}+{add2} as timestamp) as re;") + tdSql.checkData(0, 0, self._datetime_epoch + datetime.timedelta(seconds=int(re) / 1000)) + + tdSql.query(f"select cast({add1}+{add2} as varchar(2)) as re;") + tdSql.checkData(0, 0, "57") + + tdSql.query(f"select cast({add1}+{add2} as binary(2)) as re;") + tdSql.checkData(0, 0, "57") + + tdSql.query(f"select cast({add1}+{add2} as nchar(2));") + tdSql.checkData(0, 0, "57") + + test_str = "'!@#'" + tdSql.query(f"select cast({add1}+{test_str} as int) re;") + tdSql.checkData(0, 0, add1) + + tdSql.query(f"select cast({add1}+{test_str} as bigint) re;") + tdSql.checkData(0, 0, add1) + + tdSql.query(f"select cast({add1}+{test_str} as smallint) re;") + tdSql.checkData(0, 0, add1) + + tdSql.query(f"select cast({add1}+{test_str} as tinyint) re;") + tdSql.checkData(0, 0, add1) + + tdSql.query(f"select cast({add1}+{test_str} as float) re;") + tdSql.checkData(0, 0, "123.0") + + tdSql.query(f"select cast({add1}+{test_str} as double) re;") + tdSql.checkData(0, 0, "123.0") + + tdSql.query(f"select cast({add1}+{test_str} as bool) re;") + tdSql.checkData(0, 0, True) + + tdSql.query(f"select cast({add1}+{test_str} as timestamp) re;") + tdSql.checkData(0, 0, self._datetime_epoch + datetime.timedelta(seconds=int(add1) / 1000)) + + tdSql.query(f"select cast({add1}+{test_str} as varchar(2)) re;") + tdSql.checkData(0, 0, "12") + + tdSql.query(f"select cast({add1}+{test_str} as binary(2)) re;") + tdSql.checkData(0, 0, "12") + + tdSql.query(f"select cast({add1}+{test_str} as nchar(2)) re;") + tdSql.checkData(0, 0, "12") + + def cast_without_from(self): + self.cast_from_int_to_other() + self.cast_from_bigint_to_other() + self.cast_from_smallint_to_other() + self.cast_from_tinyint_to_other() + self.cast_from_float_to_other() + self.cast_from_str_to_other() + self.cast_from_bool_to_other() + self.cast_from_timestamp_to_other() + self.cast_from_compute_to_other() + # self.cast_from_null_to_other() def run(self): - # self.prepare_data() - # self.all_test() - # tdSql.execute(f"flush database {self.dbname}") - # self.all_test() + # 'from table' case see system-test/2-query/cast.py self.cast_without_from() tdLog.success(f"{__file__} successfully executed") From 42eb599d3501d5039181192d53ba56238ea106ba Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 17 Jul 2024 09:50:21 +0000 Subject: [PATCH 21/45] resolve comment --- source/dnode/mnode/sdb/src/sdbFile.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/dnode/mnode/sdb/src/sdbFile.c b/source/dnode/mnode/sdb/src/sdbFile.c index 2bad2ae40e..0952fbe7a3 100644 --- a/source/dnode/mnode/sdb/src/sdbFile.c +++ b/source/dnode/mnode/sdb/src/sdbFile.c @@ -290,7 +290,7 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { bufLen = pRaw->dataLen * 2; SSdbRaw *pNewRaw = taosMemoryMalloc(bufLen + 100); if (pNewRaw == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; mError("failed read sdb file since malloc new sdbRaw size:%d failed", bufLen); goto _OVER; } @@ -317,6 +317,10 @@ static int32_t sdbReadFileImp(SSdb *pSdb) { int32_t count = 0; char *plantContent = taosMemoryMalloc(ENCRYPTED_LEN(pRaw->dataLen)); + if (plantContent == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _OVER; + } SCryptOpts opts; opts.len = ENCRYPTED_LEN(pRaw->dataLen); @@ -360,8 +364,7 @@ _OVER: taosCloseFile(&pFile); sdbFreeRaw(pRaw); - terrno = code; - return code; + TAOS_RETURN(code); } int32_t sdbReadFile(SSdb *pSdb) { @@ -763,7 +766,7 @@ int32_t sdbDoWrite(SSdb *pSdb, SSdbIter *pIter, void *pBuf, int32_t len) { if (writelen != len) { code = TAOS_SYSTEM_ERROR(errno); mError("failed to write len:%d since %s, total:%" PRId64, len, tstrerror(code), pIter->total); - return -1; + TAOS_RETURN(code); } pIter->total += writelen; From aee48971de58a42d8c82d037584cc2cef336ee7d Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Wed, 17 Jul 2024 17:52:29 +0800 Subject: [PATCH 22/45] fix: taoshash put --- source/client/src/clientHb.c | 2 +- source/dnode/vnode/src/sma/smaRollup.c | 6 +++--- source/dnode/vnode/src/tq/tq.c | 2 +- source/dnode/vnode/src/tq/tqOffset.c | 2 +- source/libs/parser/src/parTranslater.c | 2 +- source/libs/stream/src/streamMeta.c | 2 +- source/util/src/thash.c | 29 +++++++++++++------------- 7 files changed, 22 insertions(+), 23 deletions(-) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index a7d459ff31..e45ca2b872 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -744,7 +744,7 @@ static int32_t hbGetUserAuthInfo(SClientHbKey *connKey, SHbParam *param, SClient req->info = taosHashInit(64, hbKeyHashFunc, 1, HASH_ENTRY_LOCK); } - if (taosHashPut(req->info, &kv.key, sizeof(kv.key), &kv, sizeof(kv)) < 0) { + if (taosHashPut(req->info, &kv.key, sizeof(kv.key), &kv, sizeof(kv)) != 0) { taosMemoryFree(user); code = terrno ? terrno : TSDB_CODE_APP_ERROR; goto _return; diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index a48188430f..37b7ed944f 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -407,7 +407,7 @@ int32_t tdRSmaProcessCreateImpl(SSma *pSma, SRSmaParam *param, int64_t suid, con goto _err; } - if (taosHashPut(RSMA_INFO_HASH(pStat), &suid, sizeof(tb_uid_t), &pRSmaInfo, sizeof(pRSmaInfo)) < 0) { + if (taosHashPut(RSMA_INFO_HASH(pStat), &suid, sizeof(tb_uid_t), &pRSmaInfo, sizeof(pRSmaInfo)) != 0) { goto _err; } @@ -533,12 +533,12 @@ static int32_t tdUidStorePut(STbUidStore *pStore, tb_uid_t suid, tb_uid_t *uid) taosArrayDestroy(pUidArray); return TSDB_CODE_FAILED; } - if (taosHashPut(pStore->uidHash, &suid, sizeof(suid), &pUidArray, sizeof(pUidArray)) < 0) { + if (taosHashPut(pStore->uidHash, &suid, sizeof(suid), &pUidArray, sizeof(pUidArray)) != 0) { return TSDB_CODE_FAILED; } } } else { - if (taosHashPut(pStore->uidHash, &suid, sizeof(suid), NULL, 0) < 0) { + if (taosHashPut(pStore->uidHash, &suid, sizeof(suid), NULL, 0) != 0) { return TSDB_CODE_FAILED; } } diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index ac57a003c5..7daf807c27 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -612,7 +612,7 @@ int32_t tqProcessAddCheckInfoReq(STQ* pTq, int64_t sversion, char* msg, int32_t return -1; } tDecoderClear(&decoder); - if (taosHashPut(pTq->pCheckInfo, info.topic, strlen(info.topic), &info, sizeof(STqCheckInfo)) < 0) { + if (taosHashPut(pTq->pCheckInfo, info.topic, strlen(info.topic), &info, sizeof(STqCheckInfo)) != 0) { terrno = TSDB_CODE_OUT_OF_MEMORY; return -1; } diff --git a/source/dnode/vnode/src/tq/tqOffset.c b/source/dnode/vnode/src/tq/tqOffset.c index 8b0e039ad5..4456359717 100644 --- a/source/dnode/vnode/src/tq/tqOffset.c +++ b/source/dnode/vnode/src/tq/tqOffset.c @@ -74,7 +74,7 @@ int32_t tqOffsetRestoreFromFile(STqOffsetStore* pStore, const char* fname) { } tDecoderClear(&decoder); - if (taosHashPut(pStore->pHash, offset.subKey, strlen(offset.subKey), &offset, sizeof(STqOffset)) < 0) { + if (taosHashPut(pStore->pHash, offset.subKey, strlen(offset.subKey), &offset, sizeof(STqOffset)) != 0) { return -1; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 104ffcc945..4684e4a62c 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -12753,7 +12753,7 @@ static int32_t buildTagIndexForBindTags(SMsgBuf* pMsgBuf, SCreateSubTableFromFil if (code) break; - if (taosHashPut(pIdxHash, &idx, sizeof(idx), NULL, 0) < 0) { + if (taosHashPut(pIdxHash, &idx, sizeof(idx), NULL, 0) != 0) { code = terrno; goto _OUT; } diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index d0b1f6ca93..3ef5a4ac10 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -922,7 +922,7 @@ void streamMetaLoadAllTasks(SStreamMeta* pMeta) { continue; } - if (taosHashPut(pMeta->pTasksMap, &id, sizeof(id), &pTask, POINTER_BYTES) < 0) { + if (taosHashPut(pMeta->pTasksMap, &id, sizeof(id), &pTask, POINTER_BYTES) != 0) { stError("s-task:0x%x failed to put into hashTable, code:%s, continue", pTask->id.taskId, tstrerror(terrno)); taosArrayPop(pMeta->pTaskList); tFreeStreamTask(pTask); diff --git a/source/util/src/thash.c b/source/util/src/thash.c index 8c0ca3e5a7..54fb9ade93 100644 --- a/source/util/src/thash.c +++ b/source/util/src/thash.c @@ -316,7 +316,7 @@ int32_t taosHashGetSize(const SHashObj *pHashObj) { int32_t taosHashPut(SHashObj *pHashObj, const void *key, size_t keyLen, const void *data, size_t size) { if (pHashObj == NULL || key == NULL || keyLen == 0) { terrno = TSDB_CODE_INVALID_PTR; - return -1; + return TSDB_CODE_INVALID_PTR; } uint32_t hashVal = (*pHashObj->hashFp)(key, (uint32_t)keyLen); @@ -331,6 +331,7 @@ int32_t taosHashPut(SHashObj *pHashObj, const void *key, size_t keyLen, const vo // disable resize taosHashRLock(pHashObj); + int32_t code = TSDB_CODE_SUCCESS; uint32_t slot = HASH_INDEX(hashVal, pHashObj->capacity); SHashEntry *pe = pHashObj->hashList[slot]; @@ -352,36 +353,34 @@ int32_t taosHashPut(SHashObj *pHashObj, const void *key, size_t keyLen, const vo // no data in hash table with the specified key, add it into hash table SHashNode *pNewNode = doCreateHashNode(key, keyLen, data, size, hashVal); if (pNewNode == NULL) { - return -1; + terrno = TSDB_CODE_OUT_OF_MEMORY; + code = terrno; + goto _exit; } pushfrontNodeInEntryList(pe, pNewNode); - taosHashEntryWUnlock(pHashObj, pe); - - // enable resize - taosHashRUnlock(pHashObj); atomic_add_fetch_64(&pHashObj->size, 1); - - return 0; } else { // not support the update operation, return error if (pHashObj->enableUpdate) { SHashNode *pNewNode = doCreateHashNode(key, keyLen, data, size, hashVal); if (pNewNode == NULL) { - return -1; + terrno = TSDB_CODE_OUT_OF_MEMORY; + code = terrno; + goto _exit; } doUpdateHashNode(pHashObj, pe, prev, pNode, pNewNode); } else { terrno = TSDB_CODE_DUP_KEY; + code = terrno; + goto _exit; } - - taosHashEntryWUnlock(pHashObj, pe); - - // enable resize - taosHashRUnlock(pHashObj); - return pHashObj->enableUpdate ? 0 : -2; } +_exit: + taosHashEntryWUnlock(pHashObj, pe); + taosHashRUnlock(pHashObj); + return code; } static void *taosHashGetImpl(SHashObj *pHashObj, const void *key, size_t keyLen, void **d, int32_t *size, bool addRef); From 2b00d6549dfa7328fd0cf0e566b070a5fc38c7f4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 17:57:08 +0800 Subject: [PATCH 23/45] refactor: check return value for each function. --- source/libs/stream/inc/streamInt.h | 15 +++++---- source/libs/stream/src/streamCheckpoint.c | 7 ++-- source/libs/stream/src/streamData.c | 39 +++++++++++------------ source/libs/stream/src/streamDispatch.c | 8 +++-- source/libs/stream/src/streamExec.c | 15 ++++++--- source/libs/stream/src/streamHb.c | 12 +++---- source/libs/stream/src/streamMeta.c | 8 ++--- 7 files changed, 54 insertions(+), 50 deletions(-) diff --git a/source/libs/stream/inc/streamInt.h b/source/libs/stream/inc/streamInt.h index 3027abc4be..ae74ed204e 100644 --- a/source/libs/stream/inc/streamInt.h +++ b/source/libs/stream/inc/streamInt.h @@ -169,11 +169,12 @@ int32_t streamDispatchStreamBlock(SStreamTask* pTask); void destroyDispatchMsg(SStreamDispatchReq* pReq, int32_t numOfVgroups); void clearBufferedDispatchMsg(SStreamTask* pTask); -int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock* pBlock); -SStreamDataBlock* createStreamBlockFromDispatchMsg(const SStreamDispatchReq* pReq, int32_t blockType, int32_t srcVg); -SStreamDataBlock* createStreamBlockFromResults(SStreamQueueItem* pItem, SStreamTask* pTask, int64_t resultSize, - SArray* pRes); -void destroyStreamDataBlock(SStreamDataBlock* pBlock); +int32_t streamProcessCheckpointTriggerBlock(SStreamTask* pTask, SStreamDataBlock* pBlock); +int32_t createStreamBlockFromDispatchMsg(const SStreamDispatchReq* pReq, int32_t blockType, int32_t srcVg, + SStreamDataBlock** pBlock); +int32_t createStreamBlockFromResults(SStreamQueueItem* pItem, SStreamTask* pTask, int64_t resultSize, SArray* pRes, + SStreamDataBlock** pBlock); +void destroyStreamDataBlock(SStreamDataBlock* pBlock); int32_t streamRetrieveReqToData(const SStreamRetrieveReq* pReq, SStreamDataBlock* pData, const char* idstr); int32_t streamBroadcastToUpTasks(SStreamTask* pTask, const SSDataBlock* pBlock); @@ -214,8 +215,8 @@ int32_t streamQueueGetItemSize(const SStreamQueue* pQueue); void streamMetaRemoveDB(void* arg, char* key); void streamMetaHbToMnode(void* param, void* tmrId); -SMetaHbInfo* createMetaHbInfo(int64_t* pRid); -void* destroyMetaHbInfo(SMetaHbInfo* pInfo); +int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes); +void destroyMetaHbInfo(SMetaHbInfo* pInfo); void streamMetaWaitForHbTmrQuit(SStreamMeta* pMeta); void streamMetaGetHbSendInfo(SMetaHbInfo* pInfo, int64_t* pStartTs, int32_t* pSendCount); int32_t streamMetaSendHbHelper(SStreamMeta* pMeta); diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index d0ad38ea79..8de923e900 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -29,10 +29,9 @@ static int32_t appendCheckpointIntoInputQ(SStreamTask* pTask, int32_t checkpoint static int32_t doSendRetrieveTriggerMsg(SStreamTask* pTask, SArray* pNotSendList); static void checkpointTriggerMonitorFn(void* param, void* tmrId); -int32_t createChkptTriggerBlock(SStreamTask* pTask, int32_t checkpointType, int64_t checkpointId, - int32_t transId, int32_t srcTaskId) { - SStreamDataBlock* pChkpoint; - +int32_t createChkptTriggerBlock(SStreamTask* pTask, int32_t checkpointType, int64_t checkpointId, int32_t transId, + int32_t srcTaskId, SStreamDataBlock** pRes) { + SStreamDataBlock* pChkpoint = NULL; int32_t code = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, sizeof(SSDataBlock), (void**)&pChkpoint); if (code) { return code; diff --git a/source/libs/stream/src/streamData.c b/source/libs/stream/src/streamData.c index bf499293b4..4235b6c1bb 100644 --- a/source/libs/stream/src/streamData.c +++ b/source/libs/stream/src/streamData.c @@ -15,13 +15,11 @@ #include "streamInt.h" -SStreamDataBlock* createStreamBlockFromDispatchMsg(const SStreamDispatchReq* pReq, int32_t blockType, int32_t srcVg) { - SStreamDataBlock* pData; - +int32_t createStreamBlockFromDispatchMsg(const SStreamDispatchReq* pReq, int32_t blockType, int32_t srcVg, SStreamDataBlock** pRes) { + SStreamDataBlock* pData = NULL; int32_t code = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, pReq->totalLen, (void**)&pData); if (code) { - terrno = code; - return NULL; + return terrno = code; } pData->type = blockType; @@ -32,7 +30,7 @@ SStreamDataBlock* createStreamBlockFromDispatchMsg(const SStreamDispatchReq* pRe SArray* pArray = taosArrayInit_s(sizeof(SSDataBlock), blockNum); if (pArray == NULL) { taosFreeQitem(pData); - return NULL; + return code; } ASSERT((pReq->blockNum == taosArrayGetSize(pReq->data)) && (pReq->blockNum == taosArrayGetSize(pReq->dataLen))); @@ -69,37 +67,36 @@ SStreamDataBlock* createStreamBlockFromDispatchMsg(const SStreamDispatchReq* pRe } pData->blocks = pArray; - return pData; + *pRes = pData; + + return code; } -SStreamDataBlock* createStreamBlockFromResults(SStreamQueueItem* pItem, SStreamTask* pTask, int64_t resultSize, - SArray* pRes) { - SStreamDataBlock* pStreamBlocks; - - int32_t code = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, resultSize, (void**)&pStreamBlocks); +int32_t createStreamBlockFromResults(SStreamQueueItem* pItem, SStreamTask* pTask, int64_t resultSize, SArray* pRes, + SStreamDataBlock** pBlock) { + int32_t code = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, resultSize, (void**)pBlock); if (code) { taosArrayClearEx(pRes, (FDelete)blockDataFreeRes); - terrno = code; - return NULL; + return terrno = code; } - pStreamBlocks->srcTaskId = pTask->id.taskId; - pStreamBlocks->type = STREAM_INPUT__DATA_BLOCK; - pStreamBlocks->blocks = pRes; + (*pBlock)->srcTaskId = pTask->id.taskId; + (*pBlock)->type = STREAM_INPUT__DATA_BLOCK; + (*pBlock)->blocks = pRes; if (pItem == NULL) { - return pStreamBlocks; + return code; } if (pItem->type == STREAM_INPUT__DATA_SUBMIT) { SStreamDataSubmit* pSubmit = (SStreamDataSubmit*)pItem; - pStreamBlocks->sourceVer = pSubmit->ver; + (*pBlock)->sourceVer = pSubmit->ver; } else if (pItem->type == STREAM_INPUT__MERGED_SUBMIT) { SStreamMergedSubmit* pMerged = (SStreamMergedSubmit*)pItem; - pStreamBlocks->sourceVer = pMerged->ver; + (*pBlock)->sourceVer = pMerged->ver; } - return pStreamBlocks; + return code; } void destroyStreamDataBlock(SStreamDataBlock* pBlock) { diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c index 2023da43ad..9e4b6bc09d 100644 --- a/source/libs/stream/src/streamDispatch.c +++ b/source/libs/stream/src/streamDispatch.c @@ -1408,8 +1408,10 @@ static int32_t buildDispatchRsp(const SStreamTask* pTask, const SStreamDispatchR static int32_t streamTaskAppendInputBlocks(SStreamTask* pTask, const SStreamDispatchReq* pReq) { int8_t status = 0; - SStreamDataBlock* pBlock = createStreamBlockFromDispatchMsg(pReq, pReq->type, pReq->srcVgId); - if (pBlock == NULL) { + SStreamDataBlock* pBlock = NULL; + + int32_t code = createStreamBlockFromDispatchMsg(pReq, pReq->type, pReq->srcVgId, &pBlock); + if (code) { streamTaskInputFail(pTask); status = TASK_INPUT_STATUS__FAILED; stError("vgId:%d, s-task:%s failed to receive dispatch msg, reason: out of memory", pTask->pMeta->vgId, @@ -1419,7 +1421,7 @@ static int32_t streamTaskAppendInputBlocks(SStreamTask* pTask, const SStreamDisp pTask->status.appendTranstateBlock = true; } - int32_t code = streamTaskPutDataIntoInputQ(pTask, (SStreamQueueItem*)pBlock); + code = streamTaskPutDataIntoInputQ(pTask, (SStreamQueueItem*)pBlock); // input queue is full, upstream is blocked now status = (code == TSDB_CODE_SUCCESS) ? TASK_INPUT_STATUS__NORMAL : TASK_INPUT_STATUS__BLOCKED; } diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index b2c491de05..238db27d60 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -67,8 +67,10 @@ static int32_t doDumpResult(SStreamTask* pTask, SStreamQueueItem* pItem, SArray* return TSDB_CODE_SUCCESS; } - SStreamDataBlock* pStreamBlocks = createStreamBlockFromResults(pItem, pTask, size, pRes); - if (pStreamBlocks == NULL) { + SStreamDataBlock* pStreamBlocks = NULL; + + int32_t code = createStreamBlockFromResults(pItem, pTask, size, pRes, &pStreamBlocks); + if (code) { stError("s-task:%s failed to create result stream data block, code:%s", pTask->id.idStr, tstrerror(terrno)); taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes); return TSDB_CODE_OUT_OF_MEMORY; @@ -77,7 +79,7 @@ static int32_t doDumpResult(SStreamTask* pTask, SStreamQueueItem* pItem, SArray* stDebug("s-task:%s dump stream result data blocks, num:%d, size:%.2fMiB", pTask->id.idStr, numOfBlocks, SIZE_IN_MiB(size)); - int32_t code = doOutputResultBlockImpl(pTask, pStreamBlocks); + code = doOutputResultBlockImpl(pTask, pStreamBlocks); if (code != TSDB_CODE_SUCCESS) { // back pressure and record position return code; } @@ -187,7 +189,12 @@ int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, int64_t* static int32_t handleSanhistoryResultBlocks(SStreamTask* pTask, SArray* pRes, int32_t size) { int32_t code = TSDB_CODE_SUCCESS; if (taosArrayGetSize(pRes) > 0) { - SStreamDataBlock* pStreamBlocks = createStreamBlockFromResults(NULL, pTask, size, pRes); + SStreamDataBlock* pStreamBlocks = NULL; + code = createStreamBlockFromResults(NULL, pTask, size, pRes, &pStreamBlocks); + if (code) { + return code; + } + code = doOutputResultBlockImpl(pTask, pStreamBlocks); if (code != TSDB_CODE_SUCCESS) { // should not have error code stError("s-task:%s dump fill-history results failed, code:%s", pTask->id.idStr, tstrerror(code)); diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index 16cb23de10..d8ee15c909 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -275,11 +275,11 @@ void streamMetaHbToMnode(void* param, void* tmrId) { taosReleaseRef(streamMetaId, rid); } -SMetaHbInfo* createMetaHbInfo(int64_t* pRid) { +int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes) { + *pRes = NULL; SMetaHbInfo* pInfo = taosMemoryCalloc(1, sizeof(SMetaHbInfo)); if (pInfo == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return pInfo; + return TSDB_CODE_OUT_OF_MEMORY; } pInfo->hbTmr = taosTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, pRid, streamTimer); @@ -287,10 +287,10 @@ SMetaHbInfo* createMetaHbInfo(int64_t* pRid) { pInfo->stopFlag = 0; pInfo->msgSendTs = -1; pInfo->hbCount = 0; - return pInfo; + return TSDB_CODE_SUCCESS; } -void* destroyMetaHbInfo(SMetaHbInfo* pInfo) { +void destroyMetaHbInfo(SMetaHbInfo* pInfo) { if (pInfo != NULL) { tCleanupStreamHbMsg(&pInfo->hbMsg); @@ -301,8 +301,6 @@ void* destroyMetaHbInfo(SMetaHbInfo* pInfo) { taosMemoryFree(pInfo); } - - return NULL; } void streamMetaWaitForHbTmrQuit(SStreamMeta* pMeta) { diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 3940866488..d9c937a14f 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -402,9 +402,8 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn, memcpy(pRid, &pMeta->rid, sizeof(pMeta->rid)); metaRefMgtAdd(pMeta->vgId, pRid); - pMeta->pHbInfo = createMetaHbInfo(pRid); - if (pMeta->pHbInfo == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; + code = createMetaHbInfo(pRid, &pMeta->pHbInfo); + if (code != TSDB_CODE_SUCCESS) { goto _err; } @@ -538,7 +537,8 @@ void streamMetaCloseImpl(void* arg) { taosHashCleanup(pMeta->startInfo.pReadyTaskSet); taosHashCleanup(pMeta->startInfo.pFailedTaskSet); - pMeta->pHbInfo = destroyMetaHbInfo(pMeta->pHbInfo); + destroyMetaHbInfo(pMeta->pHbInfo); + pMeta->pHbInfo = NULL; taosMemoryFree(pMeta->path); taosThreadMutexDestroy(&pMeta->backendMutex); From b35d107bf9930cdaa808eb70c05bc0b49842c0f3 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 18:55:04 +0800 Subject: [PATCH 24/45] refactor: check return value for each function. --- source/libs/stream/inc/streamInt.h | 33 ++--- source/libs/stream/src/streamData.c | 20 ++- source/libs/stream/src/streamQueue.c | 29 ++-- source/libs/stream/src/streamTask.c | 10 +- source/libs/stream/src/streamTaskSm.c | 202 +++++++++++++++----------- 5 files changed, 167 insertions(+), 127 deletions(-) diff --git a/source/libs/stream/inc/streamInt.h b/source/libs/stream/inc/streamInt.h index ae74ed204e..fd248861e3 100644 --- a/source/libs/stream/inc/streamInt.h +++ b/source/libs/stream/inc/streamInt.h @@ -161,8 +161,7 @@ extern int32_t streamMetaId; int32_t streamTimerInit(); void streamTimerCleanUp(); - -void initRpcMsg(SRpcMsg* pMsg, int32_t msgType, void* pCont, int32_t contLen); +void initRpcMsg(SRpcMsg* pMsg, int32_t msgType, void* pCont, int32_t contLen); void streamStartMonitorDispatchData(SStreamTask* pTask, int64_t waitDuration); int32_t streamDispatchStreamBlock(SStreamTask* pTask); @@ -202,24 +201,24 @@ EExtractDataCode streamTaskGetDataFromInputQ(SStreamTask* pTask, SStreamQueueIt int32_t streamQueueItemGetSize(const SStreamQueueItem* pItem); void streamQueueItemIncSize(const SStreamQueueItem* pItem, int32_t size); const char* streamQueueItemGetTypeStr(int32_t type); -SStreamQueueItem* streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueItem* pElem); +int32_t streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueItem* pElem, SStreamQueueItem** pRes); int32_t streamTransferStatePrepare(SStreamTask* pTask); -SStreamQueue* streamQueueOpen(int64_t cap); -void streamQueueClose(SStreamQueue* pQueue, int32_t taskId); -void streamQueueProcessSuccess(SStreamQueue* queue); -void streamQueueProcessFail(SStreamQueue* queue); -void* streamQueueNextItem(SStreamQueue* pQueue); -void streamFreeQitem(SStreamQueueItem* data); -int32_t streamQueueGetItemSize(const SStreamQueue* pQueue); +int32_t streamQueueOpen(int64_t cap, SStreamQueue** pQ); +void streamQueueClose(SStreamQueue* pQueue, int32_t taskId); +void streamQueueProcessSuccess(SStreamQueue* queue); +void streamQueueProcessFail(SStreamQueue* queue); +void* streamQueueNextItem(SStreamQueue* pQueue); +void streamFreeQitem(SStreamQueueItem* data); +int32_t streamQueueGetItemSize(const SStreamQueue* pQueue); -void streamMetaRemoveDB(void* arg, char* key); -void streamMetaHbToMnode(void* param, void* tmrId); -int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes); -void destroyMetaHbInfo(SMetaHbInfo* pInfo); -void streamMetaWaitForHbTmrQuit(SStreamMeta* pMeta); -void streamMetaGetHbSendInfo(SMetaHbInfo* pInfo, int64_t* pStartTs, int32_t* pSendCount); -int32_t streamMetaSendHbHelper(SStreamMeta* pMeta); +void streamMetaRemoveDB(void* arg, char* key); +void streamMetaHbToMnode(void* param, void* tmrId); +int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes); +void destroyMetaHbInfo(SMetaHbInfo* pInfo); +void streamMetaWaitForHbTmrQuit(SStreamMeta* pMeta); +void streamMetaGetHbSendInfo(SMetaHbInfo* pInfo, int64_t* pStartTs, int32_t* pSendCount); +int32_t streamMetaSendHbHelper(SStreamMeta* pMeta); ECHECKPOINT_BACKUP_TYPE streamGetCheckpointBackupType(); diff --git a/source/libs/stream/src/streamData.c b/source/libs/stream/src/streamData.c index 4235b6c1bb..af4946cf81 100644 --- a/source/libs/stream/src/streamData.c +++ b/source/libs/stream/src/streamData.c @@ -185,8 +185,8 @@ int32_t streamMergeSubmit(SStreamMergedSubmit* pMerged, SStreamDataSubmit* pSubm } // todo handle memory error -SStreamQueueItem* streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueItem* pElem) { - terrno = 0; +int32_t streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueItem* pElem, SStreamQueueItem** pRes) { + *pRes = NULL; if (dst->type == STREAM_INPUT__DATA_BLOCK && pElem->type == STREAM_INPUT__DATA_BLOCK) { SStreamDataBlock* pBlock = (SStreamDataBlock*)dst; @@ -196,7 +196,8 @@ SStreamQueueItem* streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueI streamQueueItemIncSize(dst, streamQueueItemGetSize(pElem)); taosFreeQitem(pElem); - return dst; + *pRes = dst; + return TSDB_CODE_SUCCESS; } else if (dst->type == STREAM_INPUT__MERGED_SUBMIT && pElem->type == STREAM_INPUT__DATA_SUBMIT) { SStreamMergedSubmit* pMerged = (SStreamMergedSubmit*)dst; SStreamDataSubmit* pBlockSrc = (SStreamDataSubmit*)pElem; @@ -204,12 +205,13 @@ SStreamQueueItem* streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueI streamQueueItemIncSize(dst, streamQueueItemGetSize(pElem)); taosFreeQitem(pElem); - return dst; + *pRes = dst; + *pRes = dst; + return TSDB_CODE_SUCCESS; } else if (dst->type == STREAM_INPUT__DATA_SUBMIT && pElem->type == STREAM_INPUT__DATA_SUBMIT) { SStreamMergedSubmit* pMerged = streamMergedSubmitNew(); if (pMerged == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } streamQueueItemIncSize((SStreamQueueItem*)pMerged, streamQueueItemGetSize(pElem)); @@ -219,11 +221,13 @@ SStreamQueueItem* streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueI taosFreeQitem(dst); taosFreeQitem(pElem); - return (SStreamQueueItem*)pMerged; + + *pRes = (SStreamQueueItem*)pMerged; + return TSDB_CODE_SUCCESS; } else { stDebug("block type:%s not merged with existed blocks list, type:%d", streamQueueItemGetTypeStr(pElem->type), dst->type); - return NULL; + return TSDB_CODE_FAILED; } } diff --git a/source/libs/stream/src/streamQueue.c b/source/libs/stream/src/streamQueue.c index 7bc50417bd..b8cdcd4cf5 100644 --- a/source/libs/stream/src/streamQueue.c +++ b/source/libs/stream/src/streamQueue.c @@ -41,34 +41,34 @@ static void streamQueueCleanup(SStreamQueue* pQueue) { static void* streamQueueCurItem(SStreamQueue* queue) { return queue->qItem; } -SStreamQueue* streamQueueOpen(int64_t cap) { - int32_t code; +int32_t streamQueueOpen(int64_t cap, SStreamQueue** pQ) { + *pQ = NULL; + int32_t code = 0; SStreamQueue* pQueue = taosMemoryCalloc(1, sizeof(SStreamQueue)); if (pQueue == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - return NULL; + return TSDB_CODE_OUT_OF_MEMORY; } code = taosOpenQueue(&pQueue->pQueue); if (code) { taosMemoryFreeClear(pQueue); - terrno = code; - return NULL; + return code; } code = taosAllocateQall(&pQueue->qall); if (code) { taosCloseQueue(pQueue->pQueue); taosMemoryFree(pQueue); - terrno = code; - return NULL; + return code; } pQueue->status = STREAM_QUEUE__SUCESS; taosSetQueueCapacity(pQueue->pQueue, cap); taosSetQueueMemoryCapacity(pQueue->pQueue, cap * 1024); - return pQueue; + + *pQ = pQueue; + return code; } void streamQueueClose(SStreamQueue* pQueue, int32_t taskId) { @@ -227,12 +227,11 @@ EExtractDataCode streamTaskGetDataFromInputQ(SStreamTask* pTask, SStreamQueueIte *pInput = qItem; } else { // merge current block failed, let's handle the already merged blocks. - void* newRet = streamQueueMergeQueueItem(*pInput, qItem); - if (newRet == NULL) { - if (terrno != 0) { - stError("s-task:%s failed to merge blocks from inputQ, numOfBlocks:%d, code:%s", id, *numOfBlocks, - tstrerror(terrno)); - } + void* newRet = NULL; + int32_t code = streamQueueMergeQueueItem(*pInput, qItem, (SStreamQueueItem**)&newRet); + if (code != TSDB_CODE_SUCCESS) { + stError("s-task:%s failed to merge blocks from inputQ, numOfBlocks:%d, code:%s", id, *numOfBlocks, + tstrerror(terrno)); *blockSize = streamQueueItemGetSize(*pInput); if (taskLevel == TASK_LEVEL__SINK) { diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 11eea98e98..39e12a9da7 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -366,9 +366,9 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i pTask->inputq.status = TASK_INPUT_STATUS__NORMAL; pTask->outputq.status = TASK_OUTPUT_STATUS__NORMAL; - pTask->inputq.queue = streamQueueOpen(512 << 10); - pTask->outputq.queue = streamQueueOpen(512 << 10); - if (pTask->inputq.queue == NULL || pTask->outputq.queue == NULL) { + int32_t code1 = streamQueueOpen(512 << 10, &pTask->inputq.queue); + int32_t code2 = streamQueueOpen(512 << 10, &pTask->outputq.queue); + if (code1 || code2) { stError("s-task:%s failed to prepare the input/output queue, initialize task failed", pTask->id.idStr); return TSDB_CODE_OUT_OF_MEMORY; } @@ -379,8 +379,8 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i int32_t code = streamCreateStateMachine(pTask); if (pTask->status.pSM == NULL || code != TSDB_CODE_SUCCESS) { stError("s-task:%s failed create state-machine for stream task, initialization failed, code:%s", pTask->id.idStr, - tstrerror(terrno)); - return terrno; + tstrerror(code)); + return code; } pTask->execInfo.created = taosGetTimestampMs(); diff --git a/source/libs/stream/src/streamTaskSm.c b/source/libs/stream/src/streamTaskSm.c index 1af47cf43f..7e47857a39 100644 --- a/source/libs/stream/src/streamTaskSm.c +++ b/source/libs/stream/src/streamTaskSm.c @@ -20,7 +20,17 @@ #include "ttimer.h" #include "wal.h" +static int32_t initRes = 0; + #define GET_EVT_NAME(_ev) (StreamTaskEventList[(_ev)].name) +#define CHECK_RET_VAL(_exec) \ + do { \ + void* p = (_exec); \ + if (p == NULL) { \ + initRes = TSDB_CODE_OUT_OF_MEMORY; \ + return; \ + } \ + } while (0); SStreamTaskState StreamTaskStatusList[9] = { {.state = TASK_STATUS__READY, .name = "ready"}, @@ -73,10 +83,17 @@ static int32_t attachWaitedEvent(SStreamTask* pTask, SFutureHandleEventInfo* pEv GET_EVT_NAME(pEvtInfo->event), StreamTaskStatusList[pEvtInfo->status].name); SArray* pList = pTask->status.pSM->pWaitingEventList; - taosArrayPush(pList, pEvtInfo); - stDebug("s-task:%s add into waiting list, total waiting events:%d", pTask->id.idStr, (int32_t)taosArrayGetSize(pList)); - return 0; + void* px = taosArrayPush(pList, pEvtInfo); + if (px == NULL) { + stError("s-task:%s failed to add into waiting list, total waiting events:%d, code: out of memory", pTask->id.idStr, + (int32_t)taosArrayGetSize(pList)); + return TSDB_CODE_OUT_OF_MEMORY; + } else { + stDebug("s-task:%s add into waiting list, total waiting events:%d", pTask->id.idStr, + (int32_t)taosArrayGetSize(pList)); + return TSDB_CODE_SUCCESS; + } } static int32_t stopTaskSuccFn(SStreamTask* pTask) { @@ -177,14 +194,14 @@ static int32_t doHandleWaitingEvent(SStreamTaskSM* pSM, const char* pEventName, GET_EVT_NAME(pEvtInfo->event), pSM->current.name); // remove it - taosArrayPop(pSM->pWaitingEventList); + (void) taosArrayPop(pSM->pWaitingEventList); STaskStateTrans* pNextTrans = streamTaskFindTransform(pSM->current.state, pEvtInfo->event); ASSERT(pSM->pActiveTrans == NULL && pNextTrans != NULL); pSM->pActiveTrans = pNextTrans; pSM->startTs = taosGetTimestampMs(); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); code = pNextTrans->pAction(pSM->pTask); if (pNextTrans->autoInvokeEndFn) { @@ -193,7 +210,7 @@ static int32_t doHandleWaitingEvent(SStreamTaskSM* pSM, const char* pEventName, return code; } } else { - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); stDebug("s-task:%s state:%s event:%s in waiting list, req state:%s not fulfilled, put it back", pTask->id.idStr, pSM->current.name, GET_EVT_NAME(pEvtInfo->event), StreamTaskStatusList[pEvtInfo->status].name); @@ -228,9 +245,9 @@ static int32_t removeEventInWaitingList(SStreamTask* pTask, EStreamTaskEvent eve int32_t streamTaskRestoreStatus(SStreamTask* pTask) { SStreamTaskSM* pSM = pTask->status.pSM; - int32_t code = 0; + int32_t code = 0; - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); if (pSM->current.state == TASK_STATUS__PAUSE && pSM->pActiveTrans == NULL) { SStreamTaskState state = pSM->current; @@ -244,21 +261,25 @@ int32_t streamTaskRestoreStatus(SStreamTask* pTask) { if (taosArrayGetSize(pSM->pWaitingEventList) > 0) { stDebug("s-task:%s restore status, %s -> %s, and then handle waiting event", pTask->id.idStr, pSM->prev.state.name, pSM->current.name); - doHandleWaitingEvent(pSM, "restore-pause/halt", pTask); + code = doHandleWaitingEvent(pSM, "restore-pause/halt", pTask); } else { stDebug("s-task:%s restore status, %s -> %s", pTask->id.idStr, pSM->prev.state.name, pSM->current.name); } } else { - removeEventInWaitingList(pTask, TASK_EVENT_PAUSE); - code = -1; // failed to restore the status + (void)removeEventInWaitingList(pTask, TASK_EVENT_PAUSE); // ignore the return value, + code = TSDB_CODE_FAILED; // failed to restore the status, since it is not in pause status } - taosThreadMutexUnlock(&pTask->lock); + (void)taosThreadMutexUnlock(&pTask->lock); return code; } int32_t streamCreateStateMachine(SStreamTask* pTask) { - initStateTransferTable(); + int32_t code = initStateTransferTable(); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + const char* id = pTask->id.idStr; SStreamTaskSM* pSM = taosMemoryCalloc(1, sizeof(SStreamTaskSM)); @@ -297,16 +318,21 @@ void streamDestroyStateMachine(SStreamTaskSM* pSM) { static int32_t doHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event, STaskStateTrans* pTrans) { SStreamTask* pTask = pSM->pTask; const char* id = pTask->id.idStr; + int32_t code = 0; if (pTrans->attachEvent.event != 0) { - attachWaitedEvent(pTask, &pTrans->attachEvent); - taosThreadMutexUnlock(&pTask->lock); + code = attachWaitedEvent(pTask, &pTrans->attachEvent); + if (code) { + return code; + } + + (void) taosThreadMutexUnlock(&pTask->lock); while (1) { // wait for the task to be here - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); ETaskStatus s = streamTaskGetStatus(pTask).state; - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); if ((s == pTrans->next.state) && (pSM->prev.evt == pTrans->event)) {// this event has been handled already stDebug("s-task:%s attached event:%s handled", id, GET_EVT_NAME(pTrans->event)); @@ -323,42 +349,49 @@ static int32_t doHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event, STaskSt } else { // override current active trans pSM->pActiveTrans = pTrans; pSM->startTs = taosGetTimestampMs(); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); - int32_t code = pTrans->pAction(pTask); - // todo handle error code; + code = pTrans->pAction(pTask); if (pTrans->autoInvokeEndFn) { - streamTaskOnHandleEventSuccess(pSM, event, NULL, NULL); + int32_t c = streamTaskOnHandleEventSuccess(pSM, event, NULL, NULL); + if (code == TSDB_CODE_SUCCESS) { + code = c; + } } } - return TSDB_CODE_SUCCESS; + return code; } static int32_t doHandleEventAsync(SStreamTaskSM* pSM, EStreamTaskEvent event, STaskStateTrans* pTrans, __state_trans_user_fn callbackFn, void* param) { SStreamTask* pTask = pSM->pTask; + int32_t code = 0; + if (pTrans->attachEvent.event != 0) { SFutureHandleEventInfo info = pTrans->attachEvent; info.pParam = param; info.callBackFn = callbackFn; - attachWaitedEvent(pTask, &info); - taosThreadMutexUnlock(&pTask->lock); + code = attachWaitedEvent(pTask, &info); + (void) taosThreadMutexUnlock(&pTask->lock); } else { // override current active trans pSM->pActiveTrans = pTrans; pSM->startTs = taosGetTimestampMs(); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); - int32_t code = pTrans->pAction(pTask); + code = pTrans->pAction(pTask); // todo handle error code; if (pTrans->autoInvokeEndFn) { - streamTaskOnHandleEventSuccess(pSM, event, callbackFn, param); + int32_t c = streamTaskOnHandleEventSuccess(pSM, event, callbackFn, param); + if (code == TSDB_CODE_SUCCESS) { + code = c; + } } } - return TSDB_CODE_SUCCESS; + return code; } int32_t streamTaskHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event) { @@ -367,11 +400,11 @@ int32_t streamTaskHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event) { STaskStateTrans* pTrans = NULL; while (1) { - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); if (pSM->pActiveTrans != NULL && pSM->pActiveTrans->autoInvokeEndFn) { EStreamTaskEvent evt = pSM->pActiveTrans->event; - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); stDebug("s-task:%s status:%s handling event:%s by some other thread, wait for 100ms and check if completed", pTask->id.idStr, pSM->current.name, GET_EVT_NAME(evt)); @@ -381,7 +414,7 @@ int32_t streamTaskHandleEvent(SStreamTaskSM* pSM, EStreamTaskEvent event) { pTrans = streamTaskFindTransform(pSM->current.state, event); if (pTrans == NULL) { stDebug("s-task:%s failed to handle event:%s", pTask->id.idStr, GET_EVT_NAME(event)); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); return TSDB_CODE_STREAM_INVALID_STATETRANS; } @@ -406,11 +439,11 @@ int32_t streamTaskHandleEventAsync(SStreamTaskSM* pSM, EStreamTaskEvent event, _ STaskStateTrans* pTrans = NULL; while (1) { - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); if (pSM->pActiveTrans != NULL && pSM->pActiveTrans->autoInvokeEndFn) { EStreamTaskEvent evt = pSM->pActiveTrans->event; - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); stDebug("s-task:%s status:%s handling event:%s by some other thread, wait for 100ms and check if completed", pTask->id.idStr, pSM->current.name, GET_EVT_NAME(evt)); @@ -420,7 +453,7 @@ int32_t streamTaskHandleEventAsync(SStreamTaskSM* pSM, EStreamTaskEvent event, _ pTrans = streamTaskFindTransform(pSM->current.state, event); if (pTrans == NULL) { stDebug("s-task:%s failed to handle event:%s, status:%s", pTask->id.idStr, GET_EVT_NAME(event), pSM->current.name); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); return TSDB_CODE_STREAM_INVALID_STATETRANS; } @@ -449,9 +482,10 @@ static void keepPrevInfo(SStreamTaskSM* pSM) { int32_t streamTaskOnHandleEventSuccess(SStreamTaskSM* pSM, EStreamTaskEvent event, __state_trans_user_fn callbackFn, void* param) { SStreamTask* pTask = pSM->pTask; const char* id = pTask->id.idStr; + int32_t code = 0; // do update the task status - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); STaskStateTrans* pTrans = pSM->pActiveTrans; if (pTrans == NULL) { @@ -463,14 +497,14 @@ int32_t streamTaskOnHandleEventSuccess(SStreamTaskSM* pSM, EStreamTaskEvent even stDebug("s-task:%s event:%s handled failed, current status:%s, trigger event:%s", id, GET_EVT_NAME(event), pSM->current.name, GET_EVT_NAME(pSM->prev.evt)); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); return TSDB_CODE_STREAM_INVALID_STATETRANS; } if (pTrans->event != event) { stWarn("s-task:%s handle event:%s failed, current status:%s, active trans evt:%s", id, GET_EVT_NAME(event), pSM->current.name, GET_EVT_NAME(pTrans->event)); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); return TSDB_CODE_STREAM_INVALID_STATETRANS; } @@ -480,34 +514,38 @@ int32_t streamTaskOnHandleEventSuccess(SStreamTaskSM* pSM, EStreamTaskEvent even pSM->pActiveTrans = NULL; // todo remove it + // todo: handle the error code // on success callback, add into lock if necessary, or maybe we should add an option for this? - pTrans->pSuccAction(pTask); + code = pTrans->pSuccAction(pTask); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); // todo: add parameter to control lock // after handling the callback function assigned by invoker, go on handling the waiting tasks if (callbackFn != NULL) { stDebug("s-task:%s start to handle user-specified callback fn for event:%s", id, GET_EVT_NAME(pTrans->event)); - callbackFn(pSM->pTask, param); + int32_t ret = callbackFn(pSM->pTask, param); + if (ret != TSDB_CODE_SUCCESS) { + // todo handle error + } stDebug("s-task:%s handle user-specified callback fn for event:%s completed", id, GET_EVT_NAME(pTrans->event)); } - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); // tasks in waiting list if (taosArrayGetSize(pSM->pWaitingEventList) > 0) { - doHandleWaitingEvent(pSM, GET_EVT_NAME(pTrans->event), pTask); + code = doHandleWaitingEvent(pSM, GET_EVT_NAME(pTrans->event), pTask); } else { - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); int64_t el = (taosGetTimestampMs() - pSM->startTs); stDebug("s-task:%s handle event:%s completed, elapsed time:%" PRId64 "ms state:%s -> %s", id, GET_EVT_NAME(pTrans->event), el, pSM->prev.state.name, pSM->current.name); } - return TSDB_CODE_SUCCESS; + return code; } SStreamTaskState streamTaskGetStatus(const SStreamTask* pTask) { @@ -525,14 +563,14 @@ const char* streamTaskGetStatusStr(ETaskStatus status) { void streamTaskResetStatus(SStreamTask* pTask) { SStreamTaskSM* pSM = pTask->status.pSM; - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); stDebug("s-task:%s level:%d fill-history:%d vgId:%d set uninit, prev status:%s", pTask->id.idStr, pTask->info.taskLevel, pTask->info.fillHistory, pTask->pMeta->vgId, pSM->current.name); pSM->current = StreamTaskStatusList[TASK_STATUS__UNINIT]; pSM->pActiveTrans = NULL; taosArrayClear(pSM->pWaitingEventList); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); // clear the downstream ready status pTask->status.downstreamReady = 0; @@ -575,8 +613,7 @@ STaskStateTrans createStateTransform(ETaskStatus current, ETaskStatus next, EStr } int32_t initStateTransferTable() { - taosThreadOnce(&streamTaskStateMachineInit, doInitStateTransferTable); - return TSDB_CODE_SUCCESS; + return taosThreadOnce(&streamTaskStateMachineInit, doInitStateTransferTable); } //clang-format off @@ -585,92 +622,93 @@ void doInitStateTransferTable(void) { // initialization event handle STaskStateTrans trans = createStateTransform(TASK_STATUS__UNINIT, TASK_STATUS__READY, TASK_EVENT_INIT, streamTaskInitStatus, streamTaskOnNormalTaskReady, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); + trans = createStateTransform(TASK_STATUS__UNINIT, TASK_STATUS__SCAN_HISTORY, TASK_EVENT_INIT_SCANHIST, streamTaskInitStatus, streamTaskOnScanHistoryTaskReady, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); // scan-history related event trans = createStateTransform(TASK_STATUS__SCAN_HISTORY, TASK_STATUS__READY, TASK_EVENT_SCANHIST_DONE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); // halt stream task, from other task status trans = createStateTransform(TASK_STATUS__READY, TASK_STATUS__HALT, TASK_EVENT_HALT, NULL, streamTaskKeepCurrentVerInWal, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__HALT, TASK_STATUS__HALT, TASK_EVENT_HALT, NULL, streamTaskKeepCurrentVerInWal, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); SFutureHandleEventInfo info = {.status = TASK_STATUS__READY, .event = TASK_EVENT_HALT}; trans = createStateTransform(TASK_STATUS__CK, TASK_STATUS__HALT, TASK_EVENT_HALT, NULL, streamTaskKeepCurrentVerInWal, &info); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__PAUSE, TASK_STATUS__HALT, TASK_EVENT_HALT, NULL, streamTaskKeepCurrentVerInWal, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); // checkpoint related event trans = createStateTransform(TASK_STATUS__READY, TASK_STATUS__CK, TASK_EVENT_GEN_CHECKPOINT, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__HALT, TASK_STATUS__CK, TASK_EVENT_GEN_CHECKPOINT, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__CK, TASK_STATUS__READY, TASK_EVENT_CHECKPOINT_DONE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); // pause & resume related event handle trans = createStateTransform(TASK_STATUS__READY, TASK_STATUS__PAUSE, TASK_EVENT_PAUSE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__SCAN_HISTORY, TASK_STATUS__PAUSE, TASK_EVENT_PAUSE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); info = (SFutureHandleEventInfo){.status = TASK_STATUS__READY, .event = TASK_EVENT_PAUSE}; trans = createStateTransform(TASK_STATUS__CK, TASK_STATUS__PAUSE, TASK_EVENT_PAUSE, NULL, NULL, &info); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__HALT, TASK_STATUS__PAUSE, TASK_EVENT_PAUSE, NULL, NULL, &info); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__UNINIT, TASK_STATUS__PAUSE, TASK_EVENT_PAUSE, NULL, NULL, &info); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__PAUSE, TASK_STATUS__PAUSE, TASK_EVENT_PAUSE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__STOP, TASK_STATUS__STOP, TASK_EVENT_PAUSE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__DROPPING, TASK_STATUS__DROPPING, TASK_EVENT_PAUSE, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); // resume is completed by restore status of state-machine // stop related event trans = createStateTransform(TASK_STATUS__READY, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__DROPPING, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__UNINIT, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__STOP, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__SCAN_HISTORY, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__HALT, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__PAUSE, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__CK, TASK_STATUS__STOP, TASK_EVENT_STOP, NULL, stopTaskSuccFn, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); // dropping related event trans = createStateTransform(TASK_STATUS__READY, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__DROPPING, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__UNINIT, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__STOP, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__SCAN_HISTORY, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__HALT, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__PAUSE, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); trans = createStateTransform(TASK_STATUS__CK, TASK_STATUS__DROPPING, TASK_EVENT_DROPPING, NULL, NULL, NULL); - taosArrayPush(streamTaskSMTrans, &trans); + CHECK_RET_VAL(taosArrayPush(streamTaskSMTrans, &trans)); } //clang-format on From 9bdc65ceb1dceccbaaf860b5682e96290b1dba80 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 18:57:29 +0800 Subject: [PATCH 25/45] fix(stream):fix syntax error. --- source/libs/stream/src/streamMeta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index d9c937a14f..a2b1d39e0c 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -745,7 +745,7 @@ int32_t streamMetaUnregisterTask(SStreamMeta* pMeta, int64_t streamId, int32_t t if (timerActive > 0) { taosMsleep(100); - stDebug("s-task:0x%x wait for quit from timer", id.taskId); + stDebug("s-task:0x%" PRIx64 " wait for quit from timer", id.taskId); } else { break; } From 0b6a49ac7d4fd26f65ce6bdd7c2fbe875d3c919d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 19:17:53 +0800 Subject: [PATCH 26/45] fix(stream): fix error and do some internal refactor. --- source/libs/stream/src/streamMsg.c | 48 +++++++++++++++++++++---- source/libs/stream/test/backendTest.cpp | 4 ++- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/source/libs/stream/src/streamMsg.c b/source/libs/stream/src/streamMsg.c index 1cc48f02b6..b08280f9ed 100644 --- a/source/libs/stream/src/streamMsg.c +++ b/source/libs/stream/src/streamMsg.c @@ -99,6 +99,8 @@ int32_t tEncodeStreamTaskUpdateMsg(SEncoder* pEncoder, const SStreamTaskNodeUpda } int32_t tDecodeStreamTaskUpdateMsg(SDecoder* pDecoder, SStreamTaskNodeUpdateMsg* pMsg) { + int32_t code = 0; + if (tStartDecode(pDecoder) < 0) return -1; if (tDecodeI64(pDecoder, &pMsg->streamId) < 0) return -1; if (tDecodeI32(pDecoder, &pMsg->taskId) < 0) return -1; @@ -111,13 +113,17 @@ int32_t tDecodeStreamTaskUpdateMsg(SDecoder* pDecoder, SStreamTaskNodeUpdateMsg* if (tDecodeI32(pDecoder, &info.nodeId) < 0) return -1; if (tDecodeSEpSet(pDecoder, &info.prevEp) < 0) return -1; if (tDecodeSEpSet(pDecoder, &info.newEp) < 0) return -1; - taosArrayPush(pMsg->pNodeList, &info); + + void* p = taosArrayPush(pMsg->pNodeList, &info); + if (p == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + } } if (tDecodeI32(pDecoder, &pMsg->transId) < 0) return -1; tEndDecode(pDecoder); - return 0; + return code; } int32_t tEncodeStreamTaskCheckReq(SEncoder* pEncoder, const SStreamTaskCheckReq* pReq) { @@ -257,8 +263,18 @@ int32_t tDecodeStreamDispatchReq(SDecoder* pDecoder, SStreamDispatchReq* pReq) { if (tDecodeI32(pDecoder, &len1) < 0) return -1; if (tDecodeBinaryAlloc(pDecoder, &data, &len2) < 0) return -1; ASSERT(len1 == len2); - taosArrayPush(pReq->dataLen, &len1); - taosArrayPush(pReq->data, &data); + + void* p = taosArrayPush(pReq->dataLen, &len1); + if (p == NULL) { + tEndDecode(pDecoder); + return TSDB_CODE_OUT_OF_MEMORY; + } + + p = taosArrayPush(pReq->data, &data); + if (p == NULL) { + tEndDecode(pDecoder); + return TSDB_CODE_OUT_OF_MEMORY; + } } tEndDecode(pDecoder); @@ -371,6 +387,8 @@ int32_t tEncodeStreamHbMsg(SEncoder* pEncoder, const SStreamHbMsg* pReq) { } int32_t tDecodeStreamHbMsg(SDecoder* pDecoder, SStreamHbMsg* pReq) { + int32_t code = 0; + if (tStartDecode(pDecoder) < 0) return -1; if (tDecodeI32(pDecoder, &pReq->vgId) < 0) return -1; if (tDecodeI32(pDecoder, &pReq->numOfTasks) < 0) return -1; @@ -413,7 +431,11 @@ int32_t tDecodeStreamHbMsg(SDecoder* pDecoder, SStreamHbMsg* pReq) { if (tDecodeI64(pDecoder, &entry.hTaskId) < 0) return -1; entry.id.taskId = taskId; - taosArrayPush(pReq->pTaskStatus, &entry); + void* p = taosArrayPush(pReq->pTaskStatus, &entry); + if (p == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } } int32_t numOfVgs = 0; @@ -424,12 +446,20 @@ int32_t tDecodeStreamHbMsg(SDecoder* pDecoder, SStreamHbMsg* pReq) { for (int j = 0; j < numOfVgs; ++j) { int32_t vgId = 0; if (tDecodeI32(pDecoder, &vgId) < 0) return -1; - taosArrayPush(pReq->pUpdateNodes, &vgId); + void* p = taosArrayPush(pReq->pUpdateNodes, &vgId); + if (p == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } } if (tDecodeI32(pDecoder, &pReq->msgId) < 0) return -1; tEndDecode(pDecoder); return 0; + + _err: + tEndDecode(pDecoder); + return code; } void tCleanupStreamHbMsg(SStreamHbMsg* pMsg) { @@ -572,7 +602,11 @@ int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask) { taosMemoryFreeClear(pInfo); return -1; } - taosArrayPush(pTask->upstreamInfo.pList, &pInfo); + void* p = taosArrayPush(pTask->upstreamInfo.pList, &pInfo); + if (p == NULL) { + tEndDecode(pDecoder); + return -1; + } } if (pTask->info.taskLevel != TASK_LEVEL__SINK) { diff --git a/source/libs/stream/test/backendTest.cpp b/source/libs/stream/test/backendTest.cpp index 38d48a2a32..104b1c27d8 100644 --- a/source/libs/stream/test/backendTest.cpp +++ b/source/libs/stream/test/backendTest.cpp @@ -43,7 +43,9 @@ SStreamState *stateCreate(const char *path) { pTask->ver = 1024; pTask->id.streamId = 1023; pTask->id.taskId = 1111111; - SStreamMeta *pMeta = streamMetaOpen((path), NULL, NULL, NULL, 0, 0, NULL); + SStreamMeta *pMeta = NULL; + + int32_t code = streamMetaOpen((path), NULL, NULL, NULL, 0, 0, NULL, &pMeta); pTask->pMeta = pMeta; SStreamState *p = streamStateOpen((char *)path, pTask, 0, 0); From 43dc95869f801b1c81c2264b3ed654a1b6508617 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 17 Jul 2024 19:41:06 +0800 Subject: [PATCH 27/45] fix(stream):set the initialized value. --- source/libs/stream/src/streamHb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index d8ee15c909..84eb6b319f 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -287,6 +287,8 @@ int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes) { pInfo->stopFlag = 0; pInfo->msgSendTs = -1; pInfo->hbCount = 0; + + *pRes = pInfo; return TSDB_CODE_SUCCESS; } From f727668ebb514e33d400fc6a374c21d80fd440e7 Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 17 Jul 2024 11:41:15 +0000 Subject: [PATCH 28/45] fix/TD-30989 --- include/util/taoserror.h | 1 + source/dnode/mnode/impl/src/mndCompact.c | 183 +++++++++++------- .../dnode/mnode/impl/src/mndCompactDetail.c | 34 ++-- source/dnode/mnode/impl/src/mndConsumer.c | 117 ++++++----- source/util/src/terror.c | 1 + 5 files changed, 192 insertions(+), 144 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 053bb20e2a..6e001f303e 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -224,6 +224,7 @@ int32_t taosGetErrSize(); // #define TSDB_CODE_MND_FAILED_TO_INIT_STEP TAOS_DEF_ERROR_CODE(0, 0x0314) // 2.x #define TSDB_CODE_MND_USER_DISABLED TAOS_DEF_ERROR_CODE(0, 0x0315) #define TSDB_CODE_MND_INVALID_PLATFORM TAOS_DEF_ERROR_CODE(0, 0x0316) +#define TSDB_CODE_MND_RETURN_VALUE_NULL TAOS_DEF_ERROR_CODE(0, 0x0317) // mnode-sdb #define TSDB_CODE_SDB_OBJ_ALREADY_THERE TAOS_DEF_ERROR_CODE(0, 0x0320) // internal diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 308089a9c1..2b25f20fda 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -75,11 +75,11 @@ int32_t tDeserializeSCompactObj(void *buf, int32_t bufLen, SCompactObj *pObj) { SDecoder decoder = {0}; tDecoderInit(&decoder, buf, bufLen); - if (tStartDecode(&decoder) < 0) return -1; + TAOS_CHECK_RETURN(tStartDecode(&decoder)); - if (tDecodeI32(&decoder, &pObj->compactId) < 0) return -1; - if (tDecodeCStrTo(&decoder, pObj->dbname) < 0) return -1; - if (tDecodeI64(&decoder, &pObj->startTime) < 0) return -1; + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->compactId)); + TAOS_CHECK_RETURN(tDecodeCStrTo(&decoder, pObj->dbname)); + TAOS_CHECK_RETURN(tDecodeI64(&decoder, &pObj->startTime)); tEndDecode(&decoder); @@ -174,13 +174,10 @@ SSdbRow *mndCompactActionDecode(SSdbRaw *pRaw) { } SDB_GET_BINARY(pRaw, dataPos, buf, tlen, OVER); - if (tDeserializeSCompactObj(buf, tlen, pCompact) < 0) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + if ((terrno = tDeserializeSCompactObj(buf, tlen, pCompact)) < 0) { goto OVER; } - // taosInitRWLatch(&pView->lock); - OVER: taosMemoryFreeClear(buf); if (terrno != TSDB_CODE_SUCCESS) { @@ -227,6 +224,7 @@ void mndReleaseCompact(SMnode *pMnode, SCompactObj *pCompact) { // compact db int32_t mndAddCompactToTran(SMnode *pMnode, STrans *pTrans, SCompactObj *pCompact, SDbObj *pDb, SCompactDbRsp *rsp) { + int32_t code = 0; pCompact->compactId = tGenIdPI32(); strcpy(pCompact->dbname, pDb->name); @@ -234,10 +232,14 @@ int32_t mndAddCompactToTran(SMnode *pMnode, STrans *pTrans, SCompactObj *pCompac pCompact->startTime = taosGetTimestampMs(); SSdbRaw *pVgRaw = mndCompactActionEncode(pCompact); - if (pVgRaw == NULL) return -1; - if (mndTransAppendPrepareLog(pTrans, pVgRaw) != 0) { + if (pVgRaw == NULL) { + code = TSDB_CODE_SDB_OBJ_NOT_THERE; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + if ((code = mndTransAppendPrepareLog(pTrans, pVgRaw)) != 0) { sdbFreeRaw(pVgRaw); - return -1; + TAOS_RETURN(code); } (void)sdbSetRawStatus(pVgRaw, SDB_STATUS_READY); @@ -335,44 +337,62 @@ static void *mndBuildKillCompactReq(SMnode *pMnode, SVgObj *pVgroup, int32_t *pC static int32_t mndAddKillCompactAction(SMnode *pMnode, STrans *pTrans, SVgObj *pVgroup, int32_t compactId, int32_t dnodeid) { + int32_t code = 0; STransAction action = {0}; SDnodeObj *pDnode = mndAcquireDnode(pMnode, dnodeid); - if (pDnode == NULL) return -1; + if (pDnode == NULL) { + code = TSDB_CODE_SDB_OBJ_NOT_THERE; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } action.epSet = mndGetDnodeEpset(pDnode); mndReleaseDnode(pMnode, pDnode); int32_t contLen = 0; void *pReq = mndBuildKillCompactReq(pMnode, pVgroup, &contLen, compactId, dnodeid); - if (pReq == NULL) return -1; + if (pReq == NULL) { + code = TSDB_CODE_SDB_OBJ_NOT_THERE; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } action.pCont = pReq; action.contLen = contLen; action.msgType = TDMT_VND_KILL_COMPACT; - if (mndTransAppendRedoAction(pTrans, &action) != 0) { + if ((code = mndTransAppendRedoAction(pTrans, &action)) != 0) { taosMemoryFree(pReq); - return -1; + TAOS_RETURN(code); } return 0; } static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompact) { + int32_t code = 0; STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB, pReq, "kill-compact"); if (pTrans == NULL) { mError("compact:%" PRId32 ", failed to drop since %s", pCompact->compactId, terrstr()); - return -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } mInfo("trans:%d, used to kill compact:%" PRId32, pTrans->id, pCompact->compactId); mndTransSetDbName(pTrans, pCompact->dbname, NULL); SSdbRaw *pCommitRaw = mndCompactActionEncode(pCompact); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + if (pCommitRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + mndTransDrop(pTrans); + TAOS_RETURN(code); + } + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw)) != 0) { mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); @@ -386,14 +406,20 @@ static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompa SVgObj *pVgroup = mndAcquireVgroup(pMnode, pDetail->vgId); if (pVgroup == NULL) { mError("trans:%d, failed to append redo action since %s", pTrans->id, terrstr()); + sdbCancelFetch(pMnode->pSdb, pIter); + sdbRelease(pMnode->pSdb, pDetail); mndTransDrop(pTrans); - return -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } - if (mndAddKillCompactAction(pMnode, pTrans, pVgroup, pCompact->compactId, pDetail->dnodeId) != 0) { + if ((code = mndAddKillCompactAction(pMnode, pTrans, pVgroup, pCompact->compactId, pDetail->dnodeId)) != 0) { mError("trans:%d, failed to append redo action since %s", pTrans->id, terrstr()); + sdbCancelFetch(pMnode->pSdb, pIter); + sdbRelease(pMnode->pSdb, pDetail); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } mndReleaseVgroup(pMnode, pVgroup); @@ -412,10 +438,10 @@ static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompa sdbRelease(pMnode->pSdb, pDetail); } - if (mndTransPrepare(pMnode, pTrans) != 0) { + if ((code = mndTransPrepare(pMnode, pTrans)) != 0) { mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } mndTransDrop(pTrans); @@ -423,30 +449,27 @@ static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompa } int32_t mndProcessKillCompactReq(SRpcMsg *pReq) { + int32_t code = 0; + int32_t lino = 0; SKillCompactReq killCompactReq = {0}; - if (tDeserializeSKillCompactReq(pReq->pCont, pReq->contLen, &killCompactReq) != 0) { - terrno = TSDB_CODE_INVALID_MSG; - return -1; + + if ((code = tDeserializeSKillCompactReq(pReq->pCont, pReq->contLen, &killCompactReq)) != 0) { + TAOS_RETURN(code); } mInfo("start to kill compact:%" PRId32, killCompactReq.compactId); SMnode *pMnode = pReq->info.node; - int32_t code = -1; SCompactObj *pCompact = mndAcquireCompact(pMnode, killCompactReq.compactId); if (pCompact == NULL) { - terrno = TSDB_CODE_MND_INVALID_COMPACT_ID; + code = TSDB_CODE_MND_INVALID_COMPACT_ID; tFreeSKillCompactReq(&killCompactReq); - return -1; + TAOS_RETURN(code); } - if (0 != mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_COMPACT_DB)) { - goto _OVER; - } + TAOS_CHECK_GOTO(mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_COMPACT_DB), &lino, _OVER); - if (mndKillCompact(pMnode, pReq, pCompact) < 0) { - goto _OVER; - } + TAOS_CHECK_GOTO(mndKillCompact(pMnode, pReq, pCompact), &lino, _OVER); code = TSDB_CODE_ACTION_IN_PROGRESS; @@ -463,12 +486,14 @@ _OVER: tFreeSKillCompactReq(&killCompactReq); sdbRelease(pMnode->pSdb, pCompact); - return code; + TAOS_RETURN(code); } // update progress static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t compactId, SQueryCompactProgressRsp *rsp) { + int32_t code = 0; + void *pIter = NULL; while (1) { SCompactDetailObj *pDetail = NULL; @@ -479,9 +504,10 @@ static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t c pDetail->newNumberFileset = rsp->numberFileset; pDetail->newFinished = rsp->finished; + sdbCancelFetch(pMnode->pSdb, pIter); sdbRelease(pMnode->pSdb, pDetail); - return 0; + TAOS_RETURN(code); } sdbRelease(pMnode->pSdb, pDetail); @@ -491,14 +517,13 @@ static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t c } int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq) { - SQueryCompactProgressRsp req = {0}; int32_t code = 0; + SQueryCompactProgressRsp req = {0}; code = tDeserializeSQueryCompactProgressRsp(pReq->pCont, pReq->contLen, &req); if (code != 0) { - terrno = TSDB_CODE_INVALID_MSG; mError("failed to deserialize vnode-query-compact-progress-rsp, ret:%d, pCont:%p, len:%d", code, pReq->pCont, pReq->contLen); - return -1; + TAOS_RETURN(code); } mDebug("compact:%d, receive query response, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", req.compactId, @@ -508,13 +533,12 @@ int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq) { code = mndUpdateCompactProgress(pMnode, pReq, req.compactId, &req); if (code != 0) { - terrno = code; mError("compact:%d, failed to update progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", req.compactId, req.vgId, req.dnodeId, req.numberFileset, req.finished); - return -1; + TAOS_RETURN(code); } - return 0; + TAOS_RETURN(code); } // timer @@ -531,7 +555,10 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact) { SDnodeObj *pDnode = mndAcquireDnode(pMnode, pDetail->dnodeId); if (pDnode == NULL) break; - addEpIntoEpSet(&epSet, pDnode->fqdn, pDnode->port); + if (addEpIntoEpSet(&epSet, pDnode->fqdn, pDnode->port) != 0) { + sdbRelease(pMnode->pSdb, pDetail); + continue; + } mndReleaseDnode(pMnode, pDnode); SQueryCompactProgressReq req; @@ -541,8 +568,6 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact) { int32_t contLen = tSerializeSQueryCompactProgressReq(NULL, 0, &req); if (contLen < 0) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - sdbCancelFetch(pMnode->pSdb, pDetail); sdbRelease(pMnode->pSdb, pDetail); continue; } @@ -551,7 +576,6 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact) { SMsgHead *pHead = rpcMallocCont(contLen); if (pHead == NULL) { - sdbCancelFetch(pMnode->pSdb, pDetail); sdbRelease(pMnode->pSdb, pDetail); continue; } @@ -563,13 +587,6 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact) { SRpcMsg rpcMsg = {.msgType = TDMT_VND_QUERY_COMPACT_PROGRESS, .contLen = contLen}; - // rpcMsg.pCont = rpcMallocCont(contLen); - // if (rpcMsg.pCont == NULL) { - // return; - // } - - // memcpy(rpcMsg.pCont, pHead, contLen); - rpcMsg.pCont = pHead; char detail[1024] = {0}; @@ -589,6 +606,7 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact) { } static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { + int32_t code = 0; bool needSave = false; void *pIter = NULL; while (1) { @@ -612,7 +630,7 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { } SCompactObj *pCompact = mndAcquireCompact(pMnode, compactId); - if (pCompact == NULL) return 0; + if (pCompact == NULL) TAOS_RETURN(code); SDbObj *pDb = mndAcquireDb(pMnode, pCompact->dbname); if (pDb == NULL) { @@ -625,13 +643,15 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { if (!needSave) { mDebug("compact:%" PRId32 ", no need to save", compactId); - return 0; + TAOS_RETURN(code); } STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB, NULL, "update-compact-progress"); if (pTrans == NULL) { mError("trans:%" PRId32 ", failed to create since %s", pTrans->id, terrstr()); - return -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } mInfo("compact:%d, trans:%d, used to update compact progress.", compactId, pTrans->id); @@ -654,10 +674,20 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { pDetail->finished = pDetail->newFinished; SSdbRaw *pCommitRaw = mndCompactDetailActionEncode(pDetail); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { - mError("compact:%d, trans:%d, failed to append commit log since %s", pDetail->compactId, pTrans->id, terrstr()); + if (pCommitRaw == NULL) { + sdbCancelFetch(pMnode->pSdb, pIter); + sdbRelease(pMnode->pSdb, pDetail); mndTransDrop(pTrans); - return -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw)) != 0) { + mError("compact:%d, trans:%d, failed to append commit log since %s", pDetail->compactId, pTrans->id, terrstr()); + sdbCancelFetch(pMnode->pSdb, pIter); + sdbRelease(pMnode->pSdb, pDetail); + mndTransDrop(pTrans); + TAOS_RETURN(code); } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY); } @@ -678,11 +708,13 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { if (pDetail->numberFileset == -1 && pDetail->finished == -1) { allFinished = false; + sdbCancelFetch(pMnode->pSdb, pDetail); sdbRelease(pMnode->pSdb, pDetail); break; } if (pDetail->numberFileset != -1 && pDetail->finished != -1 && pDetail->numberFileset != pDetail->finished) { allFinished = false; + sdbCancelFetch(pMnode->pSdb, pDetail); sdbRelease(pMnode->pSdb, pDetail); break; } @@ -710,11 +742,19 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { if (pDetail->compactId == pCompact->compactId) { SSdbRaw *pCommitRaw = mndCompactDetailActionEncode(pDetail); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + if (pCommitRaw == NULL) { + mndTransDrop(pTrans); + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw)) != 0) { mError("compact:%d, trans:%d, failed to append commit log since %s", pDetail->compactId, pTrans->id, terrstr()); + sdbCancelFetch(pMnode->pSdb, pIter); + sdbRelease(pMnode->pSdb, pDetail); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED); mInfo("compact:%d, add drop compactdetail action", pDetail->compactDetailId); @@ -724,20 +764,26 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { } SSdbRaw *pCommitRaw = mndCompactActionEncode(pCompact); - if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { + if (pCommitRaw == NULL) { + mndTransDrop(pTrans); + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + if ((code = mndTransAppendCommitlog(pTrans, pCommitRaw)) != 0) { mError("compact:%d, trans:%d, failed to append commit log since %s", compactId, pTrans->id, terrstr()); mndTransDrop(pTrans); - return -1; + TAOS_RETURN(code); } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED); mInfo("compact:%d, add drop compact action", pCompact->compactId); } - if (mndTransPrepare(pMnode, pTrans) != 0) { + if ((code = mndTransPrepare(pMnode, pTrans)) != 0) { mError("compact:%d, trans:%d, failed to prepare since %s", compactId, pTrans->id, terrstr()); mndTransDrop(pTrans); sdbRelease(pMnode->pSdb, pCompact); - return -1; + TAOS_RETURN(code); } sdbRelease(pMnode->pSdb, pCompact); @@ -746,6 +792,7 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { } void mndCompactPullup(SMnode *pMnode) { + int32_t code = 0; SSdb *pSdb = pMnode->pSdb; SArray *pArray = taosArrayInit(sdbGetSize(pSdb, SDB_COMPACT), sizeof(int32_t)); if (pArray == NULL) return; @@ -766,7 +813,9 @@ void mndCompactPullup(SMnode *pMnode) { if (pCompact != NULL) { mInfo("compact:%d, begin to pull up", pCompact->compactId); mndCompactSendProgressReq(pMnode, pCompact); - mndSaveCompactProgress(pMnode, pCompact->compactId); + if ((code = mndSaveCompactProgress(pMnode, pCompact->compactId)) != 0) { + mError("compact:%d, failed to save compact progress since %s", pCompact->compactId, tstrerror(code)); + } } mndReleaseCompact(pMnode, pCompact); } diff --git a/source/dnode/mnode/impl/src/mndCompactDetail.c b/source/dnode/mnode/impl/src/mndCompactDetail.c index 6b1dd78093..7d73cf8dcd 100644 --- a/source/dnode/mnode/impl/src/mndCompactDetail.c +++ b/source/dnode/mnode/impl/src/mndCompactDetail.c @@ -125,17 +125,17 @@ int32_t tDeserializeSCompactDetailObj(void *buf, int32_t bufLen, SCompactDetailO SDecoder decoder = {0}; tDecoderInit(&decoder, buf, bufLen); - if (tStartDecode(&decoder) < 0) return -1; - - if (tDecodeI32(&decoder, &pObj->compactDetailId) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->compactId) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->vgId) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->dnodeId) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->numberFileset) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->finished) < 0) return -1; - if (tDecodeI64(&decoder, &pObj->startTime) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->newNumberFileset) < 0) return -1; - if (tDecodeI32(&decoder, &pObj->newFinished) < 0) return -1; + TAOS_CHECK_RETURN(tStartDecode(&decoder)); + + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->compactDetailId)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->compactId)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->vgId)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->dnodeId)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->numberFileset)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->finished)); + TAOS_CHECK_RETURN(tDecodeI64(&decoder, &pObj->startTime)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->newNumberFileset)); + TAOS_CHECK_RETURN(tDecodeI32(&decoder, &pObj->newFinished)); tEndDecode(&decoder); @@ -231,13 +231,10 @@ SSdbRow *mndCompactDetailActionDecode(SSdbRaw *pRaw) { } SDB_GET_BINARY(pRaw, dataPos, buf, tlen, OVER); - if (tDeserializeSCompactDetailObj(buf, tlen, pCompact) < 0) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + if ((terrno = tDeserializeSCompactDetailObj(buf, tlen, pCompact)) < 0) { goto OVER; } - //taosInitRWLatch(&pView->lock); - OVER: taosMemoryFreeClear(buf); if (terrno != TSDB_CODE_SUCCESS) { @@ -274,6 +271,7 @@ int32_t mndCompactDetailActionUpdate(SSdb *pSdb, SCompactDetailObj *pOldCompact, int32_t mndAddCompactDetailToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* pCompact, SVgObj *pVgroup, SVnodeGid *pVgid, int32_t index){ + int32_t code = 0; SCompactDetailObj compactDetail = {0}; compactDetail.compactDetailId = index; compactDetail.compactId = pCompact->compactId; @@ -292,9 +290,11 @@ int32_t mndAddCompactDetailToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* p if (pVgRaw == NULL) return -1; if (mndTransAppendCommitlog(pTrans, pVgRaw) != 0) { sdbFreeRaw(pVgRaw); - return -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); } (void)sdbSetRawStatus(pVgRaw, SDB_STATUS_READY); - return 0; + TAOS_RETURN(code); } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 9a7a8155ec..5511506021 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -95,26 +95,21 @@ static int32_t validateTopics(const SArray *pTopicList, SMnode *pMnode, const ch bool enableReplay) { SMqTopicObj *pTopic = NULL; int32_t code = 0; + int32_t lino = 0; int32_t numOfTopics = taosArrayGetSize(pTopicList); for (int32_t i = 0; i < numOfTopics; i++) { char *pOneTopic = taosArrayGetP(pTopicList, i); pTopic = mndAcquireTopic(pMnode, pOneTopic); if (pTopic == NULL) { // terrno has been set by callee function - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto FAILED; } - if (mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic) != 0) { - code = TSDB_CODE_MND_NO_RIGHTS; - terrno = TSDB_CODE_MND_NO_RIGHTS; - goto FAILED; - } + TAOS_CHECK_GOTO(mndCheckTopicPrivilege(pMnode, pUser, MND_OPER_SUBSCRIBE, pTopic), &lino, FAILED); - if ((terrno = grantCheckExpire(TSDB_GRANT_SUBSCRIPTION)) < 0) { - code = terrno; - goto FAILED; - } + TAOS_CHECK_GOTO(grantCheckExpire(TSDB_GRANT_SUBSCRIPTION), &lino, FAILED); if (enableReplay) { if (pTopic->subType != TOPIC_SUB_TYPE__COLUMN) { @@ -123,7 +118,8 @@ static int32_t validateTopics(const SArray *pTopicList, SMnode *pMnode, const ch } else if (pTopic->ntbUid == 0 && pTopic->ctbStbUid == 0) { SDbObj *pDb = mndAcquireDb(pMnode, pTopic->db); if (pDb == NULL) { - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto FAILED; } if (pDb->cfg.numOfVgroups != 1) { @@ -146,6 +142,7 @@ FAILED: static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { int32_t code = 0; + int32_t lino = 0; SMnode *pMnode = pMsg->info.node; SMqConsumerRecoverMsg *pRecoverMsg = pMsg->pCont; SMqConsumerObj *pConsumerNew = NULL; @@ -153,7 +150,8 @@ static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, pRecoverMsg->consumerId); if (pConsumer == NULL) { mError("cannot find consumer %" PRId64 " when processing consumer recover msg", pRecoverMsg->consumerId); - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto END; } @@ -161,31 +159,27 @@ static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { pConsumer->status, mndConsumerStatusName(pConsumer->status)); if (pConsumer->status != MQ_CONSUMER_STATUS_LOST) { - terrno = TSDB_CODE_MND_CONSUMER_NOT_READY; - code = -1; + code = TSDB_CODE_MND_CONSUMER_NOT_READY; goto END; } pConsumerNew = tNewSMqConsumerObj(pConsumer->consumerId, pConsumer->cgroup, CONSUMER_UPDATE_REC, NULL, NULL); if (pConsumerNew == NULL){ - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto END; } pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "recover-csm"); if (pTrans == NULL) { - code = -1; - goto END; - } - code = validateTopics(pConsumer->assignedTopics, pMnode, pMsg->info.conn.user, false); - if (code != 0) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto END; } - code = mndSetConsumerCommitLogs(pTrans, pConsumerNew); - if (code != 0) { - goto END; - } + TAOS_CHECK_GOTO(validateTopics(pConsumer->assignedTopics, pMnode, pMsg->info.conn.user, false), &lino, END); + + TAOS_CHECK_GOTO(mndSetConsumerCommitLogs(pTrans, pConsumerNew), &lino, END); code = mndTransPrepare(pMnode, pTrans); END: @@ -197,6 +191,7 @@ END: static int32_t mndProcessConsumerClearMsg(SRpcMsg *pMsg) { int32_t code = 0; + int32_t lino = 0; SMnode *pMnode = pMsg->info.node; SMqConsumerClearMsg *pClearMsg = pMsg->pCont; SMqConsumerObj *pConsumerNew = NULL; @@ -205,7 +200,7 @@ static int32_t mndProcessConsumerClearMsg(SRpcMsg *pMsg) { SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, pClearMsg->consumerId); if (pConsumer == NULL) { mError("consumer:0x%" PRIx64 " failed to be found to clear it", pClearMsg->consumerId); - return 0; + TAOS_RETURN(code); } mInfo("consumer:0x%" PRIx64 " needs to be cleared, status %s", pClearMsg->consumerId, @@ -213,21 +208,20 @@ static int32_t mndProcessConsumerClearMsg(SRpcMsg *pMsg) { pConsumerNew = tNewSMqConsumerObj(pConsumer->consumerId, pConsumer->cgroup, -1, NULL, NULL); if (pConsumerNew == NULL){ - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto END; } pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pMsg, "clear-csm"); if (pTrans == NULL) { - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto END; } // this is the drop action, not the update action - code = mndSetConsumerDropLogs(pTrans, pConsumerNew); - if (code != 0) { - goto END; - } + TAOS_CHECK_GOTO(mndSetConsumerDropLogs(pTrans, pConsumerNew), &lino, END); code = mndTransPrepare(pMnode, pTrans); @@ -310,10 +304,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { SMqHbRsp rsp = {0}; SMqConsumerObj *pConsumer = NULL; - if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) { - code = TSDB_CODE_TMQ_INVALID_MSG; - goto end; - } + TAOS_CHECK_GOTO(tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req), NULL, end); int64_t consumerId = req.consumerId; pConsumer = mndAcquireConsumer(pMnode, consumerId); @@ -322,10 +313,8 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { code = TSDB_CODE_MND_CONSUMER_NOT_EXIST; goto end; } - code = checkPrivilege(pMnode, pConsumer, &rsp, pMsg->info.conn.user); - if (code != 0) { - goto end; - } + + TAOS_CHECK_GOTO(checkPrivilege(pMnode, pConsumer, &rsp, pMsg->info.conn.user), NULL, end); atomic_store_32(&pConsumer->hbStatus, 0); @@ -343,7 +332,7 @@ end: tDestroySMqHbRsp(&rsp); mndReleaseConsumer(pMnode, pConsumer); tDestroySMqHbReq(&req); - return code; + TAOS_RETURN(code); } static int32_t addEpSetInfo(SMnode *pMnode, SMqConsumerObj *pConsumer, int32_t epoch, SMqAskEpRsp *rsp){ @@ -447,7 +436,7 @@ static int32_t buildAskEpRsp(SRpcMsg *pMsg, SMqAskEpRsp *rsp, int32_t serverEpoc pHead->walever = 0; void *abuf = POINTER_SHIFT(buf, sizeof(SMqRspHead)); - tEncodeSMqAskEpRsp(&abuf, rsp); + TAOS_CHECK_RETURN(tEncodeSMqAskEpRsp(&abuf, rsp)); // send rsp pMsg->info.rsp = buf; @@ -461,9 +450,7 @@ static int32_t mndProcessAskEpReq(SRpcMsg *pMsg) { SMqAskEpRsp rsp = {0}; int32_t code = 0; - if (tDeserializeSMqAskEpReq(pMsg->pCont, pMsg->contLen, &req) < 0) { - return TSDB_CODE_OUT_OF_MEMORY; - } + TAOS_CHECK_RETURN(tDeserializeSMqAskEpReq(pMsg->pCont, pMsg->contLen, &req)); int64_t consumerId = req.consumerId; @@ -517,19 +504,29 @@ END: } int32_t mndSetConsumerDropLogs(STrans *pTrans, SMqConsumerObj *pConsumer) { + int32_t code = 0; SSdbRaw *pCommitRaw = mndConsumerActionEncode(pConsumer); - if (pCommitRaw == NULL) return -1; - if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) return -1; - if (sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED) != 0) return -1; - return 0; + if (pCommitRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendCommitlog(pTrans, pCommitRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED)); + TAOS_RETURN(code); } int32_t mndSetConsumerCommitLogs(STrans *pTrans, SMqConsumerObj *pConsumer) { + int32_t code = 0; SSdbRaw *pCommitRaw = mndConsumerActionEncode(pConsumer); - if (pCommitRaw == NULL) return -1; - if (mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) return -1; - if (sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY) != 0) return -1; - return 0; + if (pCommitRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendCommitlog(pTrans, pCommitRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY)); + TAOS_RETURN(code); } static void freeItem(void *param) { @@ -592,8 +589,7 @@ static int32_t checkAndSortTopic(SMnode *pMnode, SArray *pTopicList){ for (int i = 0; i < newTopicNum; i++) { int32_t gNum = mndGetGroupNumByTopic(pMnode, (const char *)taosArrayGetP(pTopicList, i)); if (gNum >= MND_MAX_GROUP_PER_TOPIC) { - terrno = TSDB_CODE_TMQ_GROUP_OUT_OF_RANGE; - return -1; + return TSDB_CODE_TMQ_GROUP_OUT_OF_RANGE; } } return TSDB_CODE_SUCCESS; @@ -672,7 +668,8 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pMsg, "subscribe"); if (pTrans == NULL) { - code = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto _over; } @@ -683,14 +680,14 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { pConsumerNew = buildSubConsumer(pMnode, &subscribe); if(pConsumerNew == NULL){ - code = -1; + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; goto _over; } - code = mndSetConsumerCommitLogs(pTrans, pConsumerNew); - if (code != 0) goto _over; - code = mndTransPrepare(pMnode, pTrans); - if (code != 0) goto _over; + TAOS_CHECK_GOTO(mndSetConsumerCommitLogs(pTrans, pConsumerNew), NULL, _over); + + TAOS_CHECK_GOTO(mndTransPrepare(pMnode, pTrans), NULL, _over); code = TSDB_CODE_ACTION_IN_PROGRESS; _over: diff --git a/source/util/src/terror.c b/source/util/src/terror.c index ab50b83937..4543e746a1 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -168,6 +168,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_QUERY_ID, "Invalid query id") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_CONN_ID, "Invalid connection id") TAOS_DEFINE_ERROR(TSDB_CODE_MND_USER_DISABLED, "User is disabled") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_PLATFORM, "Unsupported feature on this platform") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_RETURN_VALUE_NULL, "Return value is null") // mnode-sdb TAOS_DEFINE_ERROR(TSDB_CODE_SDB_OBJ_ALREADY_THERE, "Object already there") From 05e1d17a4498eeca5991ea0b647d4c3c3ef6a409 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Wed, 17 Jul 2024 19:49:02 +0800 Subject: [PATCH 29/45] test: use queryResult and check_rows_loop in testcase --- tests/pytest/util/sql.py | 44 ++++++++++++++----- .../system-test/8-stream/stream_multi_agg.py | 26 +++++------ 2 files changed, 47 insertions(+), 23 deletions(-) diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 00171a19a6..7f6b129bb9 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -307,8 +307,8 @@ class TDSql: return col_name_list, col_type_list return col_name_list - def waitedQuery(self, sql, expectRows, timeout): - tdLog.info("sql: %s, try to retrieve %d rows in %d seconds" % (sql, expectRows, timeout)) + def waitedQuery(self, sql, expectedRows, timeout): + tdLog.info("sql: %s, try to retrieve %d rows in %d seconds" % (sql, expectedRows, timeout)) self.sql = sql try: for i in range(timeout): @@ -316,8 +316,8 @@ class TDSql: self.queryResult = self.cursor.fetchall() self.queryRows = len(self.queryResult) self.queryCols = len(self.cursor.description) - tdLog.info("sql: %s, try to retrieve %d rows,get %d rows" % (sql, expectRows, self.queryRows)) - if self.queryRows >= expectRows: + tdLog.info("sql: %s, try to retrieve %d rows,get %d rows" % (sql, expectedRows, self.queryRows)) + if self.queryRows >= expectedRows: return (self.queryRows, i) time.sleep(1) except Exception as e: @@ -330,15 +330,26 @@ class TDSql: def getRows(self): return self.queryRows - def checkRows(self, expectRows): - if self.queryRows == expectRows: - tdLog.info("sql:%s, queryRows:%d == expect:%d" % (self.sql, self.queryRows, expectRows)) + def checkRows(self, expectedRows): + if self.queryRows == expectedRows: + tdLog.info("sql:%s, queryRows:%d == expect:%d" % (self.sql, self.queryRows, expectedRows)) return True else: caller = inspect.getframeinfo(inspect.stack()[1][0]) - args = (caller.filename, caller.lineno, self.sql, self.queryRows, expectRows) + args = (caller.filename, caller.lineno, self.sql, self.queryRows, expectedRows) tdLog.exit("%s(%d) failed: sql:%s, queryRows:%d != expect:%d" % args) + def checkRows_not_exited(self, expectedRows): + """ + Check if the query rows is equal to the expected rows + :param expectedRows: The expected number of rows. + :return: Returns True if the actual number of rows matches the expected number, otherwise returns False. + """ + if self.queryRows == expectedRows: + return True + else: + return False + def checkRows_range(self, excepte_row_list): if self.queryRows in excepte_row_list: tdLog.info(f"sql:{self.sql}, queryRows:{self.queryRows} in expect:{excepte_row_list}") @@ -508,7 +519,7 @@ class TDSql: # return true or false replace exit, no print out - def checkDataNoExit(self, row, col, data): + def checkDataNotExit(self, row, col, data): if self.checkRowColNoExit(row, col) == False: return False if self.queryResult[row][col] != data: @@ -542,7 +553,7 @@ class TDSql: # loop check util checkData return true for i in range(loopCount): self.query(sql) - if self.checkDataNoExit(row, col, data) : + if self.checkDataNotExit(row, col, data) : self.checkData(row, col, data) return time.sleep(waitTime) @@ -551,6 +562,19 @@ class TDSql: self.query(sql) self.checkData(row, col, data) + def check_rows_loop(self, expectedRows, sql, loopCount, waitTime): + # loop check util checkData return true + for i in range(loopCount): + self.query(sql) + if self.checkRows_not_exited(expectedRows): + return + else: + time.sleep(waitTime) + continue + # last check + self.query(sql) + self.checkRows(expectedRows) + def getData(self, row, col): self.checkRowCol(row, col) diff --git a/tests/system-test/8-stream/stream_multi_agg.py b/tests/system-test/8-stream/stream_multi_agg.py index 32c2648b46..1386814f0c 100644 --- a/tests/system-test/8-stream/stream_multi_agg.py +++ b/tests/system-test/8-stream/stream_multi_agg.py @@ -37,26 +37,26 @@ class TDTestCase: def case1(self): tdLog.debug("========case1 start========") - os.system("nohup taosBenchmark -y -B 1 -t 40 -S 1000 -n 10 -i 1000 -v 5 > /dev/null 2>&1 &") + os.system(" taosBenchmark -y -B 1 -t 10 -S 1000 -n 10 -i 1000 -v 5 ") time.sleep(10) tdSql.execute("use test", queryTimes=100) tdSql.query("create stream if not exists s1 trigger at_once ignore expired 0 ignore update 0 fill_history 1 into st1 as select _wstart,sum(voltage),groupid from meters partition by groupid interval(2s)") - tdLog.debug("========create stream and insert data ok========") - time.sleep(20) + tdLog.debug("========create stream and insert data ok========") tdSql.query("select _wstart,sum(voltage),groupid from meters partition by groupid interval(2s) order by groupid,_wstart") rowCnt = tdSql.getRows() - results = [] - for i in range(rowCnt): - results.append(tdSql.getData(i,1)) + results_meters = tdSql.queryResult - tdSql.query("select * from st1 order by groupid,_wstart") - tdSql.checkRows(rowCnt) + sql = "select _wstart,`sum(voltage)`,groupid from st1 order by groupid,_wstart" + tdSql.check_rows_loop(rowCnt, sql, loopCount=100, waitTime=0.5) + + tdSql.query(sql) + results_st1 = tdSql.queryResult for i in range(rowCnt): - data1 = tdSql.getData(i,1) - data2 = results[i] + data1 = results_st1[i] + data2 = results_meters[i] if data1 != data2: - tdLog.info("num: %d, act data: %d, expect data: %d"%(i, data1, data2)) + tdLog.info(f"num: {i}, act data: {data1}, expect data: {data2}") tdLog.exit("check data error!") tdLog.debug("case1 end") @@ -64,7 +64,7 @@ class TDTestCase: def case2(self): tdLog.debug("========case2 start========") - os.system("taosBenchmark -d db -t 20 -v 6 -n 1000 -y > /dev/null 2>&1") + os.system("taosBenchmark -d db -t 20 -v 6 -n 1000 -y") # create stream tdSql.execute("use db", queryTimes=100) tdSql.execute("create stream stream1 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True) @@ -73,7 +73,7 @@ class TDTestCase: sql = "select count(*) from sta" # loop wait max 60s to check count is ok tdLog.info("loop wait result ...") - tdSql.checkDataLoop(0, 0, 100, sql, loopCount=10, waitTime=0.5) + tdSql.checkDataLoop(0, 0, 100, sql, loopCount=100, waitTime=0.5) # check all data is correct sql = "select * from sta where cnt != 200;" From 5689cc1038b127207e44ef1e7dc0d4c8f07cde2e Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Wed, 17 Jul 2024 20:55:31 +0800 Subject: [PATCH 30/45] test:increate timeout in checking dnodes --- tests/system-test/6-cluster/clusterCommonCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index be99d01a5c..f3e2b5d5bc 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -37,7 +37,7 @@ class ClusterComCheck: tdSql.init(conn.cursor()) # tdSql.init(conn.cursor(), logSql) # output sql.txt file - def checkDnodes(self,dnodeNumbers, timeout=30): + def checkDnodes(self,dnodeNumbers, timeout=100): count=0 # print(tdSql) while count < timeout: From 3bada98670cbe57f1908746e38e3cfe39b488b56 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 17 Jul 2024 21:58:23 +0800 Subject: [PATCH 31/45] revert some change to make CI pass --- source/dnode/vnode/src/inc/tsdb.h | 4 +- .../dnode/vnode/src/tsdb/tsdbReaderWriter.c | 7 +- source/dnode/vnode/src/tsdb/tsdbUpgrade.c | 2 +- source/dnode/vnode/src/tsdb/tsdbUtil.c | 839 ++++++++++++++---- 4 files changed, 669 insertions(+), 183 deletions(-) diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 21dd48919e..75dfd03402 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -222,11 +222,11 @@ void tMapDataReset(SMapData *pMapData); void tMapDataClear(SMapData *pMapData); int32_t tMapDataPutItem(SMapData *pMapData, void *pItem, int32_t (*tPutItemFn)(uint8_t *, void *)); int32_t tMapDataCopy(SMapData *pFrom, SMapData *pTo); -int32_t tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)); +void tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)); int32_t tMapDataSearch(SMapData *pMapData, void *pSearchItem, int32_t (*tGetItemFn)(uint8_t *, void *), int32_t (*tItemCmprFn)(const void *, const void *), void *pItem); int32_t tPutMapData(uint8_t *p, SMapData *pMapData); -int32_t tGetMapData(uint8_t *p, SMapData *pMapData, int64_t *decodeSize); +int32_t tGetMapData(uint8_t *p, SMapData *pMapData); int32_t tMapDataToArray(SMapData *pMapData, int32_t itemSize, int32_t (*tGetItemFn)(uint8_t *, void *), SArray **ppArray); // other diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c index 8cbcdbc34f..932bf2d92c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c +++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c @@ -803,8 +803,11 @@ int32_t tsdbReadDataBlk(SDataFReader *pReader, SBlockIdx *pBlockIdx, SMapData *m if (code) goto _err; // decode - int64_t n; - TAOS_CHECK_GOTO(tGetMapData(pReader->aBuf[0], mDataBlk, &n), NULL, _err); + int64_t n = tGetMapData(pReader->aBuf[0], mDataBlk); + if (n < 0) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } ASSERT(n == size); return code; diff --git a/source/dnode/vnode/src/tsdb/tsdbUpgrade.c b/source/dnode/vnode/src/tsdb/tsdbUpgrade.c index 1052d1c1a1..5d0500998e 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUpgrade.c +++ b/source/dnode/vnode/src/tsdb/tsdbUpgrade.c @@ -96,7 +96,7 @@ static int32_t tsdbUpgradeHead(STsdb *tsdb, SDFileSet *pDFileSet, SDataFReader * for (int32_t iDataBlk = 0; iDataBlk < ctx->mDataBlk->nItem; ++iDataBlk) { SDataBlk dataBlk[1]; - TAOS_CHECK_GOTO(tMapDataGetItemByIdx(ctx->mDataBlk, iDataBlk, dataBlk, tGetDataBlk), &lino, _exit); + tMapDataGetItemByIdx(ctx->mDataBlk, iDataBlk, dataBlk, tGetDataBlk); SBrinRecord record = { .suid = pBlockIdx->suid, diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index 025fbf3eb7..58075cf0ac 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -36,47 +36,183 @@ void tMapDataClear(SMapData *pMapData) { pMapData->aOffset = NULL; } -int32_t tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)) { - if (idx < 0 || idx >= pMapData->nItem) { - return TSDB_CODE_OUT_OF_RANGE; - } +#ifdef BUILD_NO_CALL +int32_t tMapDataPutItem(SMapData *pMapData, void *pItem, int32_t (*tPutItemFn)(uint8_t *, void *)) { + int32_t code = 0; + int32_t offset = pMapData->nData; + int32_t nItem = pMapData->nItem; - tGetItemFn(pMapData->pData + pMapData->aOffset[idx], pItem); - return 0; + pMapData->nItem++; + pMapData->nData += tPutItemFn(NULL, pItem); + + // alloc + code = tRealloc((uint8_t **)&pMapData->aOffset, sizeof(int32_t) * pMapData->nItem); + if (code) goto _exit; + code = tRealloc(&pMapData->pData, pMapData->nData); + if (code) goto _exit; + + // put + pMapData->aOffset[nItem] = offset; + tPutItemFn(pMapData->pData + offset, pItem); + +_exit: + return code; } -int32_t tGetMapData(uint8_t *p, SMapData *pMapData, int64_t *decodeSize) { - int64_t size = 0; +int32_t tMapDataCopy(SMapData *pFrom, SMapData *pTo) { + int32_t code = 0; + + pTo->nItem = pFrom->nItem; + pTo->nData = pFrom->nData; + code = tRealloc((uint8_t **)&pTo->aOffset, sizeof(int32_t) * pFrom->nItem); + if (code) goto _exit; + code = tRealloc(&pTo->pData, pFrom->nData); + if (code) goto _exit; + memcpy(pTo->aOffset, pFrom->aOffset, sizeof(int32_t) * pFrom->nItem); + memcpy(pTo->pData, pFrom->pData, pFrom->nData); + +_exit: + return code; +} + +int32_t tMapDataSearch(SMapData *pMapData, void *pSearchItem, int32_t (*tGetItemFn)(uint8_t *, void *), + int32_t (*tItemCmprFn)(const void *, const void *), void *pItem) { + int32_t code = 0; + int32_t lidx = 0; + int32_t ridx = pMapData->nItem - 1; + int32_t midx; + int32_t c; + + while (lidx <= ridx) { + midx = (lidx + ridx) / 2; + + tMapDataGetItemByIdx(pMapData, midx, pItem, tGetItemFn); + + c = tItemCmprFn(pSearchItem, pItem); + if (c == 0) { + goto _exit; + } else if (c < 0) { + ridx = midx - 1; + } else { + lidx = midx + 1; + } + } + + code = TSDB_CODE_NOT_FOUND; + +_exit: + return code; +} +#endif + +void tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)) { + ASSERT(idx >= 0 && idx < pMapData->nItem); + tGetItemFn(pMapData->pData + pMapData->aOffset[idx], pItem); +} + +#ifdef BUILD_NO_CALL +int32_t tMapDataToArray(SMapData *pMapData, int32_t itemSize, int32_t (*tGetItemFn)(uint8_t *, void *), + SArray **ppArray) { + int32_t code = 0; + + SArray *pArray = taosArrayInit(pMapData->nItem, itemSize); + if (pArray == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _exit; + } + + for (int32_t i = 0; i < pMapData->nItem; i++) { + tMapDataGetItemByIdx(pMapData, i, taosArrayReserve(pArray, 1), tGetItemFn); + } + +_exit: + *ppArray = pArray; + return code; +} + +int32_t tPutMapData(uint8_t *p, SMapData *pMapData) { + int32_t n = 0; + + n += tPutI32v(p ? p + n : p, pMapData->nItem); + if (pMapData->nItem) { + int32_t lOffset = 0; + for (int32_t iItem = 0; iItem < pMapData->nItem; iItem++) { + n += tPutI32v(p ? p + n : p, pMapData->aOffset[iItem] - lOffset); + lOffset = pMapData->aOffset[iItem]; + } + + n += tPutI32v(p ? p + n : p, pMapData->nData); + if (p) { + memcpy(p + n, pMapData->pData, pMapData->nData); + } + n += pMapData->nData; + } + + return n; +} +#endif + +int32_t tGetMapData(uint8_t *p, SMapData *pMapData) { + int32_t n = 0; + int32_t offset; tMapDataReset(pMapData); - size += tGetI32v(p + size, &pMapData->nItem); + n += tGetI32v(p + n, &pMapData->nItem); if (pMapData->nItem) { - if (tRealloc((uint8_t **)&pMapData->aOffset, sizeof(int32_t) * pMapData->nItem)) { - return TSDB_CODE_OUT_OF_MEMORY; - } + if (tRealloc((uint8_t **)&pMapData->aOffset, sizeof(int32_t) * pMapData->nItem)) return -1; int32_t lOffset = 0; for (int32_t iItem = 0; iItem < pMapData->nItem; iItem++) { - size += tGetI32v(p + size, &pMapData->aOffset[iItem]); + n += tGetI32v(p + n, &pMapData->aOffset[iItem]); pMapData->aOffset[iItem] += lOffset; lOffset = pMapData->aOffset[iItem]; } - size += tGetI32v(p + size, &pMapData->nData); - if (tRealloc(&pMapData->pData, pMapData->nData)) { - return TSDB_CODE_OUT_OF_MEMORY; - } - memcpy(pMapData->pData, p + size, pMapData->nData); - size += pMapData->nData; + n += tGetI32v(p + n, &pMapData->nData); + if (tRealloc(&pMapData->pData, pMapData->nData)) return -1; + memcpy(pMapData->pData, p + n, pMapData->nData); + n += pMapData->nData; } - if (decodeSize) { - *decodeSize = size; + return n; +} + +#ifdef BUILD_NO_CALL +// TABLEID ======================================================================= +int32_t tTABLEIDCmprFn(const void *p1, const void *p2) { + TABLEID *pId1 = (TABLEID *)p1; + TABLEID *pId2 = (TABLEID *)p2; + + if (pId1->suid < pId2->suid) { + return -1; + } else if (pId1->suid > pId2->suid) { + return 1; } + + if (pId1->uid < pId2->uid) { + return -1; + } else if (pId1->uid > pId2->uid) { + return 1; + } + return 0; } +// SBlockIdx ====================================================== +int32_t tPutBlockIdx(uint8_t *p, void *ph) { + int32_t n = 0; + SBlockIdx *pBlockIdx = (SBlockIdx *)ph; + + n += tPutI64(p ? p + n : p, pBlockIdx->suid); + n += tPutI64(p ? p + n : p, pBlockIdx->uid); + n += tPutI64v(p ? p + n : p, pBlockIdx->offset); + n += tPutI64v(p ? p + n : p, pBlockIdx->size); + + return n; +} +#endif + int32_t tGetBlockIdx(uint8_t *p, void *ph) { int32_t n = 0; SBlockIdx *pBlockIdx = (SBlockIdx *)ph; @@ -89,6 +225,77 @@ int32_t tGetBlockIdx(uint8_t *p, void *ph) { return n; } +#ifdef BUILD_NO_CALL +int32_t tCmprBlockIdx(void const *lhs, void const *rhs) { + SBlockIdx *lBlockIdx = (SBlockIdx *)lhs; + SBlockIdx *rBlockIdx = (SBlockIdx *)rhs; + + if (lBlockIdx->suid < rBlockIdx->suid) { + return -1; + } else if (lBlockIdx->suid > rBlockIdx->suid) { + return 1; + } + + if (lBlockIdx->uid < rBlockIdx->uid) { + return -1; + } else if (lBlockIdx->uid > rBlockIdx->uid) { + return 1; + } + + return 0; +} + +int32_t tCmprBlockL(void const *lhs, void const *rhs) { + SBlockIdx *lBlockIdx = (SBlockIdx *)lhs; + SSttBlk *rBlockL = (SSttBlk *)rhs; + + if (lBlockIdx->suid < rBlockL->suid) { + return -1; + } else if (lBlockIdx->suid > rBlockL->suid) { + return 1; + } + + if (lBlockIdx->uid < rBlockL->minUid) { + return -1; + } else if (lBlockIdx->uid > rBlockL->maxUid) { + return 1; + } + + return 0; +} + +// SDataBlk ====================================================== +void tDataBlkReset(SDataBlk *pDataBlk) { + *pDataBlk = (SDataBlk){.minKey = TSDBKEY_MAX, .maxKey = TSDBKEY_MIN, .minVer = VERSION_MAX, .maxVer = VERSION_MIN}; +} + +int32_t tPutDataBlk(uint8_t *p, void *ph) { + int32_t n = 0; + SDataBlk *pDataBlk = (SDataBlk *)ph; + + n += tPutI64v(p ? p + n : p, pDataBlk->minKey.version); + n += tPutI64v(p ? p + n : p, pDataBlk->minKey.ts); + n += tPutI64v(p ? p + n : p, pDataBlk->maxKey.version); + n += tPutI64v(p ? p + n : p, pDataBlk->maxKey.ts); + n += tPutI64v(p ? p + n : p, pDataBlk->minVer); + n += tPutI64v(p ? p + n : p, pDataBlk->maxVer); + n += tPutI32v(p ? p + n : p, pDataBlk->nRow); + n += tPutI8(p ? p + n : p, pDataBlk->hasDup); + n += tPutI8(p ? p + n : p, pDataBlk->nSubBlock); + for (int8_t iSubBlock = 0; iSubBlock < pDataBlk->nSubBlock; iSubBlock++) { + n += tPutI64v(p ? p + n : p, pDataBlk->aSubBlock[iSubBlock].offset); + n += tPutI32v(p ? p + n : p, pDataBlk->aSubBlock[iSubBlock].szBlock); + n += tPutI32v(p ? p + n : p, pDataBlk->aSubBlock[iSubBlock].szKey); + } + if (pDataBlk->nSubBlock == 1 && !pDataBlk->hasDup) { + n += tPutI64v(p ? p + n : p, pDataBlk->smaInfo.offset); + n += tPutI32v(p ? p + n : p, pDataBlk->smaInfo.size); + } + + return n; +} +#endif + int32_t tGetDataBlk(uint8_t *p, void *ph) { int32_t n = 0; SDataBlk *pDataBlk = (SDataBlk *)ph; @@ -118,6 +325,48 @@ int32_t tGetDataBlk(uint8_t *p, void *ph) { return n; } +#ifdef BUILD_NO_CALL +int32_t tDataBlkCmprFn(const void *p1, const void *p2) { + SDataBlk *pBlock1 = (SDataBlk *)p1; + SDataBlk *pBlock2 = (SDataBlk *)p2; + + if (tsdbKeyCmprFn(&pBlock1->maxKey, &pBlock2->minKey) < 0) { + return -1; + } else if (tsdbKeyCmprFn(&pBlock1->minKey, &pBlock2->maxKey) > 0) { + return 1; + } + + return 0; +} + +bool tDataBlkHasSma(SDataBlk *pDataBlk) { + if (pDataBlk->nSubBlock > 1) return false; + if (pDataBlk->hasDup) return false; + + return pDataBlk->smaInfo.size > 0; +} + +// SSttBlk ====================================================== +int32_t tPutSttBlk(uint8_t *p, void *ph) { + int32_t n = 0; + SSttBlk *pSttBlk = (SSttBlk *)ph; + + n += tPutI64(p ? p + n : p, pSttBlk->suid); + n += tPutI64(p ? p + n : p, pSttBlk->minUid); + n += tPutI64(p ? p + n : p, pSttBlk->maxUid); + n += tPutI64v(p ? p + n : p, pSttBlk->minKey); + n += tPutI64v(p ? p + n : p, pSttBlk->maxKey); + n += tPutI64v(p ? p + n : p, pSttBlk->minVer); + n += tPutI64v(p ? p + n : p, pSttBlk->maxVer); + n += tPutI32v(p ? p + n : p, pSttBlk->nRow); + n += tPutI64v(p ? p + n : p, pSttBlk->bInfo.offset); + n += tPutI32v(p ? p + n : p, pSttBlk->bInfo.szBlock); + n += tPutI32v(p ? p + n : p, pSttBlk->bInfo.szKey); + + return n; +} +#endif + int32_t tGetSttBlk(uint8_t *p, void *ph) { int32_t n = 0; SSttBlk *pSttBlk = (SSttBlk *)ph; @@ -142,42 +391,47 @@ int32_t tGetSttBlk(uint8_t *p, void *ph) { static const int32_t BLOCK_WITH_ALG_VER = 2; int32_t tPutBlockCol(SBuffer *buffer, const SBlockCol *pBlockCol, int32_t ver, uint32_t defaultCmprAlg) { + int32_t code; + ASSERT(pBlockCol->flag && (pBlockCol->flag != HAS_NONE)); - TAOS_CHECK_RETURN(tBufferPutI16v(buffer, pBlockCol->cid)); - TAOS_CHECK_RETURN(tBufferPutI8(buffer, pBlockCol->type)); - TAOS_CHECK_RETURN(tBufferPutI8(buffer, pBlockCol->cflag)); - TAOS_CHECK_RETURN(tBufferPutI8(buffer, pBlockCol->flag)); - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szOrigin)); + if ((code = tBufferPutI16v(buffer, pBlockCol->cid))) return code; + if ((code = tBufferPutI8(buffer, pBlockCol->type))) return code; + if ((code = tBufferPutI8(buffer, pBlockCol->cflag))) return code; + if ((code = tBufferPutI8(buffer, pBlockCol->flag))) return code; + if ((code = tBufferPutI32v(buffer, pBlockCol->szOrigin))) return code; if (pBlockCol->flag != HAS_NULL) { if (pBlockCol->flag != HAS_VALUE) { - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szBitmap)); + if ((code = tBufferPutI32v(buffer, pBlockCol->szBitmap))) return code; } if (IS_VAR_DATA_TYPE(pBlockCol->type)) { - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szOffset)); + if ((code = tBufferPutI32v(buffer, pBlockCol->szOffset))) return code; } if (pBlockCol->flag != (HAS_NULL | HAS_NONE)) { - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->szValue)); + if ((code = tBufferPutI32v(buffer, pBlockCol->szValue))) return code; } - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pBlockCol->offset)); + + if ((code = tBufferPutI32v(buffer, pBlockCol->offset))) return code; } if (ver >= BLOCK_WITH_ALG_VER) { - TAOS_CHECK_RETURN(tBufferPutU32(buffer, pBlockCol->alg)); + if ((code = tBufferPutU32(buffer, pBlockCol->alg))) return code; } else { - TAOS_CHECK_RETURN(tBufferPutU32(buffer, defaultCmprAlg)); + if ((code = tBufferPutU32(buffer, defaultCmprAlg))) return code; } return 0; } int32_t tGetBlockCol(SBufferReader *br, SBlockCol *pBlockCol, int32_t ver, uint32_t defaultCmprAlg) { - TAOS_CHECK_RETURN(tBufferGetI16v(br, &pBlockCol->cid)); - TAOS_CHECK_RETURN(tBufferGetI8(br, &pBlockCol->type)); - TAOS_CHECK_RETURN(tBufferGetI8(br, &pBlockCol->cflag)); - TAOS_CHECK_RETURN(tBufferGetI8(br, &pBlockCol->flag)); - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szOrigin)); + int32_t code; + + if ((code = tBufferGetI16v(br, &pBlockCol->cid))) return code; + if ((code = tBufferGetI8(br, &pBlockCol->type))) return code; + if ((code = tBufferGetI8(br, &pBlockCol->cflag))) return code; + if ((code = tBufferGetI8(br, &pBlockCol->flag))) return code; + if ((code = tBufferGetI32v(br, &pBlockCol->szOrigin))) return code; ASSERT(pBlockCol->flag && (pBlockCol->flag != HAS_NONE)); @@ -188,22 +442,22 @@ int32_t tGetBlockCol(SBufferReader *br, SBlockCol *pBlockCol, int32_t ver, uint3 if (pBlockCol->flag != HAS_NULL) { if (pBlockCol->flag != HAS_VALUE) { - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szBitmap)); + if ((code = tBufferGetI32v(br, &pBlockCol->szBitmap))) return code; } if (IS_VAR_DATA_TYPE(pBlockCol->type)) { - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szOffset)); + if ((code = tBufferGetI32v(br, &pBlockCol->szOffset))) return code; } if (pBlockCol->flag != (HAS_NULL | HAS_NONE)) { - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->szValue)); + if ((code = tBufferGetI32v(br, &pBlockCol->szValue))) return code; } - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pBlockCol->offset)); + if ((code = tBufferGetI32v(br, &pBlockCol->offset))) return code; } if (ver >= BLOCK_WITH_ALG_VER) { - TAOS_CHECK_RETURN(tBufferGetU32(br, &pBlockCol->alg)); + if ((code = tBufferGetU32(br, &pBlockCol->alg))) return code; } else { pBlockCol->alg = defaultCmprAlg; } @@ -211,6 +465,50 @@ int32_t tGetBlockCol(SBufferReader *br, SBlockCol *pBlockCol, int32_t ver, uint3 return 0; } +#ifdef BUILD_NO_CALL +int32_t tBlockColCmprFn(const void *p1, const void *p2) { + if (((SBlockCol *)p1)->cid < ((SBlockCol *)p2)->cid) { + return -1; + } else if (((SBlockCol *)p1)->cid > ((SBlockCol *)p2)->cid) { + return 1; + } + + return 0; +} + +// SDelIdx ====================================================== +int32_t tCmprDelIdx(void const *lhs, void const *rhs) { + SDelIdx *lDelIdx = (SDelIdx *)lhs; + SDelIdx *rDelIdx = (SDelIdx *)rhs; + + if (lDelIdx->suid < rDelIdx->suid) { + return -1; + } else if (lDelIdx->suid > rDelIdx->suid) { + return 1; + } + + if (lDelIdx->uid < rDelIdx->uid) { + return -1; + } else if (lDelIdx->uid > rDelIdx->uid) { + return 1; + } + + return 0; +} + +int32_t tPutDelIdx(uint8_t *p, void *ph) { + SDelIdx *pDelIdx = (SDelIdx *)ph; + int32_t n = 0; + + n += tPutI64(p ? p + n : p, pDelIdx->suid); + n += tPutI64(p ? p + n : p, pDelIdx->uid); + n += tPutI64v(p ? p + n : p, pDelIdx->offset); + n += tPutI64v(p ? p + n : p, pDelIdx->size); + + return n; +} +#endif + int32_t tGetDelIdx(uint8_t *p, void *ph) { SDelIdx *pDelIdx = (SDelIdx *)ph; int32_t n = 0; @@ -223,6 +521,20 @@ int32_t tGetDelIdx(uint8_t *p, void *ph) { return n; } +#ifdef BUILD_NO_CALL +// SDelData ====================================================== +int32_t tPutDelData(uint8_t *p, void *ph) { + SDelData *pDelData = (SDelData *)ph; + int32_t n = 0; + + n += tPutI64v(p ? p + n : p, pDelData->version); + n += tPutI64(p ? p + n : p, pDelData->sKey); + n += tPutI64(p ? p + n : p, pDelData->eKey); + + return n; +} +#endif + int32_t tGetDelData(uint8_t *p, void *ph) { SDelData *pDelData = (SDelData *)ph; int32_t n = 0; @@ -368,16 +680,20 @@ int32_t tsdbRowCompareWithoutVersion(const void *p1, const void *p2) { // STSDBRowIter ====================================================== int32_t tsdbRowIterOpen(STSDBRowIter *pIter, TSDBROW *pRow, STSchema *pTSchema) { + int32_t code = 0; + pIter->pRow = pRow; if (pRow->type == TSDBROW_ROW_FMT) { - TAOS_CHECK_RETURN(tRowIterOpen(pRow->pTSRow, pTSchema, &pIter->pIter)); + code = tRowIterOpen(pRow->pTSRow, pTSchema, &pIter->pIter); + if (code) goto _exit; } else if (pRow->type == TSDBROW_COL_FMT) { pIter->iColData = 0; } else { ASSERT(0); } - return 0; +_exit: + return code; } void tsdbRowClose(STSDBRowIter *pIter) { @@ -432,7 +748,8 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) *pColVal = COL_VAL_VALUE(pTColumn->colId, ((SValue){.type = pTColumn->type, .val = key.ts})); if (taosArrayPush(pMerger->pArray, pColVal) == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; + return code; } // other @@ -443,9 +760,7 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) --iCol; continue; } else if (pTSchema->columns[jCol].colId > pTColumn->colId) { - if (taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)) == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } + taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)); continue; } @@ -454,7 +769,10 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) uint8_t *pVal = pColVal->value.pData; pColVal->value.pData = NULL; - TAOS_CHECK_RETURN(tRealloc(&pColVal->value.pData, pColVal->value.nData)); + code = tRealloc(&pColVal->value.pData, pColVal->value.nData); + if (code) { + return TSDB_CODE_OUT_OF_MEMORY; + } if (pColVal->value.nData) { memcpy(pColVal->value.pData, pVal, pColVal->value.nData); @@ -462,15 +780,14 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) } if (taosArrayPush(pMerger->pArray, pColVal) == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; + return code; } } for (; iCol < pMerger->pTSchema->numOfCols; ++iCol) { pTColumn = &pMerger->pTSchema->columns[iCol]; - if (taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)) == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } + taosArrayPush(pMerger->pArray, &COL_VAL_NONE(pTColumn->colId, pTColumn->type)); } pMerger->version = key.version; @@ -495,7 +812,8 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) if (IS_VAR_DATA_TYPE(pColVal->value.type)) { SColVal *pTColVal = taosArrayGet(pMerger->pArray, iCol); if (!COL_VAL_IS_NULL(pColVal)) { - TAOS_CHECK_RETURN(tRealloc(&pTColVal->value.pData, pColVal->value.nData)); + code = tRealloc(&pTColVal->value.pData, pColVal->value.nData); + if (code) return code; pTColVal->value.nData = pColVal->value.nData; if (pTColVal->value.nData) { @@ -514,7 +832,8 @@ int32_t tsdbRowMergerAdd(SRowMerger *pMerger, TSDBROW *pRow, STSchema *pTSchema) SColVal *tColVal = (SColVal *)taosArrayGet(pMerger->pArray, iCol); if (COL_VAL_IS_NONE(tColVal) && !COL_VAL_IS_NONE(pColVal)) { if ((!COL_VAL_IS_NULL(pColVal)) && IS_VAR_DATA_TYPE(pColVal->value.type)) { - TAOS_CHECK_RETURN(tRealloc(&tColVal->value.pData, pColVal->value.nData)); + code = tRealloc(&tColVal->value.pData, pColVal->value.nData); + if (code) return code; tColVal->value.nData = pColVal->value.nData; if (pColVal->value.nData) { @@ -572,8 +891,79 @@ int32_t tsdbRowMergerGetRow(SRowMerger *pMerger, SRow **ppRow) { return tRowBuild(pMerger->pArray, pMerger->pTSchema, ppRow); } +/* +// delete skyline ====================================================== +static int32_t tsdbMergeSkyline2(SArray *aSkyline1, SArray *aSkyline2, SArray *aSkyline) { + int32_t code = 0; + int32_t i1 = 0; + int32_t n1 = taosArrayGetSize(aSkyline1); + int32_t i2 = 0; + int32_t n2 = taosArrayGetSize(aSkyline2); + TSDBKEY *pSkyline1; + TSDBKEY *pSkyline2; + TSDBKEY item; + int64_t version1 = 0; + int64_t version2 = 0; + + ASSERT(n1 > 0 && n2 > 0); + + taosArrayClear(aSkyline); + + while (i1 < n1 && i2 < n2) { + pSkyline1 = (TSDBKEY *)taosArrayGet(aSkyline1, i1); + pSkyline2 = (TSDBKEY *)taosArrayGet(aSkyline2, i2); + + if (pSkyline1->ts < pSkyline2->ts) { + version1 = pSkyline1->version; + i1++; + } else if (pSkyline1->ts > pSkyline2->ts) { + version2 = pSkyline2->version; + i2++; + } else { + version1 = pSkyline1->version; + version2 = pSkyline2->version; + i1++; + i2++; + } + + item.ts = TMIN(pSkyline1->ts, pSkyline2->ts); + item.version = TMAX(version1, version2); + if (taosArrayPush(aSkyline, &item) == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _exit; + } + } + + while (i1 < n1) { + pSkyline1 = (TSDBKEY *)taosArrayGet(aSkyline1, i1); + item.ts = pSkyline1->ts; + item.version = pSkyline1->version; + if (taosArrayPush(aSkyline, &item) == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _exit; + } + i1++; + } + + while (i2 < n2) { + pSkyline2 = (TSDBKEY *)taosArrayGet(aSkyline2, i2); + item.ts = pSkyline2->ts; + item.version = pSkyline2->version; + if (taosArrayPush(aSkyline, &item) == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _exit; + } + i2++; + } + +_exit: + return code; +} +*/ + // delete skyline ====================================================== static int32_t tsdbMergeSkyline(SArray *pSkyline1, SArray *pSkyline2, SArray *pSkyline) { + int32_t code = 0; int32_t i1 = 0; int32_t n1 = taosArrayGetSize(pSkyline1); int32_t i2 = 0; @@ -627,7 +1017,7 @@ static int32_t tsdbMergeSkyline(SArray *pSkyline1, SArray *pSkyline2, SArray *pS } pSkyline->size = TARRAY_ELEM_IDX(pSkyline, pItem); - return 0; + return code; } int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, SArray *pSkyline) { @@ -639,12 +1029,8 @@ int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, if (sidx == eidx) { TSDBKEY *pItem1 = taosArrayGet(aSkyline, sidx * 2); TSDBKEY *pItem2 = taosArrayGet(aSkyline, sidx * 2 + 1); - if (taosArrayPush(pSkyline, &pItem1) == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } - if (taosArrayPush(pSkyline, &pItem2) == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } + taosArrayPush(pSkyline, &pItem1); + taosArrayPush(pSkyline, &pItem2); } else { SArray *pSkyline1 = NULL; SArray *pSkyline2 = NULL; @@ -657,8 +1043,11 @@ int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, goto _clear; } - TAOS_CHECK_GOTO(tsdbBuildDeleteSkylineImpl(aSkyline, sidx, midx, pSkyline1), NULL, _clear); - TAOS_CHECK_GOTO(tsdbBuildDeleteSkylineImpl(aSkyline, midx + 1, eidx, pSkyline2), NULL, _clear); + code = tsdbBuildDeleteSkylineImpl(aSkyline, sidx, midx, pSkyline1); + if (code) goto _clear; + + code = tsdbBuildDeleteSkylineImpl(aSkyline, midx + 1, eidx, pSkyline2); + if (code) goto _clear; code = tsdbMergeSkyline(pSkyline1, pSkyline2, pSkyline); @@ -674,48 +1063,72 @@ int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SAr SDelData *pDelData; int32_t code = 0; int32_t dataNum = eidx - sidx + 1; - SArray *aTmpSkyline; - SArray *pSkyline; - - aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY)); - if (aTmpSkyline == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } - - pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES); - if (pSkyline) { - taosArrayDestroy(aTmpSkyline); - return TSDB_CODE_OUT_OF_MEMORY; - } + SArray *aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY)); + SArray *pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES); taosArrayClear(aSkyline); for (int32_t i = sidx; i <= eidx; ++i) { pDelData = (SDelData *)taosArrayGet(aDelData, i); - if (taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}) == NULL) { - TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _clear); - } - - if (taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}) == NULL) { - TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _clear); - } + taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}); + taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}); } - TAOS_CHECK_GOTO(tsdbBuildDeleteSkylineImpl(aTmpSkyline, sidx, eidx, pSkyline), NULL, _clear); + code = tsdbBuildDeleteSkylineImpl(aTmpSkyline, sidx, eidx, pSkyline); + if (code) goto _clear; int32_t skylineNum = taosArrayGetSize(pSkyline); for (int32_t i = 0; i < skylineNum; ++i) { TSDBKEY *p = taosArrayGetP(pSkyline, i); - if (taosArrayPush(aSkyline, p) == NULL) { - TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _clear); - } + taosArrayPush(aSkyline, p); } _clear: taosArrayDestroy(aTmpSkyline); taosArrayDestroy(pSkyline); + return code; } +/* +int32_t tsdbBuildDeleteSkyline2(SArray *aDelData, int32_t sidx, int32_t eidx, SArray *aSkyline) { + int32_t code = 0; + SDelData *pDelData; + int32_t midx; + + taosArrayClear(aSkyline); + if (sidx == eidx) { + pDelData = (SDelData *)taosArrayGet(aDelData, sidx); + taosArrayPush(aSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}); + taosArrayPush(aSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}); + } else { + SArray *aSkyline1 = NULL; + SArray *aSkyline2 = NULL; + + aSkyline1 = taosArrayInit(0, sizeof(TSDBKEY)); + aSkyline2 = taosArrayInit(0, sizeof(TSDBKEY)); + if (aSkyline1 == NULL || aSkyline2 == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _clear; + } + midx = (sidx + eidx) / 2; + + code = tsdbBuildDeleteSkyline(aDelData, sidx, midx, aSkyline1); + if (code) goto _clear; + + code = tsdbBuildDeleteSkyline(aDelData, midx + 1, eidx, aSkyline2); + if (code) goto _clear; + + code = tsdbMergeSkyline(aSkyline1, aSkyline2, aSkyline); + + _clear: + taosArrayDestroy(aSkyline1); + taosArrayDestroy(aSkyline2); + } + + return code; +} +*/ + // SBlockData ====================================================== int32_t tBlockDataCreate(SBlockData *pBlockData) { pBlockData->suid = 0; @@ -745,6 +1158,8 @@ void tBlockDataDestroy(SBlockData *pBlockData) { } static int32_t tBlockDataAdjustColData(SBlockData *pBlockData, int32_t nColData) { + int32_t code = 0; + if (pBlockData->nColData > nColData) { for (int32_t i = nColData; i < pBlockData->nColData; i++) { tColDataDestroy(&pBlockData->aColData[i]); @@ -752,7 +1167,8 @@ static int32_t tBlockDataAdjustColData(SBlockData *pBlockData, int32_t nColData) } else if (pBlockData->nColData < nColData) { SColData *aColData = taosMemoryRealloc(pBlockData->aColData, sizeof(SBlockData) * nColData); if (aColData == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_OUT_OF_MEMORY; + goto _exit; } pBlockData->aColData = aColData; @@ -760,10 +1176,12 @@ static int32_t tBlockDataAdjustColData(SBlockData *pBlockData, int32_t nColData) } pBlockData->nColData = nColData; - return 0; +_exit: + return code; } - int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, int16_t *aCid, int32_t nCid) { + int32_t code = 0; + ASSERT(pId->suid || pId->uid); pBlockData->suid = pId->suid; @@ -771,7 +1189,8 @@ int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, pBlockData->nRow = 0; if (aCid) { - TAOS_CHECK_RETURN(tBlockDataAdjustColData(pBlockData, nCid)); + code = tBlockDataAdjustColData(pBlockData, nCid); + if (code) goto _exit; int32_t iColumn = 1; STColumn *pTColumn = &pTSchema->columns[iColumn]; @@ -798,14 +1217,17 @@ int32_t tBlockDataInit(SBlockData *pBlockData, TABLEID *pId, STSchema *pTSchema, pTColumn = (iColumn < pTSchema->numOfCols) ? &pTSchema->columns[iColumn] : NULL; } } else { - TAOS_CHECK_RETURN(tBlockDataAdjustColData(pBlockData, pTSchema->numOfCols - 1)); + code = tBlockDataAdjustColData(pBlockData, pTSchema->numOfCols - 1); + if (code) goto _exit; for (int32_t iColData = 0; iColData < pBlockData->nColData; iColData++) { STColumn *pTColumn = &pTSchema->columns[iColData + 1]; tColDataInit(&pBlockData->aColData[iColData], pTColumn->colId, pTColumn->type, pTColumn->flags); } } - return 0; + +_exit: + return code; } void tBlockDataReset(SBlockData *pBlockData) { @@ -887,35 +1309,43 @@ _exit: } int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema, int64_t uid) { + int32_t code = 0; + ASSERT(pBlockData->suid || pBlockData->uid); // uid if (pBlockData->uid == 0) { ASSERT(uid); - TAOS_CHECK_RETURN(tRealloc((uint8_t **)&pBlockData->aUid, sizeof(int64_t) * (pBlockData->nRow + 1))); + code = tRealloc((uint8_t **)&pBlockData->aUid, sizeof(int64_t) * (pBlockData->nRow + 1)); + if (code) goto _exit; pBlockData->aUid[pBlockData->nRow] = uid; } // version - TAOS_CHECK_RETURN(tRealloc((uint8_t **)&pBlockData->aVersion, sizeof(int64_t) * (pBlockData->nRow + 1))); + code = tRealloc((uint8_t **)&pBlockData->aVersion, sizeof(int64_t) * (pBlockData->nRow + 1)); + if (code) goto _exit; pBlockData->aVersion[pBlockData->nRow] = TSDBROW_VERSION(pRow); // timestamp - TAOS_CHECK_RETURN(tRealloc((uint8_t **)&pBlockData->aTSKEY, sizeof(TSKEY) * (pBlockData->nRow + 1))); + code = tRealloc((uint8_t **)&pBlockData->aTSKEY, sizeof(TSKEY) * (pBlockData->nRow + 1)); + if (code) goto _exit; pBlockData->aTSKEY[pBlockData->nRow] = TSDBROW_TS(pRow); if (pRow->type == TSDBROW_ROW_FMT) { - TAOS_CHECK_RETURN( - tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, 0 /* append */)); + code = tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, 0 /* append */); + if (code) goto _exit; } else if (pRow->type == TSDBROW_COL_FMT) { - TAOS_CHECK_RETURN(tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, 0 /* append */)); + code = tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, 0 /* append */); + if (code) goto _exit; } else { ASSERT(0); } pBlockData->nRow++; - return 0; +_exit: + return code; } - int32_t tBlockDataUpdateRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema) { + int32_t code = 0; + // version int64_t lversion = pBlockData->aVersion[pBlockData->nRow - 1]; int64_t rversion = TSDBROW_VERSION(pRow); @@ -926,18 +1356,40 @@ int32_t tBlockDataUpdateRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTS // update other rows if (pRow->type == TSDBROW_ROW_FMT) { - TAOS_CHECK_RETURN(tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, - (rversion > lversion) ? 1 : -1 /* update */)); + code = tRowUpsertColData(pRow->pTSRow, pTSchema, pBlockData->aColData, pBlockData->nColData, + (rversion > lversion) ? 1 : -1 /* update */); + if (code) goto _exit; } else if (pRow->type == TSDBROW_COL_FMT) { - TAOS_CHECK_RETURN( - tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, (rversion > lversion) ? 1 : -1)); + code = tBlockDataUpsertBlockRow(pBlockData, pRow->pBlockData, pRow->iRow, (rversion > lversion) ? 1 : -1); + if (code) goto _exit; } else { ASSERT(0); } - return 0; +_exit: + return code; } +#ifdef BUILD_NO_CALL +int32_t tBlockDataTryUpsertRow(SBlockData *pBlockData, TSDBROW *pRow, int64_t uid) { + if (pBlockData->nRow == 0) { + return 1; + } else if (pBlockData->aTSKEY[pBlockData->nRow - 1] == TSDBROW_TS(pRow)) { + return pBlockData->nRow; + } else { + return pBlockData->nRow + 1; + } +} + +int32_t tBlockDataUpsertRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema, int64_t uid) { + if (pBlockData->nRow > 0 && pBlockData->aTSKEY[pBlockData->nRow - 1] == TSDBROW_TS(pRow)) { + return tBlockDataUpdateRow(pBlockData, pRow, pTSchema); + } else { + return tBlockDataAppendRow(pBlockData, pRow, pTSchema, uid); + } +} +#endif + SColData *tBlockDataGetColData(SBlockData *pBlockData, int16_t cid) { ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID); int32_t lidx = 0; @@ -970,8 +1422,7 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB int32_t lino = 0; SColCompressInfo *pInfo = pCompr; - - TAOS_CHECK_GOTO(tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, 1, &pInfo->defaultCmprAlg), &lino, _exit); + code = tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, 1, &pInfo->defaultCmprAlg); SDiskDataHdr hdr = { .delimiter = TSDB_FILE_DLMT, @@ -989,7 +1440,8 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB // Key part tBufferClear(&buffers[1]); - TAOS_CHECK_GOTO(tBlockDataCompressKeyPart(bData, &hdr, &buffers[1], assist, (SColCompressInfo *)pInfo), &lino, _exit); + code = tBlockDataCompressKeyPart(bData, &hdr, &buffers[1], assist, (SColCompressInfo *)pInfo); + TSDB_CHECK_CODE(code, lino, _exit); // Regulart column part tBufferClear(&buffers[2]); @@ -1007,10 +1459,14 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB SColDataCompressInfo cinfo = { .cmprAlg = pInfo->defaultCmprAlg, }; - TAOS_UNUSED(tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, colData->cid, &cinfo.cmprAlg)); + code = tsdbGetColCmprAlgFromSet(pInfo->pColCmpr, colData->cid, &cinfo.cmprAlg); + if (code < 0) { + // + } int32_t offset = buffers[3].size; - TAOS_CHECK_GOTO(tColDataCompress(colData, &cinfo, &buffers[3], assist), &lino, _exit); + code = tColDataCompress(colData, &cinfo, &buffers[3], assist); + TSDB_CHECK_CODE(code, lino, _exit); SBlockCol blockCol = (SBlockCol){.cid = cinfo.columnId, .type = cinfo.dataType, @@ -1023,13 +1479,15 @@ int32_t tBlockDataCompress(SBlockData *bData, void *pCompr, SBuffer *buffers, SB .offset = offset, .alg = cinfo.cmprAlg}; - TAOS_CHECK_GOTO(tPutBlockCol(&buffers[2], &blockCol, hdr.fmtVer, hdr.cmprAlg), &lino, _exit); + code = tPutBlockCol(&buffers[2], &blockCol, hdr.fmtVer, hdr.cmprAlg); + TSDB_CHECK_CODE(code, lino, _exit); } hdr.szBlkCol = buffers[2].size; // SDiskDataHdr part tBufferClear(&buffers[0]); - TAOS_CHECK_GOTO(tPutDiskDataHdr(&buffers[0], &hdr), &lino, _exit); + code = tPutDiskDataHdr(&buffers[0], &hdr); + TSDB_CHECK_CODE(code, lino, _exit); _exit: return code; @@ -1042,7 +1500,8 @@ int32_t tBlockDataDecompress(SBufferReader *br, SBlockData *blockData, SBuffer * SCompressInfo cinfo; // SDiskDataHdr - TAOS_CHECK_GOTO(tGetDiskDataHdr(br, &hdr), &lino, _exit); + code = tGetDiskDataHdr(br, &hdr); + TSDB_CHECK_CODE(code, lino, _exit); tBlockDataReset(blockData); blockData->suid = hdr.suid; @@ -1050,7 +1509,8 @@ int32_t tBlockDataDecompress(SBufferReader *br, SBlockData *blockData, SBuffer * blockData->nRow = hdr.nRow; // Key part - TAOS_CHECK_GOTO(tBlockDataDecompressKeyPart(&hdr, br, blockData, assist), &lino, _exit); + code = tBlockDataDecompressKeyPart(&hdr, br, blockData, assist); + TSDB_CHECK_CODE(code, lino, _exit); // Column part SBufferReader br2 = *br; @@ -1058,11 +1518,11 @@ int32_t tBlockDataDecompress(SBufferReader *br, SBlockData *blockData, SBuffer * for (uint32_t startOffset = br2.offset; br2.offset - startOffset < hdr.szBlkCol;) { SBlockCol blockCol; - TAOS_CHECK_GOTO(tGetBlockCol(&br2, &blockCol, hdr.fmtVer, hdr.cmprAlg), &lino, _exit); - + code = tGetBlockCol(&br2, &blockCol, hdr.fmtVer, hdr.cmprAlg); if (blockCol.alg == 0) blockCol.alg = hdr.cmprAlg; - - TAOS_CHECK_GOTO(tBlockDataDecompressColData(&hdr, &blockCol, br, blockData, assist), &lino, _exit); + TSDB_CHECK_CODE(code, lino, _exit); + code = tBlockDataDecompressColData(&hdr, &blockCol, br, blockData, assist); + TSDB_CHECK_CODE(code, lino, _exit); } _exit: @@ -1071,26 +1531,28 @@ _exit: // SDiskDataHdr ============================== int32_t tPutDiskDataHdr(SBuffer *buffer, const SDiskDataHdr *pHdr) { - TAOS_CHECK_RETURN(tBufferPutU32(buffer, pHdr->delimiter)); - TAOS_CHECK_RETURN(tBufferPutU32v(buffer, pHdr->fmtVer)); - TAOS_CHECK_RETURN(tBufferPutI64(buffer, pHdr->suid)); - TAOS_CHECK_RETURN(tBufferPutI64(buffer, pHdr->uid)); - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szUid)); - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szVer)); - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szKey)); - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->szBlkCol)); - TAOS_CHECK_RETURN(tBufferPutI32v(buffer, pHdr->nRow)); + int32_t code; + + if ((code = tBufferPutU32(buffer, pHdr->delimiter))) return code; + if ((code = tBufferPutU32v(buffer, pHdr->fmtVer))) return code; + if ((code = tBufferPutI64(buffer, pHdr->suid))) return code; + if ((code = tBufferPutI64(buffer, pHdr->uid))) return code; + if ((code = tBufferPutI32v(buffer, pHdr->szUid))) return code; + if ((code = tBufferPutI32v(buffer, pHdr->szVer))) return code; + if ((code = tBufferPutI32v(buffer, pHdr->szKey))) return code; + if ((code = tBufferPutI32v(buffer, pHdr->szBlkCol))) return code; + if ((code = tBufferPutI32v(buffer, pHdr->nRow))) return code; if (pHdr->fmtVer < 2) { - TAOS_CHECK_RETURN(tBufferPutI8(buffer, pHdr->cmprAlg)); + if ((code = tBufferPutI8(buffer, pHdr->cmprAlg))) return code; } else if (pHdr->fmtVer == 2) { - TAOS_CHECK_RETURN(tBufferPutU32(buffer, pHdr->cmprAlg)); + if ((code = tBufferPutU32(buffer, pHdr->cmprAlg))) return code; } else { // more data fmt ver } if (pHdr->fmtVer >= 1) { - TAOS_CHECK_RETURN(tBufferPutI8(buffer, pHdr->numOfPKs)); + if ((code = tBufferPutI8(buffer, pHdr->numOfPKs))) return code; for (int i = 0; i < pHdr->numOfPKs; i++) { - TAOS_CHECK_RETURN(tPutBlockCol(buffer, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg)); + if ((code = tPutBlockCol(buffer, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg))) return code; } } @@ -1098,28 +1560,32 @@ int32_t tPutDiskDataHdr(SBuffer *buffer, const SDiskDataHdr *pHdr) { } int32_t tGetDiskDataHdr(SBufferReader *br, SDiskDataHdr *pHdr) { - TAOS_CHECK_RETURN(tBufferGetU32(br, &pHdr->delimiter)); - TAOS_CHECK_RETURN(tBufferGetU32v(br, &pHdr->fmtVer)); - TAOS_CHECK_RETURN(tBufferGetI64(br, &pHdr->suid)); - TAOS_CHECK_RETURN(tBufferGetI64(br, &pHdr->uid)); - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szUid)); - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szVer)); - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szKey)); - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->szBlkCol)); - TAOS_CHECK_RETURN(tBufferGetI32v(br, &pHdr->nRow)); + int32_t code; + + if ((code = tBufferGetU32(br, &pHdr->delimiter))) return code; + if ((code = tBufferGetU32v(br, &pHdr->fmtVer))) return code; + if ((code = tBufferGetI64(br, &pHdr->suid))) return code; + if ((code = tBufferGetI64(br, &pHdr->uid))) return code; + if ((code = tBufferGetI32v(br, &pHdr->szUid))) return code; + if ((code = tBufferGetI32v(br, &pHdr->szVer))) return code; + if ((code = tBufferGetI32v(br, &pHdr->szKey))) return code; + if ((code = tBufferGetI32v(br, &pHdr->szBlkCol))) return code; + if ((code = tBufferGetI32v(br, &pHdr->nRow))) return code; if (pHdr->fmtVer < 2) { int8_t cmprAlg = 0; - TAOS_CHECK_RETURN(tBufferGetI8(br, &cmprAlg)); + if ((code = tBufferGetI8(br, &cmprAlg))) return code; pHdr->cmprAlg = cmprAlg; } else if (pHdr->fmtVer == 2) { - TAOS_CHECK_RETURN(tBufferGetU32(br, &pHdr->cmprAlg)); + if ((code = tBufferGetU32(br, &pHdr->cmprAlg))) return code; } else { // more data fmt ver } if (pHdr->fmtVer >= 1) { - TAOS_CHECK_RETURN(tBufferGetI8(br, &pHdr->numOfPKs)); + if ((code = tBufferGetI8(br, &pHdr->numOfPKs))) return code; for (int i = 0; i < pHdr->numOfPKs; i++) { - TAOS_CHECK_RETURN(tGetBlockCol(br, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg)); + if ((code = tGetBlockCol(br, &pHdr->primaryBlockCols[i], pHdr->fmtVer, pHdr->cmprAlg))) { + return code; + } } } else { pHdr->numOfPKs = 0; @@ -1130,20 +1596,26 @@ int32_t tGetDiskDataHdr(SBufferReader *br, SDiskDataHdr *pHdr) { // ALGORITHM ============================== int32_t tPutColumnDataAgg(SBuffer *buffer, SColumnDataAgg *pColAgg) { - TAOS_CHECK_RETURN(tBufferPutI16v(buffer, pColAgg->colId)); - TAOS_CHECK_RETURN(tBufferPutI16v(buffer, pColAgg->numOfNull)); - TAOS_CHECK_RETURN(tBufferPutI64(buffer, pColAgg->sum)); - TAOS_CHECK_RETURN(tBufferPutI64(buffer, pColAgg->max)); - TAOS_CHECK_RETURN(tBufferPutI64(buffer, pColAgg->min)); + int32_t code; + + if ((code = tBufferPutI16v(buffer, pColAgg->colId))) return code; + if ((code = tBufferPutI16v(buffer, pColAgg->numOfNull))) return code; + if ((code = tBufferPutI64(buffer, pColAgg->sum))) return code; + if ((code = tBufferPutI64(buffer, pColAgg->max))) return code; + if ((code = tBufferPutI64(buffer, pColAgg->min))) return code; + return 0; } int32_t tGetColumnDataAgg(SBufferReader *br, SColumnDataAgg *pColAgg) { - TAOS_CHECK_RETURN(tBufferGetI16v(br, &pColAgg->colId)); - TAOS_CHECK_RETURN(tBufferGetI16v(br, &pColAgg->numOfNull)); - TAOS_CHECK_RETURN(tBufferGetI64(br, &pColAgg->sum)); - TAOS_CHECK_RETURN(tBufferGetI64(br, &pColAgg->max)); - TAOS_CHECK_RETURN(tBufferGetI64(br, &pColAgg->min)); + int32_t code; + + if ((code = tBufferGetI16v(br, &pColAgg->colId))) return code; + if ((code = tBufferGetI16v(br, &pColAgg->numOfNull))) return code; + if ((code = tBufferGetI64(br, &pColAgg->sum))) return code; + if ((code = tBufferGetI64(br, &pColAgg->max))) return code; + if ((code = tBufferGetI64(br, &pColAgg->min))) return code; + return 0; } @@ -1160,7 +1632,8 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S .dataType = TSDB_DATA_TYPE_BIGINT, .originalSize = sizeof(int64_t) * bData->nRow, }; - TAOS_CHECK_GOTO(tCompressDataToBuffer(bData->aUid, &cinfo, buffer, assist), &lino, _exit); + code = tCompressDataToBuffer(bData->aUid, &cinfo, buffer, assist); + TSDB_CHECK_CODE(code, lino, _exit); hdr->szUid = cinfo.compressedSize; } @@ -1170,7 +1643,8 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S .dataType = TSDB_DATA_TYPE_BIGINT, .originalSize = sizeof(int64_t) * bData->nRow, }; - TAOS_CHECK_GOTO(tCompressDataToBuffer((uint8_t *)bData->aVersion, &cinfo, buffer, assist), &lino, _exit); + code = tCompressDataToBuffer((uint8_t *)bData->aVersion, &cinfo, buffer, assist); + TSDB_CHECK_CODE(code, lino, _exit); hdr->szVer = cinfo.compressedSize; // ts @@ -1180,7 +1654,8 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S .originalSize = sizeof(TSKEY) * bData->nRow, }; - TAOS_CHECK_GOTO(tCompressDataToBuffer((uint8_t *)bData->aTSKEY, &cinfo, buffer, assist), &lino, _exit); + code = tCompressDataToBuffer((uint8_t *)bData->aTSKEY, &cinfo, buffer, assist); + TSDB_CHECK_CODE(code, lino, _exit); hdr->szKey = cinfo.compressedSize; // primary keys @@ -1197,9 +1672,14 @@ static int32_t tBlockDataCompressKeyPart(SBlockData *bData, SDiskDataHdr *hdr, S SColDataCompressInfo info = { .cmprAlg = hdr->cmprAlg, }; - TAOS_UNUSED(tsdbGetColCmprAlgFromSet(compressInfo->pColCmpr, colData->cid, &info.cmprAlg)); + code = tsdbGetColCmprAlgFromSet(compressInfo->pColCmpr, colData->cid, &info.cmprAlg); + if (code < 0) { + // do nothing + } else { + } - TAOS_CHECK_GOTO(tColDataCompress(colData, &info, buffer, assist), &lino, _exit); + code = tColDataCompress(colData, &info, buffer, assist); + TSDB_CHECK_CODE(code, lino, _exit); *blockCol = (SBlockCol){ .cid = info.columnId, @@ -1226,8 +1706,8 @@ int32_t tBlockDataDecompressColData(const SDiskDataHdr *hdr, const SBlockCol *bl SColData *colData; - TAOS_CHECK_GOTO(tBlockDataAddColData(blockData, blockCol->cid, blockCol->type, blockCol->cflag, &colData), &lino, - _exit); + code = tBlockDataAddColData(blockData, blockCol->cid, blockCol->type, blockCol->cflag, &colData); + TSDB_CHECK_CODE(code, lino, _exit); // ASSERT(blockCol->flag != HAS_NONE); @@ -1257,7 +1737,8 @@ int32_t tBlockDataDecompressColData(const SDiskDataHdr *hdr, const SBlockCol *bl break; } - TAOS_CHECK_GOTO(tColDataDecompress(BR_PTR(br), &info, colData, assist), &lino, _exit); + code = tColDataDecompress(BR_PTR(br), &info, colData, assist); + TSDB_CHECK_CODE(code, lino, _exit); br->offset += blockCol->szBitmap + blockCol->szOffset + blockCol->szValue; _exit: @@ -1279,8 +1760,10 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, .originalSize = sizeof(int64_t) * hdr->nRow, }; - TAOS_CHECK_GOTO(tRealloc((uint8_t **)&blockData->aUid, cinfo.originalSize), &lino, _exit); - TAOS_CHECK_GOTO(tDecompressData(BR_PTR(br), &cinfo, blockData->aUid, cinfo.originalSize, assist), &lino, _exit); + code = tRealloc((uint8_t **)&blockData->aUid, cinfo.originalSize); + TSDB_CHECK_CODE(code, lino, _exit); + code = tDecompressData(BR_PTR(br), &cinfo, blockData->aUid, cinfo.originalSize, assist); + TSDB_CHECK_CODE(code, lino, _exit); br->offset += cinfo.compressedSize; } @@ -1291,8 +1774,10 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, .compressedSize = hdr->szVer, .originalSize = sizeof(int64_t) * hdr->nRow, }; - TAOS_CHECK_GOTO(tRealloc((uint8_t **)&blockData->aVersion, cinfo.originalSize), &lino, _exit); - TAOS_CHECK_GOTO(tDecompressData(BR_PTR(br), &cinfo, blockData->aVersion, cinfo.originalSize, assist), &lino, _exit); + code = tRealloc((uint8_t **)&blockData->aVersion, cinfo.originalSize); + TSDB_CHECK_CODE(code, lino, _exit); + code = tDecompressData(BR_PTR(br), &cinfo, blockData->aVersion, cinfo.originalSize, assist); + TSDB_CHECK_CODE(code, lino, _exit); br->offset += cinfo.compressedSize; // ts @@ -1302,8 +1787,10 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, .compressedSize = hdr->szKey, .originalSize = sizeof(TSKEY) * hdr->nRow, }; - TAOS_CHECK_GOTO(tRealloc((uint8_t **)&blockData->aTSKEY, cinfo.originalSize), &lino, _exit); - TAOS_CHECK_GOTO(tDecompressData(BR_PTR(br), &cinfo, blockData->aTSKEY, cinfo.originalSize, assist), &lino, _exit); + code = tRealloc((uint8_t **)&blockData->aTSKEY, cinfo.originalSize); + TSDB_CHECK_CODE(code, lino, _exit); + code = tDecompressData(BR_PTR(br), &cinfo, blockData->aTSKEY, cinfo.originalSize, assist); + TSDB_CHECK_CODE(code, lino, _exit); br->offset += cinfo.compressedSize; // primary keys @@ -1313,7 +1800,8 @@ int32_t tBlockDataDecompressKeyPart(const SDiskDataHdr *hdr, SBufferReader *br, ASSERT(blockCol->flag == HAS_VALUE); ASSERT(blockCol->cflag & COL_IS_KEY); - TAOS_CHECK_GOTO(tBlockDataDecompressColData(hdr, blockCol, br, blockData, assist), &lino, _exit); + code = tBlockDataDecompressColData(hdr, blockCol, br, blockData, assist); + TSDB_CHECK_CODE(code, lino, _exit); } _exit: @@ -1321,19 +1809,14 @@ _exit: } int32_t tsdbGetColCmprAlgFromSet(SHashObj *set, int16_t colId, uint32_t *alg) { - if (set == NULL) { - return TSDB_CODE_INVALID_PARA; - } + if (set == NULL) return -1; uint32_t *ret = taosHashGet(set, &colId, sizeof(colId)); - if (ret == NULL) { - return TSDB_CODE_NOT_FOUND; - } + if (ret == NULL) return -1; *alg = *ret; return 0; } - uint32_t tsdbCvtTimestampAlg(uint32_t alg) { DEFINE_VAR(alg) From a8433ec6eb4156c403d5df05330ecdd47a382eab Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jul 2024 00:31:28 +0800 Subject: [PATCH 32/45] fix(tsdb):set the initialized value. --- source/dnode/vnode/src/tsdb/tsdbRead2.c | 9 ++++++++- source/dnode/vnode/src/tsdb/tsdbReadUtil.c | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index 9ee5e1c7ba..2474666e93 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -296,8 +296,11 @@ static int32_t filesetIteratorNext(SFilesetIter* pIter, STsdbReader* pReader, bo pIter->pSttBlockReader->uid = 0; tMergeTreeClose(&pIter->pSttBlockReader->mergeTree); destroySttBlockReader(pReader->status.pLDataIterArray, &pCost->sttCost); - pReader->status.pLDataIterArray = NULL; + pReader->status.pLDataIterArray = taosArrayInit(4, POINTER_BYTES); + if (pReader->status.pLDataIterArray == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } // check file the time range of coverage STimeWindow win = {0}; @@ -711,6 +714,10 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S return code; } + if (pRecord == NULL) { + break; + } + if (pRecord->suid > pReader->info.suid) { break; } diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c index f937dac606..3051b097be 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c @@ -461,7 +461,7 @@ int32_t getNextBrinRecord(SBrinRecordIter* pIter, SBrinRecord** pRecord) { if (pIter->blockIndex == -1 || (pIter->recordIndex + 1) >= pIter->block.numOfRecords) { pIter->blockIndex += 1; if (pIter->blockIndex >= taosArrayGetSize(pIter->pBrinBlockList)) { - return TSDB_CODE_FAILED; + return TSDB_CODE_SUCCESS; } pIter->pCurrentBlk = taosArrayGet(pIter->pBrinBlockList, pIter->blockIndex); @@ -470,7 +470,7 @@ int32_t getNextBrinRecord(SBrinRecordIter* pIter, SBrinRecord** pRecord) { int32_t code = tsdbDataFileReadBrinBlock(pIter->pReader, pIter->pCurrentBlk, &pIter->block); if (code != TSDB_CODE_SUCCESS) { tsdbError("failed to read brinBlock from file, code:%s", tstrerror(code)); - return TSDB_CODE_FAILED; + return code; } pIter->recordIndex = -1; From 80a7b7da5fb0635d25e704011ba31be483f14eb3 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jul 2024 08:58:39 +0800 Subject: [PATCH 33/45] fix(tsdb): fix invalid return value. --- source/dnode/vnode/src/tsdb/tsdbReadUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c index 3051b097be..d7da6cbd9d 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c @@ -656,7 +656,7 @@ int32_t initBlockIterator(STsdbReader* pReader, SDataBlockIter* pBlockIter, int3 } void* p = taosArrayAddAll(pBlockIter->blockList, pTableScanInfo->pBlockList); - if (p != NULL) { + if (p == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } From 438921e9cc9cf12cdc33eb56e980d8ead3a8782b Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jul 2024 09:30:58 +0800 Subject: [PATCH 34/45] refactor: check return value for each function. --- include/libs/stream/tstream.h | 2 + source/libs/stream/src/streamHb.c | 82 +++++++++++++++++++--------- source/libs/stream/src/streamMeta.c | 13 +++-- source/libs/stream/src/streamTimer.c | 11 ++++ 4 files changed, 78 insertions(+), 30 deletions(-) diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 068f0a282e..5327428f5b 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -771,6 +771,8 @@ int32_t streamTaskSendRestoreChkptMsg(SStreamTask* pTask); // timer tmr_h streamTimerGetInstance(); +void streamTmrReset(TAOS_TMR_CALLBACK fp, int32_t mseconds, void* param, void* handle, tmr_h* pTmrId, int32_t vgId, + const char* pMsg); // checkpoint int32_t streamProcessCheckpointSourceReq(SStreamTask* pTask, SStreamCheckpointSourceReq* pReq); diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index 84eb6b319f..bcfe2c4243 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -54,7 +54,7 @@ static bool existInHbMsg(SStreamHbMsg* pMsg, SDownstreamTaskEpset* pTaskEpset) { static void addUpdateNodeIntoHbMsg(SStreamTask* pTask, SStreamHbMsg* pMsg) { SStreamMeta* pMeta = pTask->pMeta; - taosThreadMutexLock(&pTask->lock); + (void) taosThreadMutexLock(&pTask->lock); int32_t num = taosArrayGetSize(pTask->outputInfo.pNodeEpsetUpdateList); for (int j = 0; j < num; ++j) { @@ -62,14 +62,18 @@ static void addUpdateNodeIntoHbMsg(SStreamTask* pTask, SStreamHbMsg* pMsg) { bool exist = existInHbMsg(pMsg, pTaskEpset); if (!exist) { - taosArrayPush(pMsg->pUpdateNodes, &pTaskEpset->nodeId); + void* p = taosArrayPush(pMsg->pUpdateNodes, &pTaskEpset->nodeId); + if (p == NULL) { + stError("failed to set the updateNode info in hbMsg, vgId:%d", pMeta->vgId); + } + stDebug("vgId:%d nodeId:%d added into hbMsg update list, total:%d", pMeta->vgId, pTaskEpset->nodeId, (int32_t)taosArrayGetSize(pMsg->pUpdateNodes)); } } taosArrayClear(pTask->outputInfo.pNodeEpsetUpdateList); - taosThreadMutexUnlock(&pTask->lock); + (void) taosThreadMutexUnlock(&pTask->lock); } static int32_t doSendHbMsgInfo(SStreamHbMsg* pMsg, SStreamMeta* pMeta, SEpSet* pEpset) { @@ -101,9 +105,7 @@ static int32_t doSendHbMsgInfo(SStreamHbMsg* pMsg, SStreamMeta* pMeta, SEpSet* p SRpcMsg msg = {0}; initRpcMsg(&msg, TDMT_MND_STREAM_HEARTBEAT, buf, tlen); - tmsgSendReq(pEpset, &msg); - - return TSDB_CODE_SUCCESS; + return tmsgSendReq(pEpset, &msg); } // NOTE: this task should be executed within the SStreamMeta lock region. @@ -112,6 +114,7 @@ int32_t streamMetaSendHbHelper(SStreamMeta* pMeta) { bool hasMnodeEpset = false; int32_t numOfTasks = streamMetaGetNumOfTasks(pMeta); SMetaHbInfo* pInfo = pMeta->pHbInfo; + int32_t code = 0; // not recv the hb msg rsp yet, send current hb msg again if (pInfo->msgSendTs > 0) { @@ -135,8 +138,7 @@ int32_t streamMetaSendHbHelper(SStreamMeta* pMeta) { } pInfo->msgSendTs = taosGetTimestampMs(); - doSendHbMsgInfo(&pInfo->hbMsg, pMeta, &epset); - return TSDB_CODE_SUCCESS; + return doSendHbMsgInfo(&pInfo->hbMsg, pMeta, &epset); } SStreamHbMsg* pMsg = &pInfo->hbMsg; @@ -168,9 +170,9 @@ int32_t streamMetaSendHbHelper(SStreamMeta* pMeta) { continue; } - taosThreadMutexLock(&(*pTask)->lock); + (void) taosThreadMutexLock(&(*pTask)->lock); STaskStatusEntry entry = streamTaskGetStatusEntry(*pTask); - taosThreadMutexUnlock(&(*pTask)->lock); + (void) taosThreadMutexUnlock(&(*pTask)->lock); entry.inputRate = entry.inputQUsed * 100.0 / (2 * STREAM_TASK_QUEUE_CAPACITY_IN_SIZE); if ((*pTask)->info.taskLevel == TASK_LEVEL__SINK) { @@ -188,9 +190,9 @@ int32_t streamMetaSendHbHelper(SStreamMeta* pMeta) { stInfo("s-task:%s set kill checkpoint trans in hbMsg, transId:%d, clear the active checkpointInfo", (*pTask)->id.idStr, p->transId); - taosThreadMutexLock(&(*pTask)->lock); + (void) taosThreadMutexLock(&(*pTask)->lock); streamTaskClearCheckInfo((*pTask), true); - taosThreadMutexUnlock(&(*pTask)->lock); + (void) taosThreadMutexUnlock(&(*pTask)->lock); } } @@ -210,7 +212,11 @@ int32_t streamMetaSendHbHelper(SStreamMeta* pMeta) { } addUpdateNodeIntoHbMsg(*pTask, pMsg); - taosArrayPush(pMsg->pTaskStatus, &entry); + p = taosArrayPush(pMsg->pTaskStatus, &entry); + if (p == NULL) { + stError("failed to add taskInfo:0x%x in hbMsg, vgId:%d", (*pTask)->id.taskId, pMeta->vgId); + } + if (!hasMnodeEpset) { epsetAssign(&epset, &(*pTask)->info.mnodeEpset); hasMnodeEpset = true; @@ -221,18 +227,19 @@ int32_t streamMetaSendHbHelper(SStreamMeta* pMeta) { if (hasMnodeEpset) { pInfo->msgSendTs = taosGetTimestampMs(); - doSendHbMsgInfo(pMsg, pMeta, &epset); + code = doSendHbMsgInfo(pMsg, pMeta, &epset); } else { stDebug("vgId:%d no tasks or no mnd epset, not send stream hb to mnode", pMeta->vgId); tCleanupStreamHbMsg(&pInfo->hbMsg); pInfo->msgSendTs = -1; } - return TSDB_CODE_SUCCESS; + return code; } void streamMetaHbToMnode(void* param, void* tmrId) { int64_t rid = *(int64_t*)param; + int32_t code = 0; SStreamMeta* pMeta = taosAcquireRef(streamMetaId, rid); if (pMeta == NULL) { @@ -243,15 +250,25 @@ void streamMetaHbToMnode(void* param, void* tmrId) { // need to stop, stop now if (pMeta->pHbInfo->stopFlag == STREAM_META_WILL_STOP) { // todo refactor: not need this now, use closeFlag in Meta pMeta->pHbInfo->stopFlag = STREAM_META_OK_TO_STOP; - stDebug("vgId:%d jump out of meta timer", pMeta->vgId); - taosReleaseRef(streamMetaId, rid); + code = taosReleaseRef(streamMetaId, rid); + if (code == TSDB_CODE_SUCCESS) { + stDebug("vgId:%d jump out of meta timer", pMeta->vgId); + } else { + stError("vgId:%d jump out of meta timer, failed to release the meta rid:%d", pMeta->vgId, rid); + } return; } // not leader not send msg if (pMeta->role != NODE_ROLE_LEADER) { - stInfo("vgId:%d role:%d not leader not send hb to mnode", pMeta->vgId, pMeta->role); - taosReleaseRef(streamMetaId, rid); + code = taosReleaseRef(streamMetaId, rid); + if (code == TSDB_CODE_SUCCESS) { + stInfo("vgId:%d role:%d not leader not send hb to mnode", pMeta->vgId, pMeta->role); + } else { + stError("vgId:%d role:%d not leader not send hb to mnodefailed to release the meta rid:%d", pMeta->vgId, + pMeta->role, rid); + } + pMeta->pHbInfo->hbStart = 0; return; } @@ -262,17 +279,30 @@ void streamMetaHbToMnode(void* param, void* tmrId) { } if (!waitForEnoughDuration(pMeta->pHbInfo)) { - taosTmrReset(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, param, streamTimer, &pMeta->pHbInfo->hbTmr); - taosReleaseRef(streamMetaId, rid); + streamTmrReset(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, param, streamTimer, &pMeta->pHbInfo->hbTmr, pMeta->vgId, + "meta-hb-tmr"); + + code = taosReleaseRef(streamMetaId, rid); + if (code) { + stError("vgId:%d in meta timer, failed to release the meta rid:%d", pMeta->vgId, rid); + } return; } streamMetaRLock(pMeta); - streamMetaSendHbHelper(pMeta); - streamMetaRUnLock(pMeta); + code = streamMetaSendHbHelper(pMeta); + if (code) { + stError("vgId:%d failed to send hmMsg to mnode, try again in 5s, code:%s", pMeta->vgId, strerror(code)); + } - taosTmrReset(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, param, streamTimer, &pMeta->pHbInfo->hbTmr); - taosReleaseRef(streamMetaId, rid); + streamMetaRUnLock(pMeta); + streamTmrReset(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, param, streamTimer, &pMeta->pHbInfo->hbTmr, pMeta->vgId, + "meta-hb-tmr"); + + code = taosReleaseRef(streamMetaId, rid); + if (code) { + stError("vgId:%d in meta timer, failed to release the meta rid:%d", pMeta->vgId, rid); + } } int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes) { @@ -297,7 +327,7 @@ void destroyMetaHbInfo(SMetaHbInfo* pInfo) { tCleanupStreamHbMsg(&pInfo->hbMsg); if (pInfo->hbTmr != NULL) { - taosTmrStop(pInfo->hbTmr); + (void) taosTmrStop(pInfo->hbTmr); pInfo->hbTmr = NULL; } diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index a2b1d39e0c..0a627034b1 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -1106,7 +1106,12 @@ int32_t streamMetaAsyncExec(SStreamMeta* pMeta, __stream_async_exec_fn_t fn, voi int32_t streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta, SArray** pList) { *pList = NULL; + int32_t code = 0; SArray* pTaskList = taosArrayDup(pMeta->pTaskList, NULL); + if (pTaskList == NULL) { + stError("failed to generate the task list during send hbMsg to mnode, vgId:%d, code: out of memory", pMeta->vgId); + return TSDB_CODE_OUT_OF_MEMORY; + } bool sendMsg = pMeta->sendMsgBeforeClosing; if (!sendMsg) { @@ -1122,8 +1127,8 @@ int32_t streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta, SArray** pList) { SStreamTaskId* pTaskId = taosArrayGet(pTaskList, i); SStreamTask* pTask = NULL; - int32_t code = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); - if (code != TSDB_CODE_SUCCESS) { + code = streamMetaAcquireTaskNoLock(pMeta, pTaskId->streamId, pTaskId->taskId, &pTask); + if (code != TSDB_CODE_SUCCESS) { // this error is ignored continue; } @@ -1140,9 +1145,9 @@ int32_t streamMetaSendMsgBeforeCloseTasks(SStreamMeta* pMeta, SArray** pList) { streamMetaReleaseTask(pMeta, pTask); } - streamMetaSendHbHelper(pMeta); + code = streamMetaSendHbHelper(pMeta); pMeta->sendMsgBeforeClosing = false; - return TSDB_CODE_SUCCESS; + return code; } void streamMetaUpdateStageRole(SStreamMeta* pMeta, int64_t stage, bool isLeader) { diff --git a/source/libs/stream/src/streamTimer.c b/source/libs/stream/src/streamTimer.c index 6e956e2682..c76ec92e33 100644 --- a/source/libs/stream/src/streamTimer.c +++ b/source/libs/stream/src/streamTimer.c @@ -38,3 +38,14 @@ void streamTimerCleanUp() { tmr_h streamTimerGetInstance() { return streamTimer; } + +void streamTmrReset(TAOS_TMR_CALLBACK fp, int32_t mseconds, void* param, void* handle, tmr_h* pTmrId, int32_t vgId, + const char* pMsg) { + while (1) { + bool ret = taosTmrReset(fp, mseconds, param, handle, pTmrId); + if (ret) { + break; + } + stError("vgId:%d failed to reset %s, try again", vgId, pMsg); + } +} From d27d31ad6e9764f13d7d3eee0d26d8063c2a6c59 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Thu, 18 Jul 2024 10:06:52 +0800 Subject: [PATCH 35/45] Update Jenkinsfile2 --- Jenkinsfile2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index f98f24e509..83a4b0ffcb 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -401,7 +401,7 @@ pipeline { } } stage('linux test') { - agent{label "slave1_52 || slave217 || slave219 "} + agent{label "slave1_47 || slave1_48 || slave1_49 || slave1_50 || slave1_52 || worker03 || slave215 || slave217 || slave219 "} options { skipDefaultCheckout() } when { changeRequest() From 8501d0a909f508a1ab3d359a2304567874de512f Mon Sep 17 00:00:00 2001 From: dmchen Date: Thu, 18 Jul 2024 02:36:28 +0000 Subject: [PATCH 36/45] fix case --- source/dnode/mnode/impl/src/mndConsumer.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 5511506021..7788bf005a 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -137,7 +137,7 @@ static int32_t validateTopics(const SArray *pTopicList, SMnode *pMnode, const ch return 0; FAILED: mndReleaseTopic(pMnode, pTopic); - return code; + TAOS_RETURN(code); } static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { @@ -186,7 +186,7 @@ END: mndReleaseConsumer(pMnode, pConsumer); tDeleteSMqConsumerObj(pConsumerNew); mndTransDrop(pTrans); - return code; + TAOS_RETURN(code); } static int32_t mndProcessConsumerClearMsg(SRpcMsg *pMsg) { @@ -229,7 +229,7 @@ END: mndReleaseConsumer(pMnode, pConsumer); tDeleteSMqConsumerObj(pConsumerNew); mndTransDrop(pTrans); - return code; + TAOS_RETURN(code); } static int32_t checkPrivilege(SMnode *pMnode, SMqConsumerObj *pConsumer, SMqHbRsp *rsp, char *user) { @@ -420,6 +420,7 @@ static int32_t addEpSetInfo(SMnode *pMnode, SMqConsumerObj *pConsumer, int32_t e } static int32_t buildAskEpRsp(SRpcMsg *pMsg, SMqAskEpRsp *rsp, int32_t serverEpoch, int64_t consumerId){ + int32_t code = 0; // encode rsp int32_t tlen = sizeof(SMqRspHead) + tEncodeSMqAskEpRsp(NULL, rsp); void *buf = rpcMallocCont(tlen); @@ -436,12 +437,12 @@ static int32_t buildAskEpRsp(SRpcMsg *pMsg, SMqAskEpRsp *rsp, int32_t serverEpoc pHead->walever = 0; void *abuf = POINTER_SHIFT(buf, sizeof(SMqRspHead)); - TAOS_CHECK_RETURN(tEncodeSMqAskEpRsp(&abuf, rsp)); + tEncodeSMqAskEpRsp(&abuf, rsp); // send rsp pMsg->info.rsp = buf; pMsg->info.rspLen = tlen; - return 0; + TAOS_RETURN(code); } static int32_t mndProcessAskEpReq(SRpcMsg *pMsg) { @@ -582,6 +583,7 @@ static int32_t getTopicAddDelete(SMqConsumerObj *pExistedConsumer, SMqConsumerOb } static int32_t checkAndSortTopic(SMnode *pMnode, SArray *pTopicList){ + int32_t code = 0; taosArraySort(pTopicList, taosArrayCompareString); taosArrayRemoveDuplicate(pTopicList, taosArrayCompareString, freeItem); @@ -592,7 +594,7 @@ static int32_t checkAndSortTopic(SMnode *pMnode, SArray *pTopicList){ return TSDB_CODE_TMQ_GROUP_OUT_OF_RANGE; } } - return TSDB_CODE_SUCCESS; + TAOS_RETURN(code); } static SMqConsumerObj* buildSubConsumer(SMnode *pMnode, SCMSubscribeReq *subscribe){ @@ -694,7 +696,7 @@ _over: mndTransDrop(pTrans); tDeleteSMqConsumerObj(pConsumerNew); taosArrayDestroyP(subscribe.topicNames, (FDelete)taosMemoryFree); - return code; + TAOS_RETURN(code); } SSdbRaw *mndConsumerActionEncode(SMqConsumerObj *pConsumer) { From fd3a06586bcbce1c2f5f55d3b269686ca2947fb2 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jul 2024 10:49:46 +0800 Subject: [PATCH 37/45] fix(stream): fix syntax error. --- source/libs/stream/src/streamHb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index bcfe2c4243..6f5c1b7981 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -284,7 +284,7 @@ void streamMetaHbToMnode(void* param, void* tmrId) { code = taosReleaseRef(streamMetaId, rid); if (code) { - stError("vgId:%d in meta timer, failed to release the meta rid:%d", pMeta->vgId, rid); + stError("vgId:%d in meta timer, failed to release the meta rid:%" PRId64, pMeta->vgId, rid); } return; } @@ -301,7 +301,7 @@ void streamMetaHbToMnode(void* param, void* tmrId) { code = taosReleaseRef(streamMetaId, rid); if (code) { - stError("vgId:%d in meta timer, failed to release the meta rid:%d", pMeta->vgId, rid); + stError("vgId:%d in meta timer, failed to release the meta rid:%" PRId64, pMeta->vgId, rid); } } From 5d797ce7fd004338e57ce22b0068e02fafec4ade Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jul 2024 13:24:45 +0800 Subject: [PATCH 38/45] fix(stream): fix syntax error. --- source/libs/stream/src/streamHb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index 6f5c1b7981..e8caa7e1a2 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -265,7 +265,7 @@ void streamMetaHbToMnode(void* param, void* tmrId) { if (code == TSDB_CODE_SUCCESS) { stInfo("vgId:%d role:%d not leader not send hb to mnode", pMeta->vgId, pMeta->role); } else { - stError("vgId:%d role:%d not leader not send hb to mnodefailed to release the meta rid:%d", pMeta->vgId, + stError("vgId:%d role:%d not leader not send hb to mnodefailed to release the meta rid:%" PRId64, pMeta->vgId, pMeta->role, rid); } From 3277496f84c01a287e3af26d8c017b9a08e1a537 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jul 2024 13:26:14 +0800 Subject: [PATCH 39/45] fix(stream): fix syntax error. --- source/libs/stream/src/streamHb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamHb.c b/source/libs/stream/src/streamHb.c index e8caa7e1a2..4aaaed615c 100644 --- a/source/libs/stream/src/streamHb.c +++ b/source/libs/stream/src/streamHb.c @@ -254,7 +254,7 @@ void streamMetaHbToMnode(void* param, void* tmrId) { if (code == TSDB_CODE_SUCCESS) { stDebug("vgId:%d jump out of meta timer", pMeta->vgId); } else { - stError("vgId:%d jump out of meta timer, failed to release the meta rid:%d", pMeta->vgId, rid); + stError("vgId:%d jump out of meta timer, failed to release the meta rid:%" PRId64, pMeta->vgId, rid); } return; } From 013121e1dfaa997553ac5360fd6bc6ee1e3a57a7 Mon Sep 17 00:00:00 2001 From: dmchen Date: Thu, 18 Jul 2024 06:14:14 +0000 Subject: [PATCH 40/45] fix case --- source/dnode/mnode/impl/src/mndCompact.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 2b25f20fda..065a9a327d 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -708,13 +708,13 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { if (pDetail->numberFileset == -1 && pDetail->finished == -1) { allFinished = false; - sdbCancelFetch(pMnode->pSdb, pDetail); + sdbCancelFetch(pMnode->pSdb, pIter); sdbRelease(pMnode->pSdb, pDetail); break; } if (pDetail->numberFileset != -1 && pDetail->finished != -1 && pDetail->numberFileset != pDetail->finished) { allFinished = false; - sdbCancelFetch(pMnode->pSdb, pDetail); + sdbCancelFetch(pMnode->pSdb, pIter); sdbRelease(pMnode->pSdb, pDetail); break; } From 5c73e1636951a1593b5009e4e14d533beb2f60c6 Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Thu, 18 Jul 2024 14:30:59 +0800 Subject: [PATCH 41/45] hash key exist code --- include/util/thash.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/util/thash.h b/include/util/thash.h index c6275d276c..475d03f533 100644 --- a/include/util/thash.h +++ b/include/util/thash.h @@ -28,8 +28,7 @@ typedef int32_t (*_equal_fn_t)(const void *, const void *, size_t len); typedef void (*_hash_before_fn_t)(void *); typedef void (*_hash_free_fn_t)(void *); -#define HASH_KEY_ALREADY_EXISTS (-2) -#define HASH_NODE_EXIST(code) (code == HASH_KEY_ALREADY_EXISTS) +#define HASH_NODE_EXIST(code) (code == TSDB_CODE_DUP_KEY) /** * murmur hash algorithm From d8b476c4493bb567fe6b6ade046dfedeff4cac15 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Thu, 18 Jul 2024 17:12:29 +0800 Subject: [PATCH 42/45] add count window --- docs/en/12-taos-sql/12-distinguished.md | 2 +- docs/zh/12-taos-sql/12-distinguished.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/12-taos-sql/12-distinguished.md b/docs/en/12-taos-sql/12-distinguished.md index 5dca92a35c..d8f582fcab 100644 --- a/docs/en/12-taos-sql/12-distinguished.md +++ b/docs/en/12-taos-sql/12-distinguished.md @@ -38,7 +38,7 @@ select _wstart, tbname, avg(voltage) from meters partition by tbname interval(10 ## Windowed Queries -Aggregation by time window is supported in TDengine. For example, in the case where temperature sensors report the temperature every seconds, the average temperature for every 10 minutes can be retrieved by performing a query with a time window. Window related clauses are used to divide the data set to be queried into subsets and then aggregation is performed across the subsets. There are four kinds of windows: time window, status window, session window, and event window. There are two kinds of time windows: sliding window and flip time/tumbling window. The syntax of window clause is as follows: +Aggregation by time window is supported in TDengine. For example, in the case where temperature sensors report the temperature every seconds, the average temperature for every 10 minutes can be retrieved by performing a query with a time window. Window related clauses are used to divide the data set to be queried into subsets and then aggregation is performed across the subsets. There are five kinds of windows: time window, status window, session window, event window, and count window. There are two kinds of time windows: sliding window and flip time/tumbling window. The syntax of window clause is as follows: ```sql window_clause: { diff --git a/docs/zh/12-taos-sql/12-distinguished.md b/docs/zh/12-taos-sql/12-distinguished.md index b979d44a5e..d6dcd95555 100755 --- a/docs/zh/12-taos-sql/12-distinguished.md +++ b/docs/zh/12-taos-sql/12-distinguished.md @@ -39,7 +39,7 @@ select _wstart, tbname, avg(voltage) from meters partition by tbname interval(10 ## 窗口切分查询 -TDengine 支持按时间窗口切分方式进行聚合结果查询,比如温度传感器每秒采集一次数据,但需查询每隔 10 分钟的温度平均值。这种场景下可以使用窗口子句来获得需要的查询结果。窗口子句用于针对查询的数据集合按照窗口切分成为查询子集并进行聚合,窗口包含时间窗口(time window)、状态窗口(status window)、会话窗口(session window)、事件窗口(event window)四种窗口。其中时间窗口又可划分为滑动时间窗口和翻转时间窗口。 +TDengine 支持按时间窗口切分方式进行聚合结果查询,比如温度传感器每秒采集一次数据,但需查询每隔 10 分钟的温度平均值。这种场景下可以使用窗口子句来获得需要的查询结果。窗口子句用于针对查询的数据集合按照窗口切分成为查询子集并进行聚合,窗口包含时间窗口(time window)、状态窗口(status window)、会话窗口(session window)、事件窗口(event window)、计数窗口(count window)五种窗口。其中时间窗口又可划分为滑动时间窗口和翻转时间窗口。 窗口子句语法如下: From 6da9bfbf18fd1ae66a727697215087923903922c Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Thu, 18 Jul 2024 18:26:24 +0800 Subject: [PATCH 43/45] test:fix case for default debugflag --- tests/pytest/util/dnodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index bb6f8ff030..b90e62cf62 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -30,6 +30,7 @@ class TDSimClient: def __init__(self, path): self.testCluster = False self.path = path + # cdebugflag 135 for tmqClientConsLog self.cfgDict = { "fqdn": "localhost", "numOfLogLines": "100000000", @@ -39,7 +40,7 @@ class TDSimClient: "rpcDebugFlag": "135", "tmrDebugFlag": "131", "dDebugFlag":"131", - "cDebugFlag": "131", + "cDebugFlag": "135", "uDebugFlag": "131", "jniDebugFlag": "131", "qDebugFlag": "135", From 97b6c43c9a532da6ea2351424242e869652237b3 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Thu, 18 Jul 2024 19:15:44 +0800 Subject: [PATCH 44/45] test:fix case for default debugflag --- tests/pytest/util/dnodes.py | 2 +- tests/system-test/7-tmq/tmqClientConsLog.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index b90e62cf62..070e56114a 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -40,7 +40,7 @@ class TDSimClient: "rpcDebugFlag": "135", "tmrDebugFlag": "131", "dDebugFlag":"131", - "cDebugFlag": "135", + "cDebugFlag": "131", "uDebugFlag": "131", "jniDebugFlag": "131", "qDebugFlag": "135", diff --git a/tests/system-test/7-tmq/tmqClientConsLog.py b/tests/system-test/7-tmq/tmqClientConsLog.py index ab0c5f6a72..83d6f93be1 100644 --- a/tests/system-test/7-tmq/tmqClientConsLog.py +++ b/tests/system-test/7-tmq/tmqClientConsLog.py @@ -16,6 +16,9 @@ sys.path.append("./7-tmq") from tmqCommon import * class TDTestCase: + + clientCfgDict = {'debugFlag': 135} + updatecfgDict = {'debugFlag': 131, 'clientCfg':clientCfgDict} def __init__(self): self.vgroups = 3 self.ctbNum = 10 From cf91c71e1b9996b64e2f990abc0715072b6e7c3f Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Thu, 18 Jul 2024 19:16:14 +0800 Subject: [PATCH 45/45] test:fix case for default debugflag --- tests/pytest/util/dnodes.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 070e56114a..bb6f8ff030 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -30,7 +30,6 @@ class TDSimClient: def __init__(self, path): self.testCluster = False self.path = path - # cdebugflag 135 for tmqClientConsLog self.cfgDict = { "fqdn": "localhost", "numOfLogLines": "100000000",