Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4e9381fe
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
提交
4e9381fe
编写于
2月 17, 2023
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: restore mnode table from vnode
上级
36d96ee6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
2 deletion
+23
-2
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+1
-0
src/common/src/tglobal.c
src/common/src/tglobal.c
+1
-0
src/inc/tsdb.h
src/inc/tsdb.h
+1
-0
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+0
-1
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+15
-1
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+5
-0
未找到文件。
src/common/inc/tglobal.h
浏览文件 @
4e9381fe
...
...
@@ -177,6 +177,7 @@ extern char tsLogDir[];
extern
char
tsScriptDir
[];
extern
int64_t
tsTickPerDay
[
3
];
extern
int32_t
tsTopicBianryLen
;
extern
int32_t
tsMetaSyncOption
;
// system info
extern
char
tsOsName
[];
...
...
src/common/src/tglobal.c
浏览文件 @
4e9381fe
...
...
@@ -232,6 +232,7 @@ int32_t tsKeepTimeOffset = 0;
int32_t
tsDiskCfgNum
=
0
;
int32_t
tsTopicBianryLen
=
16000
;
int32_t
tsMetaSyncOption
=
0
;
#ifndef _STORAGE
SDiskCfg
tsDiskCfg
[
1
];
...
...
src/inc/tsdb.h
浏览文件 @
4e9381fe
...
...
@@ -131,6 +131,7 @@ STableCfg *tsdbCreateTableCfgFromMsg(SMDCreateTableMsg *pMsg);
int
tsdbCreateTable
(
STsdbRepo
*
repo
,
STableCfg
*
pCfg
);
int
tsdbDropTable
(
STsdbRepo
*
pRepo
,
STableId
tableId
);
int
tsdbUpdateTableTagValue
(
STsdbRepo
*
repo
,
SUpdateTableTagValMsg
*
pMsg
);
int
tsdbPrintTables
(
STsdbRepo
*
repo
);
uint32_t
tsdbGetFileInfo
(
STsdbRepo
*
repo
,
char
*
name
,
uint32_t
*
index
,
uint32_t
eindex
,
int64_t
*
size
);
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
4e9381fe
...
...
@@ -52,7 +52,6 @@
// informal
#define META_SYNC_TABLE_NAME "_taos_meta_sync_table_name_taos_"
#define META_SYNC_TABLE_NAME_LEN 32
static
int32_t
tsMetaSyncOption
=
0
;
// informal
int64_t
tsCTableRid
=
-
1
;
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
4e9381fe
...
...
@@ -204,6 +204,20 @@ _err:
return
-
1
;
}
int
tsdbPrintTables
(
STsdbRepo
*
pRepo
)
{
STsdbMeta
*
pMeta
=
pRepo
->
tsdbMeta
;
if
(
tsdbRLockRepoMeta
(
pRepo
)
<
0
)
return
-
1
;
for
(
int32_t
i
=
0
;
i
<
pMeta
->
maxTables
;
++
i
)
{
if
(
pMeta
->
tables
[
i
]
!=
NULL
)
{
STable
*
pTable
=
pMeta
->
tables
[
i
];
tsdbDebug
(
"vgId:%d tbname:%s tid:%d uid:%"
PRIu64
,
REPO_ID
(
pRepo
),
pTable
->
name
->
data
,
pTable
->
tableId
.
tid
,
pTable
->
tableId
.
uid
);
}
}
if
(
tsdbUnlockRepoMeta
(
pRepo
)
<
0
)
return
-
1
;
return
0
;
}
void
*
tsdbGetTableTagVal
(
const
void
*
pTable
,
int32_t
colId
,
int16_t
type
)
{
// TODO: this function should be changed also
...
...
@@ -224,7 +238,7 @@ void *tsdbGetTableTagVal(const void* pTable, int32_t colId, int16_t type) {
return
val
;
}
char
*
tsdbGetTableName
(
void
*
pTable
)
{
char
*
tsdbGetTableName
(
void
*
pTable
)
{
// TODO: need to change as thread-safe
if
(
pTable
==
NULL
)
{
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
4e9381fe
...
...
@@ -28,6 +28,7 @@
#include "qFilter.h"
#include "cJSON.h"
#define EXTRA_BYTES 2
#define ASCENDING_TRAVERSE(o) (o == TSDB_ORDER_ASC)
#define QH_GET_NUM_OF_COLS(handle) ((size_t)(taosArrayGetSize((handle)->pColumns)))
...
...
@@ -2808,6 +2809,10 @@ int32_t tsdbGetFileBlocksDistInfo(TsdbQueryHandleT* queryHandle, STableBlockDist
tsdbFSIterSeek
(
&
pQueryHandle
->
fileIter
,
fid
);
tsdbUnLockFS
(
pFileHandle
);
if
(
tsMetaSyncOption
)
{
tsdbPrintTables
(
pQueryHandle
->
pTsdb
);
}
pTableBlockInfo
->
numOfFiles
+=
1
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录