Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
1601a1e5
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看板
未验证
提交
1601a1e5
编写于
3月 18, 2021
作者:
S
Shengliang Guan
提交者:
GitHub
3月 18, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5470 from taosdata/feature/linux
add some log for debug
上级
199e61ec
34565eff
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
30 deletion
+32
-30
src/query/src/queryMain.c
src/query/src/queryMain.c
+2
-2
src/sync/src/syncRetrieve.c
src/sync/src/syncRetrieve.c
+22
-22
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+2
-2
src/vnode/src/vnodeStatus.c
src/vnode/src/vnodeStatus.c
+2
-0
src/vnode/src/vnodeSync.c
src/vnode/src/vnodeSync.c
+3
-3
src/wal/src/walWrite.c
src/wal/src/walWrite.c
+1
-1
未找到文件。
src/query/src/queryMain.c
浏览文件 @
1601a1e5
...
@@ -430,7 +430,7 @@ void qQueryMgmtNotifyClosed(void* pQMgmt) {
...
@@ -430,7 +430,7 @@ void qQueryMgmtNotifyClosed(void* pQMgmt) {
}
}
SQueryMgmt
*
pQueryMgmt
=
pQMgmt
;
SQueryMgmt
*
pQueryMgmt
=
pQMgmt
;
q
Debug
(
"vgId:%d, set querymgmt closed, wait for all queries cancelled"
,
pQueryMgmt
->
vgId
);
q
Info
(
"vgId:%d, set querymgmt closed, wait for all queries cancelled"
,
pQueryMgmt
->
vgId
);
pthread_mutex_lock
(
&
pQueryMgmt
->
lock
);
pthread_mutex_lock
(
&
pQueryMgmt
->
lock
);
pQueryMgmt
->
closed
=
true
;
pQueryMgmt
->
closed
=
true
;
...
@@ -445,7 +445,7 @@ void qQueryMgmtReOpen(void *pQMgmt) {
...
@@ -445,7 +445,7 @@ void qQueryMgmtReOpen(void *pQMgmt) {
}
}
SQueryMgmt
*
pQueryMgmt
=
pQMgmt
;
SQueryMgmt
*
pQueryMgmt
=
pQMgmt
;
q
Debug
(
"vgId:%d, set querymgmt reopen"
,
pQueryMgmt
->
vgId
);
q
Info
(
"vgId:%d, set querymgmt reopen"
,
pQueryMgmt
->
vgId
);
pthread_mutex_lock
(
&
pQueryMgmt
->
lock
);
pthread_mutex_lock
(
&
pQueryMgmt
->
lock
);
pQueryMgmt
->
closed
=
false
;
pQueryMgmt
->
closed
=
false
;
...
...
src/sync/src/syncRetrieve.c
浏览文件 @
1601a1e5
...
@@ -29,7 +29,7 @@ static int32_t syncGetWalVersion(SSyncNode *pNode, SSyncPeer *pPeer) {
...
@@ -29,7 +29,7 @@ static int32_t syncGetWalVersion(SSyncNode *pNode, SSyncPeer *pPeer) {
uint64_t
fver
,
wver
;
uint64_t
fver
,
wver
;
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
s
Debug
(
"%s, vnode is commiting while retrieve, last wver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastWalVer
);
s
Info
(
"%s, vnode is commiting while retrieve, last wver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastWalVer
);
return
-
1
;
return
-
1
;
}
}
...
@@ -41,12 +41,12 @@ static bool syncIsWalModified(SSyncNode *pNode, SSyncPeer *pPeer) {
...
@@ -41,12 +41,12 @@ static bool syncIsWalModified(SSyncNode *pNode, SSyncPeer *pPeer) {
uint64_t
fver
,
wver
;
uint64_t
fver
,
wver
;
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
s
Debug
(
"%s, vnode is commiting while retrieve, last wver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastWalVer
);
s
Info
(
"%s, vnode is commiting while retrieve, last wver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastWalVer
);
return
true
;
return
true
;
}
}
if
(
wver
!=
pPeer
->
lastWalVer
)
{
if
(
wver
!=
pPeer
->
lastWalVer
)
{
s
Debug
(
"%s, wal is modified while retrieve, wver:%"
PRIu64
", last:%"
PRIu64
,
pPeer
->
id
,
wver
,
pPeer
->
lastWalVer
);
s
Info
(
"%s, wal is modified while retrieve, wver:%"
PRIu64
", last:%"
PRIu64
,
pPeer
->
id
,
wver
,
pPeer
->
lastWalVer
);
return
true
;
return
true
;
}
}
...
@@ -57,7 +57,7 @@ static int32_t syncGetFileVersion(SSyncNode *pNode, SSyncPeer *pPeer) {
...
@@ -57,7 +57,7 @@ static int32_t syncGetFileVersion(SSyncNode *pNode, SSyncPeer *pPeer) {
uint64_t
fver
,
wver
;
uint64_t
fver
,
wver
;
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
s
Debug
(
"%s, vnode is commiting while get fver for retrieve, last fver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastFileVer
);
s
Info
(
"%s, vnode is commiting while get fver for retrieve, last fver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastFileVer
);
return
-
1
;
return
-
1
;
}
}
...
@@ -69,13 +69,13 @@ static bool syncAreFilesModified(SSyncNode *pNode, SSyncPeer *pPeer) {
...
@@ -69,13 +69,13 @@ static bool syncAreFilesModified(SSyncNode *pNode, SSyncPeer *pPeer) {
uint64_t
fver
,
wver
;
uint64_t
fver
,
wver
;
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
int32_t
code
=
(
*
pNode
->
getVersionFp
)(
pNode
->
vgId
,
&
fver
,
&
wver
);
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
s
Debug
(
"%s, vnode is commiting while retrieve, last fver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastFileVer
);
s
Info
(
"%s, vnode is commiting while retrieve, last fver:%"
PRIu64
,
pPeer
->
id
,
pPeer
->
lastFileVer
);
pPeer
->
fileChanged
=
1
;
pPeer
->
fileChanged
=
1
;
return
true
;
return
true
;
}
}
if
(
fver
!=
pPeer
->
lastFileVer
)
{
if
(
fver
!=
pPeer
->
lastFileVer
)
{
s
Debug
(
"%s, files are modified while retrieve, fver:%"
PRIu64
", last:%"
PRIu64
,
pPeer
->
id
,
fver
,
pPeer
->
lastFileVer
);
s
Info
(
"%s, files are modified while retrieve, fver:%"
PRIu64
", last:%"
PRIu64
,
pPeer
->
id
,
fver
,
pPeer
->
lastFileVer
);
pPeer
->
fileChanged
=
1
;
pPeer
->
fileChanged
=
1
;
return
true
;
return
true
;
}
}
...
@@ -143,13 +143,13 @@ static int32_t syncReadOneWalRecord(int32_t sfd, SWalHead *pHead) {
...
@@ -143,13 +143,13 @@ static int32_t syncReadOneWalRecord(int32_t sfd, SWalHead *pHead) {
}
}
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
s
Debug
(
"sfd:%d, read to the end of file, ret:%d"
,
sfd
,
ret
);
s
Info
(
"sfd:%d, read to the end of file, ret:%d"
,
sfd
,
ret
);
return
0
;
return
0
;
}
}
if
(
ret
!=
sizeof
(
SWalHead
))
{
if
(
ret
!=
sizeof
(
SWalHead
))
{
// file is not at end yet, it shall be reloaded
// file is not at end yet, it shall be reloaded
s
Debug
(
"sfd:%d, a partial wal head is read out, ret:%d"
,
sfd
,
ret
);
s
Info
(
"sfd:%d, a partial wal head is read out, ret:%d"
,
sfd
,
ret
);
return
0
;
return
0
;
}
}
...
@@ -163,7 +163,7 @@ static int32_t syncReadOneWalRecord(int32_t sfd, SWalHead *pHead) {
...
@@ -163,7 +163,7 @@ static int32_t syncReadOneWalRecord(int32_t sfd, SWalHead *pHead) {
if
(
ret
!=
pHead
->
len
)
{
if
(
ret
!=
pHead
->
len
)
{
// file is not at end yet, it shall be reloaded
// file is not at end yet, it shall be reloaded
s
Debug
(
"sfd:%d, a partial wal conetnt is read out, ret:%d"
,
sfd
,
ret
);
s
Info
(
"sfd:%d, a partial wal conetnt is read out, ret:%d"
,
sfd
,
ret
);
return
0
;
return
0
;
}
}
...
@@ -184,7 +184,7 @@ static int64_t syncRetrieveLastWal(SSyncPeer *pPeer, char *name, uint64_t fversi
...
@@ -184,7 +184,7 @@ static int64_t syncRetrieveLastWal(SSyncPeer *pPeer, char *name, uint64_t fversi
return
-
1
;
return
-
1
;
}
}
s
Debug
(
"%s, retrieve last wal:%s, offset:%"
PRId64
" fver:%"
PRIu64
,
pPeer
->
id
,
name
,
offset
,
fversion
);
s
Info
(
"%s, retrieve last wal:%s, offset:%"
PRId64
" fver:%"
PRIu64
,
pPeer
->
id
,
name
,
offset
,
fversion
);
SWalHead
*
pHead
=
malloc
(
SYNC_MAX_SIZE
);
SWalHead
*
pHead
=
malloc
(
SYNC_MAX_SIZE
);
int64_t
bytes
=
0
;
int64_t
bytes
=
0
;
...
@@ -198,7 +198,7 @@ static int64_t syncRetrieveLastWal(SSyncPeer *pPeer, char *name, uint64_t fversi
...
@@ -198,7 +198,7 @@ static int64_t syncRetrieveLastWal(SSyncPeer *pPeer, char *name, uint64_t fversi
if
(
code
==
0
)
{
if
(
code
==
0
)
{
code
=
bytes
;
code
=
bytes
;
s
Debug
(
"%s, read to the end of wal, bytes:%"
PRId64
,
pPeer
->
id
,
bytes
);
s
Info
(
"%s, read to the end of wal, bytes:%"
PRId64
,
pPeer
->
id
,
bytes
);
break
;
break
;
}
}
...
@@ -217,7 +217,7 @@ static int64_t syncRetrieveLastWal(SSyncPeer *pPeer, char *name, uint64_t fversi
...
@@ -217,7 +217,7 @@ static int64_t syncRetrieveLastWal(SSyncPeer *pPeer, char *name, uint64_t fversi
if
(
pHead
->
version
>=
fversion
&&
fversion
>
0
)
{
if
(
pHead
->
version
>=
fversion
&&
fversion
>
0
)
{
code
=
0
;
code
=
0
;
s
Debug
(
"%s, retrieve wal finished, hver:%"
PRIu64
" fver:%"
PRIu64
,
pPeer
->
id
,
pHead
->
version
,
fversion
);
s
Info
(
"%s, retrieve wal finished, hver:%"
PRIu64
" fver:%"
PRIu64
,
pPeer
->
id
,
pHead
->
version
,
fversion
);
break
;
break
;
}
}
}
}
...
@@ -237,7 +237,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
...
@@ -237,7 +237,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
// get full path to wal file
// get full path to wal file
snprintf
(
fname
,
sizeof
(
fname
),
"%s/%s"
,
pNode
->
path
,
wname
);
snprintf
(
fname
,
sizeof
(
fname
),
"%s/%s"
,
pNode
->
path
,
wname
);
s
Debug
(
"%s, start to retrieve last wal:%s"
,
pPeer
->
id
,
fname
);
s
Info
(
"%s, start to retrieve last wal:%s"
,
pPeer
->
id
,
fname
);
while
(
1
)
{
while
(
1
)
{
if
(
syncAreFilesModified
(
pNode
,
pPeer
))
return
-
1
;
if
(
syncAreFilesModified
(
pNode
,
pPeer
))
return
-
1
;
...
@@ -245,7 +245,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
...
@@ -245,7 +245,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
int64_t
bytes
=
syncRetrieveLastWal
(
pPeer
,
fname
,
fversion
,
offset
);
int64_t
bytes
=
syncRetrieveLastWal
(
pPeer
,
fname
,
fversion
,
offset
);
if
(
bytes
<
0
)
{
if
(
bytes
<
0
)
{
s
Debug
(
"%s, failed to retrieve last wal, bytes:%"
PRId64
,
pPeer
->
id
,
bytes
);
s
Info
(
"%s, failed to retrieve last wal, bytes:%"
PRId64
,
pPeer
->
id
,
bytes
);
return
bytes
;
return
bytes
;
}
}
...
@@ -257,13 +257,13 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
...
@@ -257,13 +257,13 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
if
(
fversion
==
0
)
{
if
(
fversion
==
0
)
{
pPeer
->
sstatus
=
TAOS_SYNC_STATUS_CACHE
;
// start to forward pkt
pPeer
->
sstatus
=
TAOS_SYNC_STATUS_CACHE
;
// start to forward pkt
fversion
=
nodeVersion
;
// must read data to fversion
fversion
=
nodeVersion
;
// must read data to fversion
s
Debug
(
"%s, set sstatus:%s and fver:%"
PRIu64
,
pPeer
->
id
,
syncStatus
[
pPeer
->
sstatus
],
fversion
);
s
Info
(
"%s, set sstatus:%s and fver:%"
PRIu64
,
pPeer
->
id
,
syncStatus
[
pPeer
->
sstatus
],
fversion
);
}
}
}
}
// if all data up to fversion is read out, it is over
// if all data up to fversion is read out, it is over
if
(
pPeer
->
sversion
>=
fversion
&&
fversion
>
0
)
{
if
(
pPeer
->
sversion
>=
fversion
&&
fversion
>
0
)
{
s
Debug
(
"%s, data up to fver:%"
PRIu64
" has been read out, bytes:%"
PRId64
" sver:%"
PRIu64
,
pPeer
->
id
,
fversion
,
bytes
,
s
Info
(
"%s, data up to fver:%"
PRIu64
" has been read out, bytes:%"
PRId64
" sver:%"
PRIu64
,
pPeer
->
id
,
fversion
,
bytes
,
pPeer
->
sversion
);
pPeer
->
sversion
);
return
0
;
return
0
;
}
}
...
@@ -277,7 +277,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
...
@@ -277,7 +277,7 @@ static int64_t syncProcessLastWal(SSyncPeer *pPeer, char *wname, int64_t index)
// if bytes > 0, file is updated, or fversion is not reached but file still open, read again
// if bytes > 0, file is updated, or fversion is not reached but file still open, read again
once
=
1
;
once
=
1
;
offset
+=
bytes
;
offset
+=
bytes
;
s
Debug
(
"%s, continue retrieve last wal, bytes:%"
PRId64
" offset:%"
PRId64
" sver:%"
PRIu64
" fver:%"
PRIu64
,
pPeer
->
id
,
s
Info
(
"%s, continue retrieve last wal, bytes:%"
PRId64
" offset:%"
PRId64
" sver:%"
PRIu64
" fver:%"
PRIu64
,
pPeer
->
id
,
bytes
,
offset
,
pPeer
->
sversion
,
fversion
);
bytes
,
offset
,
pPeer
->
sversion
,
fversion
);
}
}
...
@@ -303,7 +303,7 @@ static int64_t syncRetrieveWal(SSyncPeer *pPeer) {
...
@@ -303,7 +303,7 @@ static int64_t syncRetrieveWal(SSyncPeer *pPeer) {
if
(
wname
[
0
]
==
0
)
{
// no wal file
if
(
wname
[
0
]
==
0
)
{
// no wal file
code
=
0
;
code
=
0
;
s
Debug
(
"%s, no wal file anymore"
,
pPeer
->
id
);
s
Info
(
"%s, no wal file anymore"
,
pPeer
->
id
);
break
;
break
;
}
}
...
@@ -320,12 +320,12 @@ static int64_t syncRetrieveWal(SSyncPeer *pPeer) {
...
@@ -320,12 +320,12 @@ static int64_t syncRetrieveWal(SSyncPeer *pPeer) {
struct
stat
fstat
;
struct
stat
fstat
;
if
(
stat
(
fname
,
&
fstat
)
<
0
)
{
if
(
stat
(
fname
,
&
fstat
)
<
0
)
{
code
=
-
1
;
code
=
-
1
;
s
Debug
(
"%s, failed to stat wal:%s for retrieve since %s, code:0x%"
PRIx64
,
pPeer
->
id
,
fname
,
strerror
(
errno
),
code
);
s
Info
(
"%s, failed to stat wal:%s for retrieve since %s, code:0x%"
PRIx64
,
pPeer
->
id
,
fname
,
strerror
(
errno
),
code
);
break
;
break
;
}
}
size
=
fstat
.
st_size
;
size
=
fstat
.
st_size
;
s
Debug
(
"%s, retrieve wal:%s size:%d"
,
pPeer
->
id
,
fname
,
size
);
s
Info
(
"%s, retrieve wal:%s size:%d"
,
pPeer
->
id
,
fname
,
size
);
int32_t
sfd
=
open
(
fname
,
O_RDONLY
|
O_BINARY
);
int32_t
sfd
=
open
(
fname
,
O_RDONLY
|
O_BINARY
);
if
(
sfd
<
0
)
{
if
(
sfd
<
0
)
{
...
@@ -374,7 +374,7 @@ static int32_t syncRetrieveFirstPkt(SSyncPeer *pPeer) {
...
@@ -374,7 +374,7 @@ static int32_t syncRetrieveFirstPkt(SSyncPeer *pPeer) {
sError
(
"%s, failed to send sync-data msg since %s, tranId:%u"
,
pPeer
->
id
,
strerror
(
errno
),
msg
.
tranId
);
sError
(
"%s, failed to send sync-data msg since %s, tranId:%u"
,
pPeer
->
id
,
strerror
(
errno
),
msg
.
tranId
);
return
-
1
;
return
-
1
;
}
}
s
Debug
(
"%s, send sync-data msg to peer, tranId:%u"
,
pPeer
->
id
,
msg
.
tranId
);
s
Info
(
"%s, send sync-data msg to peer, tranId:%u"
,
pPeer
->
id
,
msg
.
tranId
);
SSyncRsp
rsp
;
SSyncRsp
rsp
;
if
(
taosReadMsg
(
pPeer
->
syncFd
,
&
rsp
,
sizeof
(
SSyncRsp
))
!=
sizeof
(
SSyncRsp
))
{
if
(
taosReadMsg
(
pPeer
->
syncFd
,
&
rsp
,
sizeof
(
SSyncRsp
))
!=
sizeof
(
SSyncRsp
))
{
...
@@ -382,7 +382,7 @@ static int32_t syncRetrieveFirstPkt(SSyncPeer *pPeer) {
...
@@ -382,7 +382,7 @@ static int32_t syncRetrieveFirstPkt(SSyncPeer *pPeer) {
return
-
1
;
return
-
1
;
}
}
s
Debug
(
"%s, recv sync-data rsp from peer, tranId:%u rsp-tranId:%u"
,
pPeer
->
id
,
msg
.
tranId
,
rsp
.
tranId
);
s
Info
(
"%s, recv sync-data rsp from peer, tranId:%u rsp-tranId:%u"
,
pPeer
->
id
,
msg
.
tranId
,
rsp
.
tranId
);
return
0
;
return
0
;
}
}
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
1601a1e5
...
@@ -482,7 +482,7 @@ static int32_t vnodeProcessTsdbStatus(void *arg, int32_t status, int32_t eno) {
...
@@ -482,7 +482,7 @@ static int32_t vnodeProcessTsdbStatus(void *arg, int32_t status, int32_t eno) {
if
(
status
==
TSDB_STATUS_COMMIT_START
)
{
if
(
status
==
TSDB_STATUS_COMMIT_START
)
{
pVnode
->
isCommiting
=
1
;
pVnode
->
isCommiting
=
1
;
pVnode
->
cversion
=
pVnode
->
version
;
pVnode
->
cversion
=
pVnode
->
version
;
v
Debug
(
"vgId:%d, start commit, fver:%"
PRIu64
" vver:%"
PRIu64
,
pVnode
->
vgId
,
pVnode
->
fversion
,
pVnode
->
version
);
v
Info
(
"vgId:%d, start commit, fver:%"
PRIu64
" vver:%"
PRIu64
,
pVnode
->
vgId
,
pVnode
->
fversion
,
pVnode
->
version
);
if
(
!
vnodeInInitStatus
(
pVnode
))
{
if
(
!
vnodeInInitStatus
(
pVnode
))
{
return
walRenew
(
pVnode
->
wal
);
return
walRenew
(
pVnode
->
wal
);
}
}
...
@@ -493,7 +493,7 @@ static int32_t vnodeProcessTsdbStatus(void *arg, int32_t status, int32_t eno) {
...
@@ -493,7 +493,7 @@ static int32_t vnodeProcessTsdbStatus(void *arg, int32_t status, int32_t eno) {
pVnode
->
isCommiting
=
0
;
pVnode
->
isCommiting
=
0
;
pVnode
->
isFull
=
0
;
pVnode
->
isFull
=
0
;
pVnode
->
fversion
=
pVnode
->
cversion
;
pVnode
->
fversion
=
pVnode
->
cversion
;
v
Debug
(
"vgId:%d, commit over, fver:%"
PRIu64
" vver:%"
PRIu64
,
pVnode
->
vgId
,
pVnode
->
fversion
,
pVnode
->
version
);
v
Info
(
"vgId:%d, commit over, fver:%"
PRIu64
" vver:%"
PRIu64
,
pVnode
->
vgId
,
pVnode
->
fversion
,
pVnode
->
version
);
if
(
!
vnodeInInitStatus
(
pVnode
))
{
if
(
!
vnodeInInitStatus
(
pVnode
))
{
walRemoveOneOldFile
(
pVnode
->
wal
);
walRemoveOneOldFile
(
pVnode
->
wal
);
}
}
...
...
src/vnode/src/vnodeStatus.c
浏览文件 @
1601a1e5
...
@@ -109,6 +109,8 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) {
...
@@ -109,6 +109,8 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) {
taosMsleep
(
1
);
taosMsleep
(
1
);
}
}
vInfo
(
"vgId:%d, set to reset status"
,
pVnode
->
vgId
);
// release local resources only after cutting off outside connections
// release local resources only after cutting off outside connections
qQueryMgmtNotifyClosed
(
pVnode
->
qMgmt
);
qQueryMgmtNotifyClosed
(
pVnode
->
qMgmt
);
vnodeWaitReadCompleted
(
pVnode
);
vnodeWaitReadCompleted
(
pVnode
);
...
...
src/vnode/src/vnodeSync.c
浏览文件 @
1601a1e5
...
@@ -91,7 +91,7 @@ void vnodeStartSyncFile(int32_t vgId) {
...
@@ -91,7 +91,7 @@ void vnodeStartSyncFile(int32_t vgId) {
return
;
return
;
}
}
v
Debug
(
"vgId:%d, datafile will be synced"
,
vgId
);
v
Info
(
"vgId:%d, datafile will be synced"
,
vgId
);
vnodeSetResetStatus
(
pVnode
);
vnodeSetResetStatus
(
pVnode
);
vnodeRelease
(
pVnode
);
vnodeRelease
(
pVnode
);
...
@@ -147,7 +147,7 @@ int32_t vnodeGetVersion(int32_t vgId, uint64_t *fver, uint64_t *wver) {
...
@@ -147,7 +147,7 @@ int32_t vnodeGetVersion(int32_t vgId, uint64_t *fver, uint64_t *wver) {
int32_t
code
=
0
;
int32_t
code
=
0
;
if
(
pVnode
->
isCommiting
)
{
if
(
pVnode
->
isCommiting
)
{
v
Debug
(
"vgId:%d, vnode is commiting while get version"
,
vgId
);
v
Info
(
"vgId:%d, vnode is commiting while get version"
,
vgId
);
code
=
-
1
;
code
=
-
1
;
}
else
{
}
else
{
*
fver
=
pVnode
->
fversion
;
*
fver
=
pVnode
->
fversion
;
...
@@ -168,7 +168,7 @@ int32_t vnodeResetVersion(int32_t vgId, uint64_t fver) {
...
@@ -168,7 +168,7 @@ int32_t vnodeResetVersion(int32_t vgId, uint64_t fver) {
pVnode
->
fversion
=
fver
;
pVnode
->
fversion
=
fver
;
pVnode
->
version
=
fver
;
pVnode
->
version
=
fver
;
walResetVersion
(
pVnode
->
wal
,
fver
);
walResetVersion
(
pVnode
->
wal
,
fver
);
v
Debug
(
"vgId:%d, version reset to %"
PRIu64
,
vgId
,
fver
);
v
Info
(
"vgId:%d, version reset to %"
PRIu64
,
vgId
,
fver
);
vnodeRelease
(
pVnode
);
vnodeRelease
(
pVnode
);
return
0
;
return
0
;
...
...
src/wal/src/walWrite.c
浏览文件 @
1601a1e5
...
@@ -455,7 +455,7 @@ uint64_t walGetVersion(twalh param) {
...
@@ -455,7 +455,7 @@ uint64_t walGetVersion(twalh param) {
void
walResetVersion
(
twalh
param
,
uint64_t
newVer
)
{
void
walResetVersion
(
twalh
param
,
uint64_t
newVer
)
{
SWal
*
pWal
=
param
;
SWal
*
pWal
=
param
;
if
(
pWal
==
0
)
return
;
if
(
pWal
==
0
)
return
;
w
Debug
(
"vgId:%d, version reset from %"
PRIu64
" to %"
PRIu64
,
pWal
->
vgId
,
pWal
->
version
,
newVer
);
w
Info
(
"vgId:%d, version reset from %"
PRIu64
" to %"
PRIu64
,
pWal
->
vgId
,
pWal
->
version
,
newVer
);
pWal
->
version
=
newVer
;
pWal
->
version
=
newVer
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录