Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
16c3769b
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,发现更多精彩内容 >>
未验证
提交
16c3769b
编写于
12月 12, 2019
作者:
S
slguan
提交者:
GitHub
12月 12, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #912 from taosdata/feature/lihui
[uint64_t printf format]
上级
2027e7b2
b473ba8e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
74 addition
and
24 deletion
+74
-24
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+69
-23
src/rpc/src/trpc.c
src/rpc/src/trpc.c
+4
-0
src/system/detail/src/vnodeRead.c
src/system/detail/src/vnodeRead.c
+1
-1
未找到文件。
packaging/tools/make_install.sh
浏览文件 @
16c3769b
...
...
@@ -47,21 +47,54 @@ initd_mod=0
service_mod
=
2
if
pidof systemd &> /dev/null
;
then
service_mod
=
0
elif
$(
which
insserv &> /dev/null
)
;
then
elif
$(
which
service &> /dev/null
)
;
then
service_mod
=
1
initd_mod
=
1
service_config_dir
=
"/etc/init.d"
elif
$(
which update-rc.d &> /dev/null
)
;
then
service_mod
=
1
initd_mod
=
2
service_config_dir
=
"/etc/init.d"
service_config_dir
=
"/etc/init.d"
if
$(
which chkconfig &> /dev/null
)
;
then
initd_mod
=
1
elif
$(
which insserv &> /dev/null
)
;
then
initd_mod
=
2
elif
$(
which update-rc.d &> /dev/null
)
;
then
initd_mod
=
3
else
service_mod
=
2
fi
else
service_mod
=
2
fi
# get the operating system type for using the corresponding init file
# ubuntu/debian(deb), centos/fedora(rpm), others: opensuse, redhat, ..., no verification
#osinfo=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
osinfo
=
$(
cat
/etc/os-release |
grep
"NAME"
|
cut
-d
'"'
-f2
)
#echo "osinfo: ${osinfo}"
os_type
=
0
if
echo
$osinfo
|
grep
-qwi
"ubuntu"
;
then
echo
"this is ubuntu system"
os_type
=
1
elif
echo
$osinfo
|
grep
-qwi
"debian"
;
then
echo
"this is debian system"
os_type
=
1
elif
echo
$osinfo
|
grep
-qwi
"Kylin"
;
then
echo
"this is Kylin system"
os_type
=
1
elif
echo
$osinfo
|
grep
-qwi
"centos"
;
then
echo
"this is centos system"
os_type
=
2
elif
echo
$osinfo
|
grep
-qwi
"fedora"
;
then
echo
"this is fedora system"
os_type
=
2
else
echo
"this is other linux system"
os_type
=
0
fi
function
kill_taosd
()
{
pid
=
$(
ps
-ef
|
grep
"taosd"
|
grep
-v
"grep"
|
awk
'{print $2}'
)
${
csudo
}
kill
-9
${
pid
}
||
:
if
[
-n
"
$pid
"
]
;
then
${
csudo
}
kill
-9
$pid
||
:
fi
}
function
install_main_path
()
{
...
...
@@ -153,20 +186,26 @@ function install_examples() {
}
function
clean_service_on_sysvinit
()
{
restart_config_str
=
"taos:2345:respawn:
${
service_config_dir
}
/taosd start"
#restart_config_str="taos:2345:respawn:${service_config_dir}/taosd start"
#${csudo} sed -i "\|${restart_config_str}|d" /etc/inittab || :
if
pidof taosd &> /dev/null
;
then
${
csudo
}
service taosd stop
||
:
fi
${
csudo
}
sed
-i
"
\|
${
restart_config_str
}
|d"
/etc/inittab
||
:
${
csudo
}
rm
-f
${
service_config_dir
}
/taosd
||
:
if
((
${
initd_mod
}
==
1
))
;
then
${
csudo
}
grep
-q
-F
"taos"
/etc/inittab
&&
${
csudo
}
insserv
-r
taosd
||
:
${
csudo
}
chkconfig
--del
taosd
||
:
elif
((
${
initd_mod
}
==
2
))
;
then
${
csudo
}
grep
-q
-F
"taos"
/etc/inittab
&&
${
csudo
}
update-rc.d
-f
taosd remove
||
:
${
csudo
}
insserv
-r
taosd
||
:
elif
((
${
initd_mod
}
==
3
))
;
then
${
csudo
}
update-rc.d
-f
taosd remove
||
:
fi
${
csudo
}
rm
-f
${
service_config_dir
}
/taosd
||
:
if
$(
which init &> /dev/null
)
;
then
${
csudo
}
init q
||
:
fi
# ${csudo} update-rc.d -f taosd remove || :
${
csudo
}
init q
||
:
}
function
install_service_on_sysvinit
()
{
...
...
@@ -175,19 +214,26 @@ function install_service_on_sysvinit() {
sleep
1
# Install taosd service
if
((
${
os_type
}
==
1
))
;
then
${
csudo
}
cp
-f
${
script_dir
}
/../deb/init.d/taosd
${
install_main_dir
}
/init.d
${
csudo
}
cp
${
script_dir
}
/../deb/init.d/taosd
${
service_config_dir
}
&&
${
csudo
}
chmod
a+x
${
service_config_dir
}
/taosd
restart_config_str
=
"taos:2345:respawn:
${
service_config_dir
}
/taosd start"
${
csudo
}
grep
-q
-F
"
$restart_config_str
"
/etc/inittab
||
${
csudo
}
bash
-c
"echo '
${
restart_config_str
}
' >> /etc/inittab"
# TODO: for centos, change here
elif
((
${
os_type
}
==
2
))
;
then
${
csudo
}
cp
-f
${
script_dir
}
/../rpm/init.d/taosd
${
install_main_dir
}
/init.d
${
csudo
}
cp
${
script_dir
}
/../rpm/init.d/taosd
${
service_config_dir
}
&&
${
csudo
}
chmod
a+x
${
service_config_dir
}
/taosd
fi
#restart_config_str="taos:2345:respawn:${service_config_dir}/taosd start"
#${csudo} grep -q -F "$restart_config_str" /etc/inittab || ${csudo} bash -c "echo '${restart_config_str}' >> /etc/inittab"
if
((
${
initd_mod
}
==
1
))
;
then
${
csudo
}
insserv taosd
||
:
${
csudo
}
chkconfig
--add
taosd
||
:
${
csudo
}
chkconfig
--level
2345 taosd on
||
:
elif
((
${
initd_mod
}
==
2
))
;
then
${
csudo
}
insserv taosd
||
:
${
csudo
}
insserv
-d
taosd
||
:
elif
((
${
initd_mod
}
==
3
))
;
then
${
csudo
}
update-rc.d taosd defaults
||
:
fi
# ${csudo} update-rc.d taosd defaults
# chkconfig mysqld on
}
function
clean_service_on_systemd
()
{
...
...
@@ -237,7 +283,7 @@ function install_service() {
elif
((
${
service_mod
}
==
1
))
;
then
install_service_on_sysvinit
else
# must manual st
art
taosd
# must manual st
op
taosd
kill_taosd
fi
}
...
...
src/rpc/src/trpc.c
浏览文件 @
16c3769b
...
...
@@ -328,6 +328,10 @@ int taosSendSimpleRsp(void *thandle, char rsptype, char code) {
}
pStart
=
taosBuildRspMsgWithSize
(
thandle
,
rsptype
,
32
);
if
(
pStart
==
NULL
)
{
tError
(
"build rsp msg error, return null prt"
);
return
-
1
;
}
pMsg
=
pStart
;
*
pMsg
=
code
;
...
...
src/system/detail/src/vnodeRead.c
浏览文件 @
16c3769b
...
...
@@ -888,7 +888,7 @@ int vnodeSaveQueryResult(void *handle, char *data, int32_t *size) {
pQInfo
->
pointsRead
);
if
(
pQInfo
->
over
==
0
)
{
dTrace
(
"QInfo:%p set query flag, sig:%
p
, func:%s"
,
pQInfo
,
pQInfo
->
signature
,
__FUNCTION__
);
dTrace
(
"QInfo:%p set query flag, sig:%
"
PRIu64
"
, func:%s"
,
pQInfo
,
pQInfo
->
signature
,
__FUNCTION__
);
if
(
pQInfo
->
killed
==
1
)
{
dTrace
(
"%p freed or killed, abort query"
,
pQInfo
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录