Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
75c8ea06
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
75c8ea06
编写于
6月 28, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/TD-11274-3.0
上级
55a1c02f
b66caf41
变更
24
显示空白变更内容
内联
并排
Showing
24 changed file
with
71 addition
and
44 deletion
+71
-44
cmake/cmake.install
cmake/cmake.install
+1
-0
packaging/check_package.sh
packaging/check_package.sh
+1
-1
packaging/deb/DEBIAN/prerm
packaging/deb/DEBIAN/prerm
+1
-0
packaging/deb/makedeb.sh
packaging/deb/makedeb.sh
+1
-0
packaging/rpm/tdengine.spec
packaging/rpm/tdengine.spec
+2
-0
packaging/tools/install.sh
packaging/tools/install.sh
+2
-1
packaging/tools/install_arbi.sh
packaging/tools/install_arbi.sh
+2
-1
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+2
-1
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+5
-4
packaging/tools/makearbi.sh
packaging/tools/makearbi.sh
+1
-1
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+1
-1
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+1
-1
packaging/tools/post.sh
packaging/tools/post.sh
+2
-1
packaging/tools/preun.sh
packaging/tools/preun.sh
+1
-0
packaging/tools/remove.sh
packaging/tools/remove.sh
+1
-0
packaging/tools/remove_arbi.sh
packaging/tools/remove_arbi.sh
+2
-0
packaging/tools/remove_client.sh
packaging/tools/remove_client.sh
+1
-0
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+2
-2
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+1
-1
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+23
-10
source/libs/sync/src/syncSnapshot.c
source/libs/sync/src/syncSnapshot.c
+4
-3
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+2
-2
tests/script/tsim/db/alter_replica_31.sim
tests/script/tsim/db/alter_replica_31.sim
+12
-11
tests/script/tsim/dnode/balance_replica3.sim
tests/script/tsim/dnode/balance_replica3.sim
+0
-3
未找到文件。
cmake/cmake.install
浏览文件 @
75c8ea06
...
@@ -13,6 +13,7 @@ ELSEIF (TD_WINDOWS)
...
@@ -13,6 +13,7 @@ ELSEIF (TD_WINDOWS)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
packaging
/
cfg
/
taos
.
cfg
DESTINATION
cfg
)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
packaging
/
cfg
/
taos
.
cfg
DESTINATION
cfg
)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
include
/
client
/
taos
.
h
DESTINATION
include
)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
include
/
client
/
taos
.
h
DESTINATION
include
)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
include
/
util
/
taoserror
.
h
DESTINATION
include
)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
include
/
util
/
taoserror
.
h
DESTINATION
include
)
INSTALL
(
FILES
$
{
TD_SOURCE_DIR
}
/
include
/
libs
/
function
/
taosudf
.
h
DESTINATION
include
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos
.
lib
DESTINATION
driver
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos
.
lib
DESTINATION
driver
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos_static
.
lib
DESTINATION
driver
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos_static
.
lib
DESTINATION
driver
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos
.
dll
DESTINATION
driver
)
INSTALL
(
FILES
$
{
LIBRARY_OUTPUT_PATH
}
/
taos
.
dll
DESTINATION
driver
)
...
...
packaging/check_package.sh
浏览文件 @
75c8ea06
...
@@ -170,7 +170,7 @@ function check_lib_path() {
...
@@ -170,7 +170,7 @@ function check_lib_path() {
function
check_header_path
()
{
function
check_header_path
()
{
# check all header
# check all header
header_dir
=(
"taos.h"
"taosdef.h"
"taoserror.h"
)
header_dir
=(
"taos.h"
"taosdef.h"
"taoserror.h"
"taosudf.h"
)
for
i
in
"
${
header_dir
[@]
}
"
;
do
for
i
in
"
${
header_dir
[@]
}
"
;
do
check_link
${
inc_link_dir
}
/
$i
check_link
${
inc_link_dir
}
/
$i
done
done
...
...
packaging/deb/DEBIAN/prerm
浏览文件 @
75c8ea06
...
@@ -29,6 +29,7 @@ else
...
@@ -29,6 +29,7 @@ else
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
cfg_link_dir
}
/
*
||
:
${
csudo
}
rm
-f
${
cfg_link_dir
}
/
*
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
rm
-f
${
lib_link_dir
}
/libtaos.
*
||
:
${
csudo
}
rm
-f
${
lib_link_dir
}
/libtaos.
*
||
:
${
csudo
}
rm
-f
${
log_link_dir
}
||
:
${
csudo
}
rm
-f
${
log_link_dir
}
||
:
...
...
packaging/deb/makedeb.sh
浏览文件 @
75c8ea06
...
@@ -70,6 +70,7 @@ cp ${compile_dir}/build/lib/${libfile} ${pkg_dir}${install_home_pat
...
@@ -70,6 +70,7 @@ cp ${compile_dir}/build/lib/${libfile} ${pkg_dir}${install_home_pat
cp
${
compile_dir
}
/../include/client/taos.h
${
pkg_dir
}${
install_home_path
}
/include
cp
${
compile_dir
}
/../include/client/taos.h
${
pkg_dir
}${
install_home_path
}
/include
cp
${
compile_dir
}
/../include/common/taosdef.h
${
pkg_dir
}${
install_home_path
}
/include
cp
${
compile_dir
}
/../include/common/taosdef.h
${
pkg_dir
}${
install_home_path
}
/include
cp
${
compile_dir
}
/../include/util/taoserror.h
${
pkg_dir
}${
install_home_path
}
/include
cp
${
compile_dir
}
/../include/util/taoserror.h
${
pkg_dir
}${
install_home_path
}
/include
cp
${
compile_dir
}
/../include/libs/function/taosudf.h
${
pkg_dir
}${
install_home_path
}
/include
cp
-r
${
top_dir
}
/examples/
*
${
pkg_dir
}${
install_home_path
}
/examples
cp
-r
${
top_dir
}
/examples/
*
${
pkg_dir
}${
install_home_path
}
/examples
#cp -r ${top_dir}/src/connector/python ${pkg_dir}${install_home_path}/connector
#cp -r ${top_dir}/src/connector/python ${pkg_dir}${install_home_path}/connector
#cp -r ${top_dir}/src/connector/go ${pkg_dir}${install_home_path}/connector
#cp -r ${top_dir}/src/connector/go ${pkg_dir}${install_home_path}/connector
...
...
packaging/rpm/tdengine.spec
浏览文件 @
75c8ea06
...
@@ -77,6 +77,7 @@ cp %{_compiledir}/build/lib/${libfile} %{buildroot}%{homepath}/driv
...
@@ -77,6 +77,7 @@ cp %{_compiledir}/build/lib/${libfile} %{buildroot}%{homepath}/driv
cp %{_compiledir}/../include/client/taos.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/client/taos.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/common/taosdef.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/common/taosdef.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/util/taoserror.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/util/taoserror.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/libs/function/taosudf.h %{buildroot}%{homepath}/include
#cp -r %{_compiledir}/../src/connector/python %{buildroot}%{homepath}/connector
#cp -r %{_compiledir}/../src/connector/python %{buildroot}%{homepath}/connector
#cp -r %{_compiledir}/../src/connector/go %{buildroot}%{homepath}/connector
#cp -r %{_compiledir}/../src/connector/go %{buildroot}%{homepath}/connector
#cp -r %{_compiledir}/../src/connector/nodejs %{buildroot}%{homepath}/connector
#cp -r %{_compiledir}/../src/connector/nodejs %{buildroot}%{homepath}/connector
...
@@ -201,6 +202,7 @@ if [ $1 -eq 0 ];then
...
@@ -201,6 +202,7 @@ if [ $1 -eq 0 ];then
${csudo}rm -f ${inc_link_dir}/taos.h || :
${csudo}rm -f ${inc_link_dir}/taos.h || :
${csudo}rm -f ${inc_link_dir}/taosdef.h || :
${csudo}rm -f ${inc_link_dir}/taosdef.h || :
${csudo}rm -f ${inc_link_dir}/taoserror.h || :
${csudo}rm -f ${inc_link_dir}/taoserror.h || :
${csudo}rm -f ${inc_link_dir}/taosudf.h || :
${csudo}rm -f ${lib_link_dir}/libtaos.* || :
${csudo}rm -f ${lib_link_dir}/libtaos.* || :
${csudo}rm -f ${log_link_dir} || :
${csudo}rm -f ${log_link_dir} || :
...
...
packaging/tools/install.sh
浏览文件 @
75c8ea06
...
@@ -314,11 +314,12 @@ function install_jemalloc() {
...
@@ -314,11 +314,12 @@ function install_jemalloc() {
}
}
function
install_header
()
{
function
install_header
()
{
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
cp
-f
${
script_dir
}
/inc/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
cp
-f
${
script_dir
}
/inc/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosudf.h
${
inc_link_dir
}
/taosudf.h
}
}
function
add_newHostname_to_hosts
()
{
function
add_newHostname_to_hosts
()
{
...
...
packaging/tools/install_arbi.sh
浏览文件 @
75c8ea06
...
@@ -115,11 +115,12 @@ function install_bin() {
...
@@ -115,11 +115,12 @@ function install_bin() {
}
}
function
install_header
()
{
function
install_header
()
{
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
cp
-f
${
script_dir
}
/inc/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
cp
-f
${
script_dir
}
/inc/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosudf.h
${
inc_link_dir
}
/taosudf.h
}
}
function
install_jemalloc
()
{
function
install_jemalloc
()
{
...
...
packaging/tools/install_client.sh
浏览文件 @
75c8ea06
...
@@ -148,11 +148,12 @@ function install_lib() {
...
@@ -148,11 +148,12 @@ function install_lib() {
}
}
function
install_header
()
{
function
install_header
()
{
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
cp
-f
${
script_dir
}
/inc/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
cp
-f
${
script_dir
}
/inc/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosudf.h
${
inc_link_dir
}
/taosudf.h
}
}
function
install_jemalloc
()
{
function
install_jemalloc
()
{
...
...
packaging/tools/make_install.sh
浏览文件 @
75c8ea06
...
@@ -349,16 +349,17 @@ function install_lib() {
...
@@ -349,16 +349,17 @@ function install_lib() {
function
install_header
()
{
function
install_header
()
{
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$osType
"
!=
"Darwin"
]
;
then
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
cp
-f
${
source_dir
}
/include/client/taos.h
${
source_dir
}
/include/common/taosdef.h
${
source_dir
}
/include/util/taoserror.h
\
${
csudo
}
cp
-f
${
source_dir
}
/include/client/taos.h
${
source_dir
}
/include/common/taosdef.h
${
source_dir
}
/include/util/taoserror.h
${
source_dir
}
/include/libs/function/taosudf.h
\
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
install_main_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
install_main_dir
}
/include/taosudf.h
${
inc_link_dir
}
/taosudf.h
else
else
${
csudo
}
cp
-f
${
source_dir
}
/include/client/taos.h
${
source_dir
}
/include/common/taosdef.h
${
source_dir
}
/include/util/taoserror.h
\
${
csudo
}
cp
-f
${
source_dir
}
/include/client/taos.h
${
source_dir
}
/include/common/taosdef.h
${
source_dir
}
/include/util/taoserror.h
${
source_dir
}
/include/libs/function/taosudf.h
\
${
install_main_dir
}
/include
||
${
install_main_dir
}
/include
||
${
csudo
}
cp
-f
${
source_dir
}
/include/client/taos.h
${
source_dir
}
/include/common/taosdef.h
${
source_dir
}
/include/util/taoserror.h
\
${
csudo
}
cp
-f
${
source_dir
}
/include/client/taos.h
${
source_dir
}
/include/common/taosdef.h
${
source_dir
}
/include/util/taoserror.h
${
source_dir
}
/include/libs/function/taosudf.h
\
${
install_main_2_dir
}
/include
&&
${
install_main_2_dir
}
/include
&&
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
||
${
csudo
}
chmod
644
${
install_main_dir
}
/include/
*
||
${
csudo
}
chmod
644
${
install_main_2_dir
}
/include/
*
${
csudo
}
chmod
644
${
install_main_2_dir
}
/include/
*
...
...
packaging/tools/makearbi.sh
浏览文件 @
75c8ea06
...
@@ -36,7 +36,7 @@ fi
...
@@ -36,7 +36,7 @@ fi
bin_files
=
"
${
build_dir
}
/bin/tarbitrator
${
script_dir
}
/remove_arbi.sh"
bin_files
=
"
${
build_dir
}
/bin/tarbitrator
${
script_dir
}
/remove_arbi.sh"
install_files
=
"
${
script_dir
}
/install_arbi.sh"
install_files
=
"
${
script_dir
}
/install_arbi.sh"
#header_files="${code_dir}/include/client/taos.h ${code_dir}/include/common/taosdef.h ${code_dir}/include/util/taoserror.h"
#header_files="${code_dir}/include/client/taos.h ${code_dir}/include/common/taosdef.h ${code_dir}/include/util/taoserror.h
${code_dir}/include/libs/function/taosudf.h
"
init_file_tarbitrator_deb
=
${
script_dir
}
/../deb/tarbitratord
init_file_tarbitrator_deb
=
${
script_dir
}
/../deb/tarbitratord
init_file_tarbitrator_rpm
=
${
script_dir
}
/../rpm/tarbitratord
init_file_tarbitrator_rpm
=
${
script_dir
}
/../rpm/tarbitratord
...
...
packaging/tools/makeclient.sh
浏览文件 @
75c8ea06
...
@@ -62,7 +62,7 @@ else
...
@@ -62,7 +62,7 @@ else
lib_files
=
"
${
build_dir
}
/lib/libtaos.
${
version
}
.dylib"
lib_files
=
"
${
build_dir
}
/lib/libtaos.
${
version
}
.dylib"
fi
fi
header_files
=
"
${
code_dir
}
/include/client/taos.h
${
code_dir
}
/include/common/taosdef.h
${
code_dir
}
/include/util/taoserror.h"
header_files
=
"
${
code_dir
}
/include/client/taos.h
${
code_dir
}
/include/common/taosdef.h
${
code_dir
}
/include/util/taoserror.h
${
code_dir
}
/include/libs/function/taosudf.h
"
if
[
"
$dbName
"
!=
"taos"
]
;
then
if
[
"
$dbName
"
!=
"taos"
]
;
then
cfg_dir
=
"
${
top_dir
}
/../enterprise/packaging/cfg"
cfg_dir
=
"
${
top_dir
}
/../enterprise/packaging/cfg"
else
else
...
...
packaging/tools/makepkg.sh
浏览文件 @
75c8ea06
...
@@ -93,7 +93,7 @@ else
...
@@ -93,7 +93,7 @@ else
fi
fi
lib_files
=
"
${
build_dir
}
/lib/libtaos.so.
${
version
}
"
lib_files
=
"
${
build_dir
}
/lib/libtaos.so.
${
version
}
"
header_files
=
"
${
code_dir
}
/include/client/taos.h
${
code_dir
}
/include/common/taosdef.h
${
code_dir
}
/include/util/taoserror.h"
header_files
=
"
${
code_dir
}
/include/client/taos.h
${
code_dir
}
/include/common/taosdef.h
${
code_dir
}
/include/util/taoserror.h
${
code_dir
}
/include/libs/function/taosudf.h
"
if
[
"
$dbName
"
!=
"taos"
]
;
then
if
[
"
$dbName
"
!=
"taos"
]
;
then
cfg_dir
=
"
${
top_dir
}
/../enterprise/packaging/cfg"
cfg_dir
=
"
${
top_dir
}
/../enterprise/packaging/cfg"
...
...
packaging/tools/post.sh
浏览文件 @
75c8ea06
...
@@ -81,10 +81,11 @@ function kill_taosd() {
...
@@ -81,10 +81,11 @@ function kill_taosd() {
}
}
function
install_include
()
{
function
install_include
()
{
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h|| :
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
${
inc_link_dir
}
/taosdef.h
${
inc_link_dir
}
/taoserror.h
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
ln
-s
${
inc_dir
}
/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
inc_dir
}
/taos.h
${
inc_link_dir
}
/taos.h
${
csudo
}
ln
-s
${
inc_dir
}
/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
inc_dir
}
/taosdef.h
${
inc_link_dir
}
/taosdef.h
${
csudo
}
ln
-s
${
inc_dir
}
/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
inc_dir
}
/taoserror.h
${
inc_link_dir
}
/taoserror.h
${
csudo
}
ln
-s
${
inc_dir
}
/taosudf.h
${
inc_link_dir
}
/taosudf.h
}
}
function
install_lib
()
{
function
install_lib
()
{
...
...
packaging/tools/preun.sh
浏览文件 @
75c8ea06
...
@@ -128,6 +128,7 @@ ${csudo}rm -f ${cfg_link_dir}/*.new || :
...
@@ -128,6 +128,7 @@ ${csudo}rm -f ${cfg_link_dir}/*.new || :
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosudf.h
||
:
${
csudo
}
rm
-f
${
lib_link_dir
}
/libtaos.
*
||
:
${
csudo
}
rm
-f
${
lib_link_dir
}
/libtaos.
*
||
:
${
csudo
}
rm
-f
${
lib64_link_dir
}
/libtaos.
*
||
:
${
csudo
}
rm
-f
${
lib64_link_dir
}
/libtaos.
*
||
:
...
...
packaging/tools/remove.sh
浏览文件 @
75c8ea06
...
@@ -84,6 +84,7 @@ function clean_header() {
...
@@ -84,6 +84,7 @@ function clean_header() {
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosudf.h
||
:
}
}
function
clean_config
()
{
function
clean_config
()
{
...
...
packaging/tools/remove_arbi.sh
浏览文件 @
75c8ea06
...
@@ -59,6 +59,8 @@ function clean_header() {
...
@@ -59,6 +59,8 @@ function clean_header() {
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosudf.h
||
:
}
}
function
clean_log
()
{
function
clean_log
()
{
...
...
packaging/tools/remove_client.sh
浏览文件 @
75c8ea06
...
@@ -54,6 +54,7 @@ function clean_header() {
...
@@ -54,6 +54,7 @@ function clean_header() {
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taos.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosdef.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taoserror.h
||
:
${
csudo
}
rm
-f
${
inc_link_dir
}
/taosudf.h
||
:
}
}
function
clean_config
()
{
function
clean_config
()
{
...
...
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
75c8ea06
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#define _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#include "mndAcct.h"
#include "mndAcct.h"
#include "mndPrivilege.h"
#include "mndBnode.h"
#include "mndBnode.h"
#include "mndCluster.h"
#include "mndCluster.h"
#include "mndConsumer.h"
#include "mndConsumer.h"
...
@@ -27,6 +26,7 @@
...
@@ -27,6 +26,7 @@
#include "mndMnode.h"
#include "mndMnode.h"
#include "mndOffset.h"
#include "mndOffset.h"
#include "mndPerfSchema.h"
#include "mndPerfSchema.h"
#include "mndPrivilege.h"
#include "mndProfile.h"
#include "mndProfile.h"
#include "mndQnode.h"
#include "mndQnode.h"
#include "mndQuery.h"
#include "mndQuery.h"
...
@@ -416,7 +416,7 @@ int32_t mndProcessSyncMsg(SRpcMsg *pMsg) {
...
@@ -416,7 +416,7 @@ int32_t mndProcessSyncMsg(SRpcMsg *pMsg) {
char
*
syncNodeStr
=
sync2SimpleStr
(
pMgmt
->
sync
);
char
*
syncNodeStr
=
sync2SimpleStr
(
pMgmt
->
sync
);
static
int64_t
mndTick
=
0
;
static
int64_t
mndTick
=
0
;
if
(
++
mndTick
%
10
==
1
)
{
if
(
++
mndTick
%
10
==
1
)
{
mTrace
(
"vgId:%d, sync
heartbeat
msg:%s, %s"
,
syncGetVgId
(
pMgmt
->
sync
),
TMSG_INFO
(
pMsg
->
msgType
),
syncNodeStr
);
mTrace
(
"vgId:%d, sync
trace
msg:%s, %s"
,
syncGetVgId
(
pMgmt
->
sync
),
TMSG_INFO
(
pMsg
->
msgType
),
syncNodeStr
);
}
}
if
(
gRaftDetailLog
)
{
if
(
gRaftDetailLog
)
{
char
logBuf
[
512
]
=
{
0
};
char
logBuf
[
512
]
=
{
0
};
...
...
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
75c8ea06
...
@@ -243,7 +243,7 @@ int32_t vnodeProcessSyncReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
...
@@ -243,7 +243,7 @@ int32_t vnodeProcessSyncReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
char
*
syncNodeStr
=
sync2SimpleStr
(
pVnode
->
sync
);
char
*
syncNodeStr
=
sync2SimpleStr
(
pVnode
->
sync
);
static
int64_t
vndTick
=
0
;
static
int64_t
vndTick
=
0
;
if
(
++
vndTick
%
10
==
1
)
{
if
(
++
vndTick
%
10
==
1
)
{
vGTrace
(
"vgId:%d, sync
heartbeat
msg:%s, %s"
,
syncGetVgId
(
pVnode
->
sync
),
TMSG_INFO
(
pMsg
->
msgType
),
syncNodeStr
);
vGTrace
(
"vgId:%d, sync
trace
msg:%s, %s"
,
syncGetVgId
(
pVnode
->
sync
),
TMSG_INFO
(
pMsg
->
msgType
),
syncNodeStr
);
}
}
if
(
gRaftDetailLog
)
{
if
(
gRaftDetailLog
)
{
char
logBuf
[
512
]
=
{
0
};
char
logBuf
[
512
]
=
{
0
};
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
75c8ea06
...
@@ -698,7 +698,7 @@ int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak) {
...
@@ -698,7 +698,7 @@ int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak) {
}
else
{
}
else
{
ret
=
-
1
;
ret
=
-
1
;
terrno
=
TSDB_CODE_SYN_NOT_LEADER
;
terrno
=
TSDB_CODE_SYN_NOT_LEADER
;
sError
(
"sync
P
ropose not leader, %s"
,
syncUtilState2String
(
pSyncNode
->
state
));
sError
(
"sync
p
ropose not leader, %s"
,
syncUtilState2String
(
pSyncNode
->
state
));
goto
_END
;
goto
_END
;
}
}
...
@@ -1414,46 +1414,59 @@ void syncNodeErrorLog(const SSyncNode* pSyncNode, char* str) {
...
@@ -1414,46 +1414,59 @@ void syncNodeErrorLog(const SSyncNode* pSyncNode, char* str) {
int32_t
userStrLen
=
strlen
(
str
);
int32_t
userStrLen
=
strlen
(
str
);
SSnapshot
snapshot
=
{.
data
=
NULL
,
.
lastApplyIndex
=
-
1
,
.
lastApplyTerm
=
0
};
SSnapshot
snapshot
=
{.
data
=
NULL
,
.
lastApplyIndex
=
-
1
,
.
lastApplyTerm
=
0
};
if
(
pSyncNode
->
pFsm
->
FpGetSnapshotInfo
!=
NULL
)
{
if
(
pSyncNode
->
pFsm
!=
NULL
&&
pSyncNode
->
pFsm
->
FpGetSnapshotInfo
!=
NULL
)
{
pSyncNode
->
pFsm
->
FpGetSnapshotInfo
(
pSyncNode
->
pFsm
,
&
snapshot
);
pSyncNode
->
pFsm
->
FpGetSnapshotInfo
(
pSyncNode
->
pFsm
,
&
snapshot
);
}
}
SyncIndex
logLastIndex
=
pSyncNode
->
pLogStore
->
syncLogLastIndex
(
pSyncNode
->
pLogStore
);
SyncIndex
logBeginIndex
=
pSyncNode
->
pLogStore
->
syncLogBeginIndex
(
pSyncNode
->
pLogStore
);
SyncIndex
logLastIndex
=
SYNC_INDEX_INVALID
;
SyncIndex
logBeginIndex
=
SYNC_INDEX_INVALID
;
if
(
pSyncNode
->
pLogStore
!=
NULL
)
{
logLastIndex
=
pSyncNode
->
pLogStore
->
syncLogLastIndex
(
pSyncNode
->
pLogStore
);
logBeginIndex
=
pSyncNode
->
pLogStore
->
syncLogBeginIndex
(
pSyncNode
->
pLogStore
);
}
char
*
pCfgStr
=
syncCfg2SimpleStr
(
&
(
pSyncNode
->
pRaftCfg
->
cfg
));
char
*
printStr
=
""
;
if
(
pCfgStr
!=
NULL
)
{
printStr
=
pCfgStr
;
}
if
(
userStrLen
<
256
)
{
if
(
userStrLen
<
256
)
{
char
logBuf
[
128
+
256
];
char
logBuf
[
256
+
256
];
if
(
pSyncNode
!=
NULL
&&
pSyncNode
->
pRaftCfg
!=
NULL
&&
pSyncNode
->
pRaftStore
!=
NULL
)
{
if
(
pSyncNode
!=
NULL
&&
pSyncNode
->
pRaftCfg
!=
NULL
&&
pSyncNode
->
pRaftStore
!=
NULL
)
{
snprintf
(
logBuf
,
sizeof
(
logBuf
),
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"vgId:%d, sync %s %s, term:%lu, commit:%ld, beginlog:%ld, lastlog:%ld, lastsnapshot:%ld, standby:%d, "
"vgId:%d, sync %s %s, term:%lu, commit:%ld, beginlog:%ld, lastlog:%ld, lastsnapshot:%ld, standby:%d, "
"replica-num:%d, "
"replica-num:%d, "
"lconfig:%ld, changing:%d"
,
"lconfig:%ld, changing:%d
, restore:%d, %s
"
,
pSyncNode
->
vgId
,
syncUtilState2String
(
pSyncNode
->
state
),
str
,
pSyncNode
->
pRaftStore
->
currentTerm
,
pSyncNode
->
vgId
,
syncUtilState2String
(
pSyncNode
->
state
),
str
,
pSyncNode
->
pRaftStore
->
currentTerm
,
pSyncNode
->
commitIndex
,
logBeginIndex
,
logLastIndex
,
snapshot
.
lastApplyIndex
,
pSyncNode
->
commitIndex
,
logBeginIndex
,
logLastIndex
,
snapshot
.
lastApplyIndex
,
pSyncNode
->
pRaftCfg
->
isStandBy
,
pSyncNode
->
replicaNum
,
pSyncNode
->
pRaftCfg
->
lastConfigIndex
,
pSyncNode
->
pRaftCfg
->
isStandBy
,
pSyncNode
->
replicaNum
,
pSyncNode
->
pRaftCfg
->
lastConfigIndex
,
pSyncNode
->
changing
);
pSyncNode
->
changing
,
pSyncNode
->
restoreFinish
,
printStr
);
}
else
{
}
else
{
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"%s"
,
str
);
snprintf
(
logBuf
,
sizeof
(
logBuf
),
"%s"
,
str
);
}
}
sError
(
"%s"
,
logBuf
);
sError
(
"%s"
,
logBuf
);
}
else
{
}
else
{
int
len
=
128
+
userStrLen
;
int
len
=
256
+
userStrLen
;
char
*
s
=
(
char
*
)
taosMemoryMalloc
(
len
);
char
*
s
=
(
char
*
)
taosMemoryMalloc
(
len
);
if
(
pSyncNode
!=
NULL
&&
pSyncNode
->
pRaftCfg
!=
NULL
&&
pSyncNode
->
pRaftStore
!=
NULL
)
{
if
(
pSyncNode
!=
NULL
&&
pSyncNode
->
pRaftCfg
!=
NULL
&&
pSyncNode
->
pRaftStore
!=
NULL
)
{
snprintf
(
s
,
len
,
snprintf
(
s
,
len
,
"vgId:%d, sync %s %s, term:%lu, commit:%ld, beginlog:%ld, lastlog:%ld, lastsnapshot:%ld, standby:%d, "
"vgId:%d, sync %s %s, term:%lu, commit:%ld, beginlog:%ld, lastlog:%ld, lastsnapshot:%ld, standby:%d, "
"replica-num:%d, "
"replica-num:%d, "
"lconfig:%ld, changing:%d"
,
"lconfig:%ld, changing:%d
, restore:%d, %s
"
,
pSyncNode
->
vgId
,
syncUtilState2String
(
pSyncNode
->
state
),
str
,
pSyncNode
->
pRaftStore
->
currentTerm
,
pSyncNode
->
vgId
,
syncUtilState2String
(
pSyncNode
->
state
),
str
,
pSyncNode
->
pRaftStore
->
currentTerm
,
pSyncNode
->
commitIndex
,
logBeginIndex
,
logLastIndex
,
snapshot
.
lastApplyIndex
,
pSyncNode
->
commitIndex
,
logBeginIndex
,
logLastIndex
,
snapshot
.
lastApplyIndex
,
pSyncNode
->
pRaftCfg
->
isStandBy
,
pSyncNode
->
replicaNum
,
pSyncNode
->
pRaftCfg
->
lastConfigIndex
,
pSyncNode
->
pRaftCfg
->
isStandBy
,
pSyncNode
->
replicaNum
,
pSyncNode
->
pRaftCfg
->
lastConfigIndex
,
pSyncNode
->
changing
);
pSyncNode
->
changing
,
pSyncNode
->
restoreFinish
,
printStr
);
}
else
{
}
else
{
snprintf
(
s
,
len
,
"%s"
,
str
);
snprintf
(
s
,
len
,
"%s"
,
str
);
}
}
sError
(
"%s"
,
s
);
sError
(
"%s"
,
s
);
taosMemoryFree
(
s
);
taosMemoryFree
(
s
);
}
}
taosMemoryFree
(
pCfgStr
);
}
}
char
*
syncNode2SimpleStr
(
const
SSyncNode
*
pSyncNode
)
{
char
*
syncNode2SimpleStr
(
const
SSyncNode
*
pSyncNode
)
{
...
...
source/libs/sync/src/syncSnapshot.c
浏览文件 @
75c8ea06
...
@@ -363,8 +363,9 @@ char *snapshotSender2SimpleStr(SSyncSnapshotSender *pSender, char *event) {
...
@@ -363,8 +363,9 @@ char *snapshotSender2SimpleStr(SSyncSnapshotSender *pSender, char *event) {
uint16_t
port
;
uint16_t
port
;
syncUtilU642Addr
(
destId
.
addr
,
host
,
sizeof
(
host
),
&
port
);
syncUtilU642Addr
(
destId
.
addr
,
host
,
sizeof
(
host
),
&
port
);
snprintf
(
s
,
len
,
"%s %p laindex:%ld laterm:%lu lcindex:%ld seq:%d ack:%d finish:%d pterm:%lu replica-index:%d %s:%d"
,
snprintf
(
s
,
len
,
event
,
pSender
,
pSender
->
snapshot
.
lastApplyIndex
,
pSender
->
snapshot
.
lastApplyTerm
,
"%s {%p laindex:%ld laterm:%lu lcindex:%ld seq:%d ack:%d finish:%d pterm:%lu replica-index:%d %s:%d}"
,
event
,
pSender
,
pSender
->
snapshot
.
lastApplyIndex
,
pSender
->
snapshot
.
lastApplyTerm
,
pSender
->
snapshot
.
lastConfigIndex
,
pSender
->
seq
,
pSender
->
ack
,
pSender
->
finish
,
pSender
->
privateTerm
,
pSender
->
snapshot
.
lastConfigIndex
,
pSender
->
seq
,
pSender
->
ack
,
pSender
->
finish
,
pSender
->
privateTerm
,
pSender
->
replicaIndex
,
host
,
port
);
pSender
->
replicaIndex
,
host
,
port
);
...
@@ -629,7 +630,7 @@ char *snapshotReceiver2SimpleStr(SSyncSnapshotReceiver *pReceiver, char *event)
...
@@ -629,7 +630,7 @@ char *snapshotReceiver2SimpleStr(SSyncSnapshotReceiver *pReceiver, char *event)
uint16_t
port
;
uint16_t
port
;
syncUtilU642Addr
(
fromId
.
addr
,
host
,
sizeof
(
host
),
&
port
);
syncUtilU642Addr
(
fromId
.
addr
,
host
,
sizeof
(
host
),
&
port
);
snprintf
(
s
,
len
,
"%s
%p start:%d ack:%d term:%lu pterm:%lu from:%s:%d laindex:%ld laterm:%lu lcindex:%ld
"
,
event
,
snprintf
(
s
,
len
,
"%s
{%p start:%d ack:%d term:%lu pterm:%lu from:%s:%d laindex:%ld laterm:%lu lcindex:%ld}
"
,
event
,
pReceiver
,
pReceiver
->
start
,
pReceiver
->
ack
,
pReceiver
->
term
,
pReceiver
->
privateTerm
,
host
,
port
,
pReceiver
,
pReceiver
->
start
,
pReceiver
->
ack
,
pReceiver
->
term
,
pReceiver
->
privateTerm
,
host
,
port
,
pReceiver
->
snapshot
.
lastApplyIndex
,
pReceiver
->
snapshot
.
lastApplyTerm
,
pReceiver
->
snapshot
.
lastConfigIndex
);
pReceiver
->
snapshot
.
lastApplyIndex
,
pReceiver
->
snapshot
.
lastApplyTerm
,
pReceiver
->
snapshot
.
lastConfigIndex
);
...
...
tests/script/jenkins/basic.txt
浏览文件 @
75c8ea06
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
./test.sh -f tsim/db/create_all_options.sim
./test.sh -f tsim/db/create_all_options.sim
./test.sh -f tsim/db/alter_option.sim
./test.sh -f tsim/db/alter_option.sim
./test.sh -f tsim/db/alter_replica_13.sim
./test.sh -f tsim/db/alter_replica_13.sim
#
./test.sh -f tsim/db/alter_replica_31.sim
./test.sh -f tsim/db/alter_replica_31.sim
./test.sh -f tsim/db/basic1.sim
./test.sh -f tsim/db/basic1.sim
./test.sh -f tsim/db/basic2.sim
./test.sh -f tsim/db/basic2.sim
./test.sh -f tsim/db/basic3.sim
./test.sh -f tsim/db/basic3.sim
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
# ---- dnode
# ---- dnode
./test.sh -f tsim/dnode/balance_replica1.sim
./test.sh -f tsim/dnode/balance_replica1.sim
#
./test.sh -f tsim/dnode/balance_replica3.sim
./test.sh -f tsim/dnode/balance_replica3.sim
./test.sh -f tsim/dnode/create_dnode.sim
./test.sh -f tsim/dnode/create_dnode.sim
./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim
./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim
./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim
./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim
...
...
tests/script/tsim/db/alter_replica_31.sim
浏览文件 @
75c8ea06
...
@@ -89,13 +89,13 @@ step2:
...
@@ -89,13 +89,13 @@ step2:
endi
endi
sql show db.vgroups
sql show db.vgroups
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
if $data(2)[3] !=
4
then
if $data(2)[3] !=
2
then
return -1
return -1
endi
endi
if $data(2)[5] != 3 then
if $data(2)[5] != 3 then
return -1
return -1
endi
endi
if $data(2)[7] !=
2
then
if $data(2)[7] !=
4
then
return -1
return -1
endi
endi
if $data(2)[4] == leader then
if $data(2)[4] == leader then
...
@@ -118,7 +118,7 @@ sql insert into db.ctb values(now, 1, "2")
...
@@ -118,7 +118,7 @@ sql insert into db.ctb values(now, 1, "2")
sql show db.vgroups
sql show db.vgroups
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
sleep 100
0
sleep 100
sql select * from db.ctb
sql select * from db.ctb
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data00 $data01 $data02 $data03 $data04 $data05
...
@@ -126,10 +126,9 @@ if $rows != 1 then
...
@@ -126,10 +126,9 @@ if $rows != 1 then
return -1
return -1
endi
endi
sleep 3000
print ============= step3: alter database
print ============= step3: alter database
sql alter database db replica 1
sql alter database db replica 1
$hasleader = 0
$x = 0
$x = 0
step3:
step3:
...
@@ -144,18 +143,20 @@ print ===> rows: $rows
...
@@ -144,18 +143,20 @@ print ===> rows: $rows
if $rows != 1 then
if $rows != 1 then
goto step3
goto step3
endi
endi
if $data(2)[
3] != 4
then
if $data(2)[
4] == leader
then
goto step3
$hasleader = 1
endi
endi
if $data(2)[5] != NULL then
if $data(2)[6] == leader then
goto step3
$hasleader = 1
endi
if $data(2)[8] == leader then
$hasleader = 1
endi
endi
if $
data(2)[7] != NULL
then
if $
hasleader != 1
then
goto step3
goto step3
endi
endi
print ============= step5: stop dnode 2
print ============= step5: stop dnode 2
return
sql select * from db.stb
sql select * from db.stb
if $rows != 1 then
if $rows != 1 then
return -1
return -1
...
...
tests/script/tsim/dnode/balance_replica3.sim
浏览文件 @
75c8ea06
...
@@ -347,10 +347,7 @@ if $leaderExist != 1 then
...
@@ -347,10 +347,7 @@ if $leaderExist != 1 then
goto step65
goto step65
endi
endi
print =============== step7: select data
print =============== step7: select data
sql show d1.tables
sql show d1.tables
print rows $rows
print rows $rows
if $rows != 6 then
if $rows != 6 then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录