Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1684f07a
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
1684f07a
编写于
3月 26, 2023
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into test/TD-22889-3.0
上级
1b3f9f4a
f6776e1c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
58 addition
and
18 deletion
+58
-18
cmake/taostools_CMakeLists.txt.in
cmake/taostools_CMakeLists.txt.in
+1
-1
docs/en/13-operation/01-pkg-install.md
docs/en/13-operation/01-pkg-install.md
+5
-5
include/util/taoserror.h
include/util/taoserror.h
+1
-0
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+9
-0
source/libs/function/src/tudf.c
source/libs/function/src/tudf.c
+12
-7
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+9
-0
source/libs/sync/src/syncRequestVote.c
source/libs/sync/src/syncRequestVote.c
+1
-0
source/os/src/osTime.c
source/os/src/osTime.c
+16
-4
tools/shell/src/shellEngine.c
tools/shell/src/shellEngine.c
+4
-1
未找到文件。
cmake/taostools_CMakeLists.txt.in
浏览文件 @
1684f07a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# taos-tools
# taos-tools
ExternalProject_Add(taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG
d11f210
GIT_TAG
04296a5
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
#BUILD_IN_SOURCE TRUE
...
...
docs/en/13-operation/01-pkg-install.md
浏览文件 @
1684f07a
...
@@ -15,14 +15,14 @@ About details of installing TDenine, please refer to [Installation Guide](../../
...
@@ -15,14 +15,14 @@ About details of installing TDenine, please refer to [Installation Guide](../../
## Uninstall
## Uninstall
<Tabs>
<Tabs>
<TabItem
label=
"Uninstall apt-get"
value=
"aptremove"
>
<TabItem
label=
"Uninstall
by
apt-get"
value=
"aptremove"
>
Apt-get package of TDengine
can be uninstalled as below:
Uninstall package of TDengine by apt-get
can be uninstalled as below:
```
bash
```
bash
$
sudo
apt-get remove tdengine
$
sudo
apt-get remove tdengine
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Building dependency tree
Reading state information... Done
Reading state information... Done
The following packages will be REMOVED:
The following packages will be REMOVED:
tdengine
tdengine
...
@@ -35,7 +35,7 @@ TDengine is removed successfully!
...
@@ -35,7 +35,7 @@ TDengine is removed successfully!
```
```
Apt-get package of taosTools can be uninstalled as below
:
If you have installed taos-tools, please uninstall it first before uninstall TDengine. The command of uninstall is following
:
```
```
$ sudo apt remove taostools
$ sudo apt remove taostools
...
@@ -168,7 +168,7 @@ Upgrading a running server is much more complex. First please check the version
...
@@ -168,7 +168,7 @@ Upgrading a running server is much more complex. First please check the version
-
Stop the cluster of TDengine
-
Stop the cluster of TDengine
-
Uninstall old version and install new version
-
Uninstall old version and install new version
-
Start the cluster of TDengine
-
Start the cluster of TDengine
-
Execute simple queries, such as the ones executed prior to installing the new package, to make sure there is no data loss
-
Execute simple queries, such as the ones executed prior to installing the new package, to make sure there is no data loss
-
Run some simple data insertion statements to make sure the cluster works well
-
Run some simple data insertion statements to make sure the cluster works well
-
Restore business services
-
Restore business services
...
...
include/util/taoserror.h
浏览文件 @
1684f07a
...
@@ -223,6 +223,7 @@ int32_t* taosGetErrno();
...
@@ -223,6 +223,7 @@ int32_t* taosGetErrno();
// #define TSDB_CODE_MND_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x033C) // 2.x
// #define TSDB_CODE_MND_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x033C) // 2.x
// #define TSDB_CODE_MND_DNODE_ID_NOT_CONFIGUREDTAOS_DEF_ERROR_CODE(0, 0x033D) // 2.x
// #define TSDB_CODE_MND_DNODE_ID_NOT_CONFIGUREDTAOS_DEF_ERROR_CODE(0, 0x033D) // 2.x
// #define TSDB_CODE_MND_DNODE_EP_NOT_CONFIGUREDTAOS_DEF_ERROR_CODE(0, 0x033E) // 2.x
// #define TSDB_CODE_MND_DNODE_EP_NOT_CONFIGUREDTAOS_DEF_ERROR_CODE(0, 0x033E) // 2.x
#define TSDB_CODE_MND_DNODE_DIFF_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x033F) // internal
// mnode-acct
// mnode-acct
#define TSDB_CODE_MND_ACCT_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0340)
#define TSDB_CODE_MND_ACCT_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0340)
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
1684f07a
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "mndUser.h"
#include "mndUser.h"
#include "mndVgroup.h"
#include "mndVgroup.h"
#include "tmisce.h"
#include "tmisce.h"
#include "mndCluster.h"
#define TSDB_DNODE_VER_NUMBER 1
#define TSDB_DNODE_VER_NUMBER 1
#define TSDB_DNODE_RESERVE_SIZE 64
#define TSDB_DNODE_RESERVE_SIZE 64
...
@@ -366,6 +367,14 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
...
@@ -366,6 +367,14 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
goto
_OVER
;
goto
_OVER
;
}
}
int64_t
clusterid
=
mndGetClusterId
(
pMnode
);
if
(
statusReq
.
clusterId
!=
0
&&
statusReq
.
clusterId
!=
clusterid
)
{
code
=
TSDB_CODE_MND_DNODE_DIFF_CLUSTER
;
mWarn
(
"dnode:%d, %s, its clusterid:%"
PRId64
" differ from current cluster:%"
PRId64
", code:0x%x"
,
statusReq
.
dnodeId
,
statusReq
.
dnodeEp
,
statusReq
.
clusterId
,
clusterid
,
code
);
goto
_OVER
;
}
if
(
statusReq
.
dnodeId
==
0
)
{
if
(
statusReq
.
dnodeId
==
0
)
{
pDnode
=
mndAcquireDnodeByEp
(
pMnode
,
statusReq
.
dnodeEp
);
pDnode
=
mndAcquireDnodeByEp
(
pMnode
,
statusReq
.
dnodeEp
);
if
(
pDnode
==
NULL
)
{
if
(
pDnode
==
NULL
)
{
...
...
source/libs/function/src/tudf.c
浏览文件 @
1684f07a
...
@@ -1210,14 +1210,19 @@ int32_t udfAggFinalize(struct SqlFunctionCtx *pCtx, SSDataBlock *pBlock) {
...
@@ -1210,14 +1210,19 @@ int32_t udfAggFinalize(struct SqlFunctionCtx *pCtx, SSDataBlock *pBlock) {
fnError
(
"udfAggFinalize error. doCallUdfAggFinalize step. udf code:%d"
,
udfCallCode
);
fnError
(
"udfAggFinalize error. doCallUdfAggFinalize step. udf code:%d"
,
udfCallCode
);
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
0
;
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
0
;
}
else
{
}
else
{
if
(
resultBuf
.
bufLen
<=
session
->
bytes
)
{
if
(
resultBuf
.
numOfResult
==
0
)
{
memcpy
(
udfRes
->
finalResBuf
,
resultBuf
.
buf
,
resultBuf
.
bufLen
);
udfRes
->
finalResNum
=
0
;
udfRes
->
finalResNum
=
resultBuf
.
numOfResult
;
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
udfRes
->
finalResNum
;
}
else
{
fnError
(
"udfc inter buf size %d is greater than function output size %d"
,
resultBuf
.
bufLen
,
session
->
bytes
);
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
0
;
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
0
;
udfCallCode
=
TSDB_CODE_UDF_INVALID_OUTPUT_TYPE
;
}
else
{
if
(
resultBuf
.
bufLen
<=
session
->
bytes
)
{
memcpy
(
udfRes
->
finalResBuf
,
resultBuf
.
buf
,
resultBuf
.
bufLen
);
udfRes
->
finalResNum
=
resultBuf
.
numOfResult
;
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
udfRes
->
finalResNum
;
}
else
{
fnError
(
"udfc inter buf size %d is greater than function output size %d"
,
resultBuf
.
bufLen
,
session
->
bytes
);
GET_RES_INFO
(
pCtx
)
->
numOfRes
=
0
;
udfCallCode
=
TSDB_CODE_UDF_INVALID_OUTPUT_TYPE
;
}
}
}
}
}
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
1684f07a
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include "syncVoteMgr.h"
#include "syncVoteMgr.h"
#include "tglobal.h"
#include "tglobal.h"
#include "tref.h"
#include "tref.h"
#include "syncUtil.h"
static
void
syncNodeEqPingTimer
(
void
*
param
,
void
*
tmrId
);
static
void
syncNodeEqPingTimer
(
void
*
param
,
void
*
tmrId
);
static
void
syncNodeEqElectTimer
(
void
*
param
,
void
*
tmrId
);
static
void
syncNodeEqElectTimer
(
void
*
param
,
void
*
tmrId
);
...
@@ -2295,6 +2296,14 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
...
@@ -2295,6 +2296,14 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
int64_t
timeDiff
=
tsMs
-
pMsg
->
timeStamp
;
int64_t
timeDiff
=
tsMs
-
pMsg
->
timeStamp
;
syncLogRecvHeartbeat
(
ths
,
pMsg
,
timeDiff
,
tbuf
);
syncLogRecvHeartbeat
(
ths
,
pMsg
,
timeDiff
,
tbuf
);
if
(
!
syncNodeInRaftGroup
(
ths
,
&
pMsg
->
srcId
))
{
sWarn
(
"vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current "
"cluster:%d"
,
ths
->
vgId
,
DID
(
&
(
pMsg
->
srcId
)),
CID
(
&
(
pMsg
->
srcId
)),
CID
(
&
(
ths
->
myRaftId
)));
return
0
;
}
SRpcMsg
rpcMsg
=
{
0
};
SRpcMsg
rpcMsg
=
{
0
};
(
void
)
syncBuildHeartbeatReply
(
&
rpcMsg
,
ths
->
vgId
);
(
void
)
syncBuildHeartbeatReply
(
&
rpcMsg
,
ths
->
vgId
);
SyncTerm
currentTerm
=
raftStoreGetTerm
(
ths
);
SyncTerm
currentTerm
=
raftStoreGetTerm
(
ths
);
...
...
source/libs/sync/src/syncRequestVote.c
浏览文件 @
1684f07a
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "syncRaftStore.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncUtil.h"
#include "syncVoteMgr.h"
#include "syncVoteMgr.h"
#include "syncUtil.h"
// TLA+ Spec
// TLA+ Spec
// HandleRequestVoteRequest(i, j, m) ==
// HandleRequestVoteRequest(i, j, m) ==
...
...
source/os/src/osTime.c
浏览文件 @
1684f07a
...
@@ -413,12 +413,16 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
...
@@ -413,12 +413,16 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
}
}
#ifdef WINDOWS
#ifdef WINDOWS
if
(
*
timep
<
0
)
{
if
(
*
timep
<
0
)
{
return
NULL
;
// TODO: bugs in following code
SYSTEMTIME
ss
,
s
;
SYSTEMTIME
ss
,
s
;
FILETIME
ff
,
f
;
FILETIME
ff
,
f
;
LARGE_INTEGER
offset
;
LARGE_INTEGER
offset
;
struct
tm
tm1
;
struct
tm
tm1
;
time_t
tt
=
0
;
time_t
tt
=
0
;
localtime_s
(
&
tm1
,
&
tt
);
if
(
localtime_s
(
&
tm1
,
&
tt
)
!=
0
)
{
return
NULL
;
}
ss
.
wYear
=
tm1
.
tm_year
+
1900
;
ss
.
wYear
=
tm1
.
tm_year
+
1900
;
ss
.
wMonth
=
tm1
.
tm_mon
+
1
;
ss
.
wMonth
=
tm1
.
tm_mon
+
1
;
ss
.
wDay
=
tm1
.
tm_mday
;
ss
.
wDay
=
tm1
.
tm_mday
;
...
@@ -444,7 +448,9 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
...
@@ -444,7 +448,9 @@ struct tm *taosLocalTime(const time_t *timep, struct tm *result) {
result
->
tm_yday
=
0
;
result
->
tm_yday
=
0
;
result
->
tm_isdst
=
0
;
result
->
tm_isdst
=
0
;
}
else
{
}
else
{
localtime_s
(
result
,
timep
);
if
(
localtime_s
(
result
,
timep
)
!=
0
)
{
return
NULL
;
}
}
}
#else
#else
localtime_r
(
timep
,
result
);
localtime_r
(
timep
,
result
);
...
@@ -469,12 +475,16 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst)
...
@@ -469,12 +475,16 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst)
}
}
#ifdef WINDOWS
#ifdef WINDOWS
if
(
*
timep
<
0
)
{
if
(
*
timep
<
0
)
{
return
NULL
;
// TODO: bugs in following code
SYSTEMTIME
ss
,
s
;
SYSTEMTIME
ss
,
s
;
FILETIME
ff
,
f
;
FILETIME
ff
,
f
;
LARGE_INTEGER
offset
;
LARGE_INTEGER
offset
;
struct
tm
tm1
;
struct
tm
tm1
;
time_t
tt
=
0
;
time_t
tt
=
0
;
localtime_s
(
&
tm1
,
&
tt
);
if
(
localtime_s
(
&
tm1
,
&
tt
)
!=
0
)
{
return
NULL
;
}
ss
.
wYear
=
tm1
.
tm_year
+
1900
;
ss
.
wYear
=
tm1
.
tm_year
+
1900
;
ss
.
wMonth
=
tm1
.
tm_mon
+
1
;
ss
.
wMonth
=
tm1
.
tm_mon
+
1
;
ss
.
wDay
=
tm1
.
tm_mday
;
ss
.
wDay
=
tm1
.
tm_mday
;
...
@@ -500,7 +510,9 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst)
...
@@ -500,7 +510,9 @@ struct tm *taosLocalTimeNolock(struct tm *result, const time_t *timep, int dst)
result
->
tm_yday
=
0
;
result
->
tm_yday
=
0
;
result
->
tm_isdst
=
0
;
result
->
tm_isdst
=
0
;
}
else
{
}
else
{
localtime_s
(
result
,
timep
);
if
(
localtime_s
(
result
,
timep
)
!=
0
)
{
return
NULL
;
}
}
}
#elif defined(LINUX)
#elif defined(LINUX)
time_t
secsMin
=
60
,
secsHour
=
3600
,
secsDay
=
3600
*
24
;
time_t
secsMin
=
60
,
secsHour
=
3600
,
secsDay
=
3600
*
24
;
...
...
tools/shell/src/shellEngine.c
浏览文件 @
1684f07a
...
@@ -291,7 +291,10 @@ char *shellFormatTimestamp(char *buf, int64_t val, int32_t precision) {
...
@@ -291,7 +291,10 @@ char *shellFormatTimestamp(char *buf, int64_t val, int32_t precision) {
}
}
struct
tm
ptm
=
{
0
};
struct
tm
ptm
=
{
0
};
taosLocalTime
(
&
tt
,
&
ptm
);
if
(
taosLocalTime
(
&
tt
,
&
ptm
)
==
NULL
)
{
sprintf
(
buf
,
"NaN"
);
return
buf
;
}
size_t
pos
=
strftime
(
buf
,
35
,
"%Y-%m-%d %H:%M:%S"
,
&
ptm
);
size_t
pos
=
strftime
(
buf
,
35
,
"%Y-%m-%d %H:%M:%S"
,
&
ptm
);
if
(
precision
==
TSDB_TIME_PRECISION_NANO
)
{
if
(
precision
==
TSDB_TIME_PRECISION_NANO
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录