Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
30c7c2c0
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
30c7c2c0
编写于
10月 30, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1856
上级
8e1ddeea
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
9 addition
and
10 deletion
+9
-10
src/inc/tsync.h
src/inc/tsync.h
+1
-1
src/inc/twal.h
src/inc/twal.h
+0
-1
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+2
-2
src/sync/test/syncServer.c
src/sync/test/syncServer.c
+1
-1
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+3
-3
src/wal/src/walWrite.c
src/wal/src/walWrite.c
+1
-1
src/wal/test/waltest.c
src/wal/test/waltest.c
+1
-1
未找到文件。
src/inc/tsync.h
浏览文件 @
30c7c2c0
...
...
@@ -68,7 +68,7 @@ typedef uint32_t (*FGetFileInfo)(void *ahandle, char *name, uint32_t *index, uin
// get the wal file from index or after
// return value, -1: error, 1:more wal files, 0:last WAL. if name[0]==0, no WAL file
typedef
int
(
*
FGetWalInfo
)(
void
*
ahandle
,
char
*
name
,
int64_t
*
index
);
typedef
int
32_t
(
*
FGetWalInfo
)(
void
*
ahandle
,
char
*
fileName
,
int64_t
*
fileId
);
// when a forward pkt is received, call this to handle data
typedef
int
(
*
FWriteToCache
)(
void
*
ahandle
,
void
*
pHead
,
int
type
);
...
...
src/inc/twal.h
浏览文件 @
30c7c2c0
...
...
@@ -41,7 +41,6 @@ typedef struct {
int8_t
walLevel
;
// wal level
int8_t
wals
;
// number of WAL files;
int8_t
keep
;
// keep the wal file when closed
int8_t
reserved
[
5
];
}
SWalCfg
;
typedef
void
*
twalh
;
// WAL HANDLE
...
...
src/mnode/src/mnodeSdb.c
浏览文件 @
30c7c2c0
...
...
@@ -237,8 +237,8 @@ static uint32_t sdbGetFileInfo(void *ahandle, char *name, uint32_t *index, uint3
return
0
;
}
static
int
sdbGetWalInfo
(
void
*
ahandle
,
char
*
name
,
int64_t
*
index
)
{
return
walGetWalFile
(
tsSdbObj
.
wal
,
name
,
index
);
static
int
32_t
sdbGetWalInfo
(
void
*
ahandle
,
char
*
fileName
,
int64_t
*
fileId
)
{
return
walGetWalFile
(
tsSdbObj
.
wal
,
fileName
,
fileId
);
}
static
void
sdbNotifyRole
(
void
*
ahandle
,
int8_t
role
)
{
...
...
src/sync/test/syncServer.c
浏览文件 @
30c7c2c0
...
...
@@ -254,7 +254,7 @@ uint32_t getFileInfo(void *ahandle, char *name, uint32_t *index, uint32_t eindex
return
magic
;
}
int
getWalInfo
(
void
*
ahandle
,
char
*
name
,
u
int64_t
*
index
)
{
int
getWalInfo
(
void
*
ahandle
,
char
*
name
,
int64_t
*
index
)
{
struct
stat
fstat
;
char
aname
[
280
];
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
30c7c2c0
...
...
@@ -42,7 +42,7 @@ static int32_t vnodeSaveVersion(SVnodeObj *pVnode);
static
int32_t
vnodeReadVersion
(
SVnodeObj
*
pVnode
);
static
int
vnodeProcessTsdbStatus
(
void
*
arg
,
int
status
);
static
uint32_t
vnodeGetFileInfo
(
void
*
ahandle
,
char
*
name
,
uint32_t
*
index
,
uint32_t
eindex
,
int64_t
*
size
,
uint64_t
*
fversion
);
static
int
vnodeGetWalInfo
(
void
*
ahandle
,
char
*
name
,
int64_t
*
index
);
static
int
vnodeGetWalInfo
(
void
*
ahandle
,
char
*
fileName
,
int64_t
*
fileId
);
static
void
vnodeNotifyRole
(
void
*
ahandle
,
int8_t
role
);
static
void
vnodeCtrlFlow
(
void
*
handle
,
int32_t
mseconds
);
static
int
vnodeNotifyFileSynced
(
void
*
ahandle
,
uint64_t
fversion
);
...
...
@@ -622,9 +622,9 @@ static uint32_t vnodeGetFileInfo(void *ahandle, char *name, uint32_t *index, uin
return
tsdbGetFileInfo
(
pVnode
->
tsdb
,
name
,
index
,
eindex
,
size
);
}
static
int
vnodeGetWalInfo
(
void
*
ahandle
,
char
*
name
,
int64_t
*
index
)
{
static
int
vnodeGetWalInfo
(
void
*
ahandle
,
char
*
fileName
,
int64_t
*
fileId
)
{
SVnodeObj
*
pVnode
=
ahandle
;
return
walGetWalFile
(
pVnode
->
wal
,
name
,
index
);
return
walGetWalFile
(
pVnode
->
wal
,
fileName
,
fileId
);
}
static
void
vnodeNotifyRole
(
void
*
ahandle
,
int8_t
role
)
{
...
...
src/wal/src/walWrite.c
浏览文件 @
30c7c2c0
...
...
@@ -58,7 +58,7 @@ int32_t walRenew(void *handle) {
if
(
!
pWal
->
keep
&&
lastId
!=
-
1
)
{
// remove last wal file
char
name
[
TSDB_FILENAME_LEN
+
20
];
char
name
[
WAL_FILE_LEN
];
snprintf
(
name
,
sizeof
(
name
),
"%s/%s%"
PRId64
,
pWal
->
path
,
WAL_PREFIX
,
lastId
);
if
(
remove
(
name
)
<
0
)
{
wError
(
"vgId:%d, file:%s, failed to remove since %s"
,
pWal
->
vgId
,
name
,
strerror
(
errno
));
...
...
src/wal/test/waltest.c
浏览文件 @
30c7c2c0
...
...
@@ -116,7 +116,7 @@ int main(int argc, char *argv[]) {
printf
(
"%d wal files are written
\n
"
,
total
);
int64_t
index
=
0
;
char
name
[
256
];
char
name
[
256
];
while
(
1
)
{
int
code
=
walGetWalFile
(
pWal
,
name
,
&
index
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录