Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
db38dce2
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
db38dce2
编写于
10月 31, 2021
作者:
X
xywang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into fix/TD-10691
上级
1aeb6d67
d326cfc6
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
54 addition
and
19 deletion
+54
-19
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/define.inc
cmake/define.inc
+4
-0
cmake/install.inc
cmake/install.inc
+2
-4
src/connector/grafanaplugin
src/connector/grafanaplugin
+1
-1
src/dnode/CMakeLists.txt
src/dnode/CMakeLists.txt
+4
-0
src/dnode/src/dnodeMain.c
src/dnode/src/dnodeMain.c
+2
-0
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+4
-1
src/mnode/src/mnodeFunc.c
src/mnode/src/mnodeFunc.c
+2
-0
src/mnode/src/mnodeMain.c
src/mnode/src/mnodeMain.c
+1
-1
src/mnode/src/mnodeWrite.c
src/mnode/src/mnodeWrite.c
+3
-1
src/os/src/detail/osTime.c
src/os/src/detail/osTime.c
+1
-1
src/plugins/blm3
src/plugins/blm3
+1
-1
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+6
-0
tests/pytest/tools/taosdemoTestTblAlt.py
tests/pytest/tools/taosdemoTestTblAlt.py
+22
-9
未找到文件。
CMakeLists.txt
浏览文件 @
db38dce2
...
...
@@ -18,6 +18,7 @@ ENDIF ()
SET
(
TD_ACCOUNT FALSE
)
SET
(
TD_ADMIN FALSE
)
SET
(
TD_GRANT FALSE
)
SET
(
TD_USB_DONGLE FALSE
)
SET
(
TD_MQTT FALSE
)
SET
(
TD_TSDB_PLUGINS FALSE
)
SET
(
TD_STORAGE FALSE
)
...
...
cmake/define.inc
浏览文件 @
db38dce2
...
...
@@ -13,6 +13,10 @@ IF (TD_GRANT)
ADD_DEFINITIONS
(
-
D_GRANT
)
ENDIF
()
IF
(
TD_USB_DONGLE
)
ADD_DEFINITIONS
(
-
D_USB_DONGLE
)
ENDIF
()
IF
(
TD_MQTT
)
ADD_DEFINITIONS
(
-
D_MQTT
)
ENDIF
()
...
...
cmake/install.inc
浏览文件 @
db38dce2
IF
(
TD_LINUX
)
SET
(
TD_MAKE_INSTALL_SH
"${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh"
)
INSTALL
(
CODE
"MESSAGE(
\"
make install script: ${TD_MAKE_INSTALL_SH}
\"
)"
)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})"
)
INSTALL
(
CODE
"execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})"
)
INSTALL
(
CODE
"execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})"
)
ELSEIF
(
TD_WINDOWS
)
IF
(
TD_POWER
)
SET
(
CMAKE_INSTALL_PREFIX
C
:/
PowerDB
)
...
...
@@ -41,6 +40,5 @@ ELSEIF (TD_WINDOWS)
ELSEIF
(
TD_DARWIN
)
SET
(
TD_MAKE_INSTALL_SH
"${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh"
)
INSTALL
(
CODE
"MESSAGE(
\"
make install script: ${TD_MAKE_INSTALL_SH}
\"
)"
)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})"
)
INSTALL
(
CODE
"execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})"
)
INSTALL
(
CODE
"execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})"
)
ENDIF
()
grafanaplugin
@
9ae793ad
比较
edad7465
...
9ae793ad
Subproject commit
edad746514b2a53a8cf6061c93b98b52a5388692
Subproject commit
9ae793ad2d567eb11d10627b65698f612542e988
src/dnode/CMakeLists.txt
浏览文件 @
db38dce2
...
...
@@ -39,6 +39,10 @@ IF (TD_GRANT)
TARGET_LINK_LIBRARIES
(
taosd grant
)
ENDIF
()
IF
(
TD_USB_DONGLE
)
TARGET_LINK_LIBRARIES
(
taosd usb_dongle
)
ENDIF
()
IF
(
TD_MQTT
)
TARGET_LINK_LIBRARIES
(
taosd mqtt
)
ENDIF
()
...
...
src/dnode/src/dnodeMain.c
浏览文件 @
db38dce2
...
...
@@ -23,6 +23,7 @@
#include "twal.h"
#include "tfs.h"
#include "tsync.h"
#include "tgrant.h"
#include "dnodeStep.h"
#include "dnodePeer.h"
#include "dnodeModule.h"
...
...
@@ -88,6 +89,7 @@ static SStep tsDnodeSteps[] = {
{
"dnode-statustmr"
,
dnodeInitStatusTimer
,
dnodeCleanupStatusTimer
},
{
"dnode-telemetry"
,
dnodeInitTelemetry
,
dnodeCleanupTelemetry
},
{
"dnode-script"
,
scriptEnvPoolInit
,
scriptEnvPoolCleanup
},
{
"dnode-grant"
,
grantInit
,
grantCleanUp
},
};
static
SStep
tsDnodeCompactSteps
[]
=
{
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
db38dce2
...
...
@@ -927,9 +927,12 @@ static int32_t mnodeProcessCreateDbMsg(SMnodeMsg *pMsg) {
pCreate
->
maxRowsPerFileBlock
=
htonl
(
pCreate
->
maxRowsPerFileBlock
);
int32_t
code
;
#ifdef GRANT_CHECK_WRITE
if
(
grantCheck
(
TSDB_GRANT_TIME
)
!=
TSDB_CODE_SUCCESS
)
{
code
=
TSDB_CODE_GRANT_EXPIRED
;
}
else
if
(
!
pMsg
->
pUser
->
writeAuth
)
{
}
// else
#endif
if
(
!
pMsg
->
pUser
->
writeAuth
)
{
code
=
TSDB_CODE_MND_NO_RIGHTS
;
}
else
{
code
=
mnodeCreateDb
(
pMsg
->
pUser
->
pAcct
,
pCreate
,
pMsg
);
...
...
src/mnode/src/mnodeFunc.c
浏览文件 @
db38dce2
...
...
@@ -191,9 +191,11 @@ static int32_t mnodeUpdateFunc(SFuncObj *pFunc, void *pMsg) {
}
*/
int32_t
mnodeCreateFunc
(
SAcctObj
*
pAcct
,
char
*
name
,
int32_t
codeLen
,
char
*
codeScript
,
char
*
path
,
uint8_t
outputType
,
int16_t
outputLen
,
int32_t
funcType
,
int32_t
bufSize
,
SMnodeMsg
*
pMsg
)
{
#ifdef GRANT_CHECK_WRITE
if
(
grantCheck
(
TSDB_GRANT_TIME
)
!=
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_GRANT_EXPIRED
;
}
#endif
if
(
!
pMsg
->
pUser
->
writeAuth
)
{
return
TSDB_CODE_MND_NO_RIGHTS
;
...
...
src/mnode/src/mnodeMain.c
浏览文件 @
db38dce2
...
...
@@ -55,7 +55,7 @@ static SStep tsMnodeSteps[] = {
{
"mnodes"
,
mnodeInitMnodes
,
mnodeCleanupMnodes
},
{
"sdb"
,
sdbInit
,
sdbCleanUp
},
{
"balance"
,
bnInit
,
bnCleanUp
},
{
"grant"
,
grantInit
,
grantCleanUp
},
//
{"grant", grantInit, grantCleanUp},
{
"show"
,
mnodeInitShow
,
mnodeCleanUpShow
}
};
...
...
src/mnode/src/mnodeWrite.c
浏览文件 @
db38dce2
...
...
@@ -65,14 +65,16 @@ int32_t mnodeProcessWrite(SMnodeMsg *pMsg) {
return
TSDB_CODE_MND_MSG_NOT_PROCESSED
;
}
#ifdef GRANT_CHECK_WRITE
int32_t
code
=
grantCheck
(
TSDB_GRANT_TIME
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"msg:%p, app:%p type:%s not processed, reason:%s"
,
pMsg
,
pMsg
->
rpcMsg
.
ahandle
,
taosMsg
[
pMsg
->
rpcMsg
.
msgType
],
tstrerror
(
code
));
return
code
;
}
#endif
code
=
mnodeInitMsg
(
pMsg
);
int32_t
code
=
mnodeInitMsg
(
pMsg
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"msg:%p, app:%p type:%s not processed, reason:%s"
,
pMsg
,
pMsg
->
rpcMsg
.
ahandle
,
taosMsg
[
pMsg
->
rpcMsg
.
msgType
],
tstrerror
(
code
));
...
...
src/os/src/detail/osTime.c
浏览文件 @
db38dce2
...
...
@@ -380,7 +380,7 @@ int64_t convertTimePrecision(int64_t time, int32_t fromPrecision, int32_t toPrec
assert
(
toPrecision
==
TSDB_TIME_PRECISION_MILLI
||
toPrecision
==
TSDB_TIME_PRECISION_MICRO
||
toPrecision
==
TSDB_TIME_PRECISION_NANO
);
double
tempResult
=
time
;
double
tempResult
=
(
double
)
time
;
switch
(
fromPrecision
)
{
case
TSDB_TIME_PRECISION_MILLI
:
{
switch
(
toPrecision
)
{
...
...
blm3
@
ba539ce6
比较
f56aa0f4
...
ba539ce6
Subproject commit
f56aa0f485d7bb6aebbcefc2007eeecdccb767c8
Subproject commit
ba539ce69dc4fe53536e9b0517fe75917dce5c46
src/vnode/src/vnodeRead.c
浏览文件 @
db38dce2
...
...
@@ -20,6 +20,7 @@
#include "tglobal.h"
#include "query.h"
#include "vnodeStatus.h"
#include "tgrant.h"
int32_t
vNumOfExistedQHandle
;
// current initialized and existed query handle in current dnode
...
...
@@ -55,6 +56,11 @@ int32_t vnodeProcessRead(void *vparam, SVReadMsg *pRead) {
}
static
int32_t
vnodeCheckRead
(
SVnodeObj
*
pVnode
)
{
if
(
grantCheck
(
TSDB_GRANT_TIME
)
!=
TSDB_CODE_SUCCESS
)
{
vDebug
(
"vgId:%d, grant expired, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_GRANT_EXPIRED
;
}
if
(
!
vnodeInReadyStatus
(
pVnode
))
{
vDebug
(
"vgId:%d, vnode status is %s, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
pVnode
->
refCount
,
pVnode
);
...
...
tests/pytest/tools/taosdemoTestTblAlt.py
浏览文件 @
db38dce2
...
...
@@ -54,27 +54,36 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
if
(
threadID
==
0
):
os
.
system
(
"%staosdemo -y -t %d -n %d -b INT,INT,INT,INT -m t"
%
print
(
"%staosdemo -y -t %d -n %d -b INT,INT,INT,INT"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
os
.
system
(
"%staosdemo -y -t %d -n %d -b INT,INT,INT,INT"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
if
(
threadID
==
1
):
time
.
sleep
(
2
)
print
(
"use test"
)
while
True
:
max_try
=
100
count
=
0
while
(
count
<
max_try
):
try
:
tdSql
.
execute
(
"use test"
)
break
except
Exception
as
e
:
tdLog
.
info
(
"use database test failed"
)
time
.
sleep
(
1
)
time
.
sleep
(
2
)
count
+=
1
print
(
"try %d times"
%
count
)
continue
# check if all the tables have heen created
while
True
:
count
=
0
while
(
count
<
max_try
):
try
:
tdSql
.
query
(
"show tables"
)
except
Exception
as
e
:
tdLog
.
info
(
"show tables test failed"
)
time
.
sleep
(
1
)
time
.
sleep
(
2
)
count
+=
1
print
(
"try %d times"
%
count
)
continue
rows
=
tdSql
.
queryRows
...
...
@@ -83,13 +92,17 @@ class TDTestCase:
break
time
.
sleep
(
1
)
# check if there are any records in the last created table
while
True
:
count
=
0
while
(
count
<
max_try
):
print
(
"query started"
)
print
(
"try %d times"
%
count
)
try
:
tdSql
.
query
(
"select * from test.
t
7"
)
tdSql
.
query
(
"select * from test.
d
7"
)
except
Exception
as
e
:
tdLog
.
info
(
"select * test failed"
)
time
.
sleep
(
2
)
count
+=
1
print
(
"try %d times"
%
count
)
continue
rows
=
tdSql
.
queryRows
...
...
@@ -100,8 +113,8 @@ class TDTestCase:
print
(
"alter table test.meters add column c10 int"
)
tdSql
.
execute
(
"alter table test.meters add column c10 int"
)
print
(
"insert into test.
t
7 values (now, 1, 2, 3, 4, 0)"
)
tdSql
.
execute
(
"insert into test.
t
7 values (now, 1, 2, 3, 4, 0)"
)
print
(
"insert into test.
d
7 values (now, 1, 2, 3, 4, 0)"
)
tdSql
.
execute
(
"insert into test.
d
7 values (now, 1, 2, 3, 4, 0)"
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录