Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
265d27c2
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看板
未验证
提交
265d27c2
编写于
7月 12, 2022
作者:
D
dapan1121
提交者:
GitHub
7月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14807 from taosdata/fix/TD-16590
fix: add more columns in show stable res
上级
be94e05e
8957a91a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
41 addition
and
9 deletion
+41
-9
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+4
-1
source/client/src/clientHb.c
source/client/src/clientHb.c
+2
-5
source/common/src/systable.c
source/common/src/systable.c
+5
-2
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+29
-1
source/libs/catalog/src/catalog.c
source/libs/catalog/src/catalog.c
+1
-0
未找到文件。
source/client/src/clientEnv.c
浏览文件 @
265d27c2
...
...
@@ -189,12 +189,15 @@ void destroyTscObj(void *pObj) {
SClientHbKey
connKey
=
{.
tscRid
=
pTscObj
->
id
,
.
connType
=
pTscObj
->
connType
};
hbDeregisterConn
(
pTscObj
->
pAppInfo
->
pAppHbMgr
,
connKey
);
int64_t
connNum
=
atomic_sub_fetch_64
(
&
pTscObj
->
pAppInfo
->
numOfConns
,
1
);
destroyAllRequests
(
pTscObj
->
pRequests
);
taosHashCleanup
(
pTscObj
->
pRequests
);
schedulerStopQueryHb
(
pTscObj
->
pAppInfo
->
pTransporter
);
tscDebug
(
"connObj 0x%"
PRIx64
" p:%p destroyed, remain inst totalConn:%"
PRId64
,
pTscObj
->
id
,
pTscObj
,
pTscObj
->
pAppInfo
->
numOfConns
);
int64_t
connNum
=
atomic_sub_fetch_64
(
&
pTscObj
->
pAppInfo
->
numOfConns
,
1
);
if
(
0
==
connNum
)
{
destroyAppInst
(
pTscObj
->
pAppInfo
);
}
...
...
source/client/src/clientHb.c
浏览文件 @
265d27c2
...
...
@@ -671,8 +671,7 @@ static void *hbThreadFunc(void *param) {
}
#endif
while
(
1
)
{
int8_t
threadStop
=
atomic_val_compare_exchange_8
(
&
clientHbMgr
.
threadStop
,
1
,
2
);
if
(
1
==
threadStop
)
{
if
(
1
==
clientHbMgr
.
threadStop
)
{
break
;
}
...
...
@@ -760,9 +759,7 @@ static void hbStopThread() {
return
;
}
while
(
2
!=
atomic_load_8
(
&
clientHbMgr
.
threadStop
))
{
taosUsleep
(
10
);
}
taosThreadJoin
(
clientHbMgr
.
thread
,
NULL
);
tscDebug
(
"hb thread stopped"
);
}
...
...
source/common/src/systable.c
浏览文件 @
265d27c2
...
...
@@ -123,6 +123,9 @@ static const SSysDbTableSchema userStbsSchema[] = {
{.
name
=
"tags"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"last_update"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
{.
name
=
"table_comment"
,
.
bytes
=
TSDB_TB_COMMENT_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"watermark"
,
.
bytes
=
64
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"max_delay"
,
.
bytes
=
64
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"rollup"
,
.
bytes
=
128
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
};
static
const
SSysDbTableSchema
streamSchema
[]
=
{
...
...
@@ -146,8 +149,8 @@ static const SSysDbTableSchema userTblsSchema[] = {
{.
name
=
"uid"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_BIGINT
},
{.
name
=
"vgroup_id"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"ttl"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"table_comment"
,
.
bytes
=
TSDB_TB_COMMENT_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"type"
,
.
bytes
=
2
0
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"table_comment"
,
.
bytes
=
TSDB_TB_COMMENT_LEN
-
1
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"type"
,
.
bytes
=
2
1
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
};
static
const
SSysDbTableSchema
userTblDistSchema
[]
=
{
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
265d27c2
...
...
@@ -2109,7 +2109,7 @@ static int32_t mndRetrieveStb(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pStb
->
updateTime
,
false
);
// number of tables
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
if
(
pStb
->
commentLen
>
0
)
{
char
comment
[
TSDB_TB_COMMENT_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
STR_TO_VARSTR
(
comment
,
pStb
->
comment
);
...
...
@@ -2122,6 +2122,34 @@ static int32_t mndRetrieveStb(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
colDataAppendNULL
(
pColInfo
,
numOfRows
);
}
char
watermark
[
64
+
VARSTR_HEADER_SIZE
]
=
{
0
};
sprintf
(
varDataVal
(
watermark
),
"%"
PRId64
"a,%"
PRId64
"a"
,
pStb
->
watermark
[
0
],
pStb
->
watermark
[
1
]);
varDataSetLen
(
watermark
,
strlen
(
varDataVal
(
watermark
)));
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
watermark
,
false
);
char
maxDelay
[
64
+
VARSTR_HEADER_SIZE
]
=
{
0
};
sprintf
(
varDataVal
(
maxDelay
),
"%"
PRId64
"a,%"
PRId64
"a"
,
pStb
->
maxdelay
[
0
],
pStb
->
maxdelay
[
1
]);
varDataSetLen
(
maxDelay
,
strlen
(
varDataVal
(
maxDelay
)));
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
maxDelay
,
false
);
char
rollup
[
128
+
VARSTR_HEADER_SIZE
]
=
{
0
};
int32_t
rollupNum
=
(
int32_t
)
taosArrayGetSize
(
pStb
->
pFuncs
);
for
(
int32_t
i
=
0
;
i
<
rollupNum
;
++
i
)
{
char
*
funcName
=
taosArrayGet
(
pStb
->
pFuncs
,
i
);
if
(
i
)
{
strcat
(
varDataVal
(
rollup
),
", "
);
}
strcat
(
varDataVal
(
rollup
),
funcName
);
}
varDataSetLen
(
rollup
,
strlen
(
varDataVal
(
rollup
)));
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
rollup
,
false
);
numOfRows
++
;
sdbRelease
(
pSdb
,
pStb
);
}
...
...
source/libs/catalog/src/catalog.c
浏览文件 @
265d27c2
...
...
@@ -1293,6 +1293,7 @@ void catalogDestroy(void) {
if
(
!
taosCheckCurrentInDll
())
{
ctgClearCacheEnqueue
(
NULL
,
true
,
true
,
true
);
taosThreadJoin
(
gCtgMgmt
.
updateThread
,
NULL
);
}
taosHashCleanup
(
gCtgMgmt
.
pCluster
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录