Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a1b69421
T
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1180
Star
22014
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,发现更多精彩内容 >>
提交
a1b69421
编写于
5月 12, 2020
作者:
H
hzcheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tsdb log format
上级
c86cc2f4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
15 deletion
+15
-15
src/tsdb/src/tsdbCache.c
src/tsdb/src/tsdbCache.c
+1
-1
src/tsdb/src/tsdbMain.c
src/tsdb/src/tsdbMain.c
+10
-10
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+4
-4
未找到文件。
src/tsdb/src/tsdbCache.c
浏览文件 @
a1b69421
...
...
@@ -164,7 +164,7 @@ int tsdbAlterCacheTotalBlocks(STsdbRepo *pRepo, int totalBlocks) {
}
tsdbUnLockRepo
((
TsdbRepoT
*
)
pRepo
);
tsdbTrace
(
"
tsdbId %d:
tsdb total cache blocks changed from %d to %d"
,
pRepo
->
config
.
tsdbId
,
oldNumOfBlocks
,
totalBlocks
);
tsdbTrace
(
"
vgId: %d
tsdb total cache blocks changed from %d to %d"
,
pRepo
->
config
.
tsdbId
,
oldNumOfBlocks
,
totalBlocks
);
return
0
;
}
...
...
src/tsdb/src/tsdbMain.c
浏览文件 @
a1b69421
...
...
@@ -150,7 +150,7 @@ int32_t tsdbDropRepo(TsdbRepoT *repo) {
free
(
pRepo
->
rootDir
);
free
(
pRepo
);
tsdbTrace
(
"vgId
%d:
tsdb repository is dropped!"
,
id
);
tsdbTrace
(
"vgId
: %d
tsdb repository is dropped!"
,
id
);
return
0
;
}
...
...
@@ -242,7 +242,7 @@ TsdbRepoT *tsdbOpenRepo(char *tsdbDir, STsdbAppH *pAppH) {
pRepo
->
state
=
TSDB_REPO_STATE_ACTIVE
;
tsdbTrace
(
"vgId
%d:
open tsdb repository successfully!"
,
pRepo
->
config
.
tsdbId
);
tsdbTrace
(
"vgId
: %d
open tsdb repository successfully!"
,
pRepo
->
config
.
tsdbId
);
return
(
TsdbRepoT
*
)
pRepo
;
}
...
...
@@ -295,7 +295,7 @@ int32_t tsdbCloseRepo(TsdbRepoT *repo) {
tfree
(
pRepo
->
rootDir
);
tfree
(
pRepo
);
tsdbTrace
(
"vgId
%d:
repository is closed!"
,
id
);
tsdbTrace
(
"vgId
: %d
repository is closed!"
,
id
);
return
0
;
}
...
...
@@ -357,7 +357,7 @@ int32_t tsdbTriggerCommit(TsdbRepoT *repo) {
pthread_attr_init
(
&
thattr
);
pthread_attr_setdetachstate
(
&
thattr
,
PTHREAD_CREATE_DETACHED
);
pthread_create
(
&
(
pRepo
->
commitThread
),
&
thattr
,
tsdbCommitData
,
(
void
*
)
repo
);
tsdbTrace
(
"vgId
%d:
start to commit!"
,
pRepo
->
config
.
tsdbId
);
tsdbTrace
(
"vgId
: %d
start to commit!"
,
pRepo
->
config
.
tsdbId
);
return
0
;
}
...
...
@@ -753,12 +753,12 @@ static int32_t tsdbSetRepoEnv(STsdbRepo *pRepo) {
if
(
tsdbGetDataDirName
(
pRepo
,
dirName
)
<
0
)
return
-
1
;
if
(
mkdir
(
dirName
,
0755
)
<
0
)
{
tsdbError
(
"
id %d:
failed to create repository directory! reason %s"
,
pRepo
->
config
.
tsdbId
,
strerror
(
errno
));
tsdbError
(
"
vgId: %d
failed to create repository directory! reason %s"
,
pRepo
->
config
.
tsdbId
,
strerror
(
errno
));
return
-
1
;
}
tsdbTrace
(
"
id %d:
set up tsdb environment succeed! cacheBlockSize %d, totalBlocks %d, maxTables %d, daysPerFile %d, keep "
"
vgId: %d
set up tsdb environment succeed! cacheBlockSize %d, totalBlocks %d, maxTables %d, daysPerFile %d, keep "
"%d, minRowsPerFileBlock %d, maxRowsPerFileBlock %d, precision %d, compression%d"
,
pRepo
->
config
.
tsdbId
,
pCfg
->
cacheBlockSize
,
pCfg
->
totalBlocks
,
pCfg
->
maxTables
,
pCfg
->
daysPerFile
,
pCfg
->
keep
,
pCfg
->
minRowsPerFileBlock
,
pCfg
->
maxRowsPerFileBlock
,
pCfg
->
precision
,
pCfg
->
compression
);
...
...
@@ -839,7 +839,7 @@ static int32_t tdInsertRowToTable(STsdbRepo *pRepo, SDataRow row, STable *pTable
pTable
->
mem
->
numOfPoints
=
tSkipListGetSize
(
pTable
->
mem
->
pData
);
tsdbTrace
(
"vgId
%d, tid %d, uid
"
PRId64
"a row is inserted to table! key"
PRId64
,
tsdbTrace
(
"vgId
: %d, tid: %d, uid:
"
PRId64
"a row is inserted to table! key"
PRId64
,
pRepo
->
config
.
tsdbId
,
pTable
->
tableId
.
tid
,
pTable
->
tableId
.
uid
,
dataRowKey
(
row
));
return
0
;
...
...
@@ -1106,7 +1106,7 @@ static int tsdbHasDataToCommit(SSkipListIterator **iters, int nIters, TSKEY minK
static
void
tsdbAlterCompression
(
STsdbRepo
*
pRepo
,
int8_t
compression
)
{
int8_t
oldCompRession
=
pRepo
->
config
.
compression
;
pRepo
->
config
.
compression
=
compression
;
tsdbTrace
(
"vgId
%d:
tsdb compression is changed from %d to %d"
,
oldCompRession
,
compression
);
tsdbTrace
(
"vgId
: %d
tsdb compression is changed from %d to %d"
,
oldCompRession
,
compression
);
}
static
void
tsdbAlterKeep
(
STsdbRepo
*
pRepo
,
int32_t
keep
)
{
...
...
@@ -1123,13 +1123,13 @@ static void tsdbAlterKeep(STsdbRepo *pRepo, int32_t keep) {
}
pRepo
->
tsdbFileH
->
maxFGroups
=
maxFiles
;
}
tsdbTrace
(
"
id %d:
keep is changed from %d to %d"
,
pRepo
->
config
.
tsdbId
,
oldKeep
,
keep
);
tsdbTrace
(
"
vgId: %d
keep is changed from %d to %d"
,
pRepo
->
config
.
tsdbId
,
oldKeep
,
keep
);
}
static
void
tsdbAlterMaxTables
(
STsdbRepo
*
pRepo
,
int32_t
maxTables
)
{
// TODO
int
oldMaxTables
=
pRepo
->
config
.
maxTables
;
tsdbTrace
(
"vgId
%d:
tsdb maxTables is changed from %d to %d!"
,
pRepo
->
config
.
tsdbId
,
oldMaxTables
,
maxTables
);
tsdbTrace
(
"vgId
: %d
tsdb maxTables is changed from %d to %d!"
,
pRepo
->
config
.
tsdbId
,
oldMaxTables
,
maxTables
);
}
uint32_t
tsdbGetFileInfo
(
TsdbRepoT
*
repo
,
char
*
name
,
uint32_t
*
index
,
int32_t
*
size
)
{
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
a1b69421
...
...
@@ -356,12 +356,12 @@ int tsdbCreateTable(TsdbRepoT *repo, STableCfg *pCfg) {
// Register to meta
if
(
newSuper
)
{
tsdbAddTableToMeta
(
pMeta
,
super
,
true
);
tsdbTrace
(
"vgId
%d:
super table is created! uid "
PRId64
,
pRepo
->
config
.
tsdbId
,
tsdbTrace
(
"vgId
: %d
super table is created! uid "
PRId64
,
pRepo
->
config
.
tsdbId
,
super
->
tableId
.
uid
);
}
tsdbAddTableToMeta
(
pMeta
,
table
,
true
);
tsdbTrace
(
"vgId
%d: table is created! tid %d, uid "
PRId64
,
pRepo
->
config
.
tsdbI
d
,
super
->
tableId
.
tid
,
super
->
tableId
.
uid
);
tsdbTrace
(
"vgId
: %d table is created! tid %d, uid "
PRId64
,
pRepo
->
config
.
tsdbId
,
table
->
tableId
.
ti
d
,
table
->
tableId
.
uid
);
// Write to meta file
int
bufLen
=
0
;
...
...
@@ -409,7 +409,7 @@ int tsdbDropTable(TsdbRepoT *repo, STableId tableId) {
return
-
1
;
}
tsdbTrace
(
"vgId
%d:
table is dropped! tid %d, uid "
PRId64
,
pRepo
->
config
.
tsdbId
,
tableId
.
tid
,
tableId
.
uid
);
tsdbTrace
(
"vgId
: %d
table is dropped! tid %d, uid "
PRId64
,
pRepo
->
config
.
tsdbId
,
tableId
.
tid
,
tableId
.
uid
);
if
(
tsdbRemoveTableFromMeta
(
pMeta
,
pTable
)
<
0
)
return
-
1
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录