Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bd31c9da
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看板
未验证
提交
bd31c9da
编写于
8月 01, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
8月 01, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15657 from taosdata/fix/dnode
fix: write snapshot after apply queue is empty
上级
de582a92
2b2e1c79
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
181 addition
and
159 deletion
+181
-159
source/client/src/tmq.c
source/client/src/tmq.c
+2
-2
source/dnode/vnode/src/meta/metaSnapshot.c
source/dnode/vnode/src/meta/metaSnapshot.c
+7
-7
source/dnode/vnode/src/sma/smaEnv.c
source/dnode/vnode/src/sma/smaEnv.c
+1
-1
source/dnode/vnode/src/sma/smaSnapshot.c
source/dnode/vnode/src/sma/smaSnapshot.c
+19
-19
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-2
source/dnode/vnode/src/tq/tqPush.c
source/dnode/vnode/src/tq/tqPush.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+21
-21
source/dnode/vnode/src/tsdb/tsdbFS.c
source/dnode/vnode/src/tsdb/tsdbFS.c
+8
-8
source/dnode/vnode/src/tsdb/tsdbFile.c
source/dnode/vnode/src/tsdb/tsdbFile.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbMemTable.c
source/dnode/vnode/src/tsdb/tsdbMemTable.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+2
-2
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+24
-24
source/dnode/vnode/src/tsdb/tsdbRetention.c
source/dnode/vnode/src/tsdb/tsdbRetention.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+30
-30
source/dnode/vnode/src/vnd/vnodeSnapshot.c
source/dnode/vnode/src/vnd/vnodeSnapshot.c
+11
-11
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+27
-6
source/libs/sync/src/syncIndexMgr.c
source/libs/sync/src/syncIndexMgr.c
+2
-2
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+4
-4
source/libs/sync/src/syncRaftEntry.c
source/libs/sync/src/syncRaftEntry.c
+4
-4
source/libs/sync/src/syncRaftLog.c
source/libs/sync/src/syncRaftLog.c
+4
-4
source/libs/sync/src/syncReplication.c
source/libs/sync/src/syncReplication.c
+2
-2
source/libs/wal/src/walRead.c
source/libs/wal/src/walRead.c
+7
-6
未找到文件。
source/client/src/tmq.c
浏览文件 @
bd31c9da
...
...
@@ -1733,7 +1733,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) {
int32_t
consumerEpoch
=
atomic_load_32
(
&
tmq
->
epoch
);
if
(
pollRspWrapper
->
dataRsp
.
head
.
epoch
==
consumerEpoch
)
{
SMqClientVg
*
pVg
=
pollRspWrapper
->
vgHandle
;
/*printf("vgId:%d offset %" PRId64 " up to %" PRId64 "\n", pVg->vgId, pVg->currentOffset,
/*printf("vgId:%d
,
offset %" PRId64 " up to %" PRId64 "\n", pVg->vgId, pVg->currentOffset,
* rspMsg->msg.rspOffset);*/
pVg
->
currentOffsetNew
=
pollRspWrapper
->
dataRsp
.
rspOffset
;
atomic_store_32
(
&
pVg
->
vgStatus
,
TMQ_VG_STATUS__IDLE
);
...
...
@@ -1756,7 +1756,7 @@ void* tmqHandleAllRsp(tmq_t* tmq, int64_t timeout, bool pollIfReset) {
int32_t
consumerEpoch
=
atomic_load_32
(
&
tmq
->
epoch
);
if
(
pollRspWrapper
->
metaRsp
.
head
.
epoch
==
consumerEpoch
)
{
SMqClientVg
*
pVg
=
pollRspWrapper
->
vgHandle
;
/*printf("vgId:%d offset %" PRId64 " up to %" PRId64 "\n", pVg->vgId, pVg->currentOffset,
/*printf("vgId:%d
,
offset %" PRId64 " up to %" PRId64 "\n", pVg->vgId, pVg->currentOffset,
* rspMsg->msg.rspOffset);*/
pVg
->
currentOffsetNew
.
version
=
pollRspWrapper
->
metaRsp
.
rspOffset
;
pVg
->
currentOffsetNew
.
type
=
TMQ_OFFSET__LOG
;
...
...
source/dnode/vnode/src/meta/metaSnapshot.c
浏览文件 @
bd31c9da
...
...
@@ -51,13 +51,13 @@ int32_t metaSnapReaderOpen(SMeta* pMeta, int64_t sver, int64_t ever, SMetaSnapRe
goto
_err
;
}
metaInfo
(
"vgId:%d vnode snapshot meta reader opened"
,
TD_VID
(
pMeta
->
pVnode
));
metaInfo
(
"vgId:%d
,
vnode snapshot meta reader opened"
,
TD_VID
(
pMeta
->
pVnode
));
*
ppReader
=
pReader
;
return
code
;
_err:
metaError
(
"vgId:%d vnode snapshot meta reader open failed since %s"
,
TD_VID
(
pMeta
->
pVnode
),
tstrerror
(
code
));
metaError
(
"vgId:%d
,
vnode snapshot meta reader open failed since %s"
,
TD_VID
(
pMeta
->
pVnode
),
tstrerror
(
code
));
*
ppReader
=
NULL
;
return
code
;
}
...
...
@@ -113,14 +113,14 @@ int32_t metaSnapRead(SMetaSnapReader* pReader, uint8_t** ppData) {
pHdr
->
size
=
nData
;
memcpy
(
pHdr
->
data
,
pData
,
nData
);
metaInfo
(
"vgId:%d vnode snapshot meta read data, version:%"
PRId64
" uid:%"
PRId64
" nData:%d"
,
metaInfo
(
"vgId:%d
,
vnode snapshot meta read data, version:%"
PRId64
" uid:%"
PRId64
" nData:%d"
,
TD_VID
(
pReader
->
pMeta
->
pVnode
),
key
.
version
,
key
.
uid
,
nData
);
_exit:
return
code
;
_err:
metaError
(
"vgId:%d vnode snapshot meta read data failed since %s"
,
TD_VID
(
pReader
->
pMeta
->
pVnode
),
tstrerror
(
code
));
metaError
(
"vgId:%d
,
vnode snapshot meta read data failed since %s"
,
TD_VID
(
pReader
->
pMeta
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -151,7 +151,7 @@ int32_t metaSnapWriterOpen(SMeta* pMeta, int64_t sver, int64_t ever, SMetaSnapWr
return
code
;
_err:
metaError
(
"vgId:%d meta snapshot writer open failed since %s"
,
TD_VID
(
pMeta
->
pVnode
),
tstrerror
(
code
));
metaError
(
"vgId:%d
,
meta snapshot writer open failed since %s"
,
TD_VID
(
pMeta
->
pVnode
),
tstrerror
(
code
));
*
ppWriter
=
NULL
;
return
code
;
}
...
...
@@ -172,7 +172,7 @@ int32_t metaSnapWriterClose(SMetaSnapWriter** ppWriter, int8_t rollback) {
return
code
;
_err:
metaError
(
"vgId:%d meta snapshot writer close failed since %s"
,
TD_VID
(
pWriter
->
pMeta
->
pVnode
),
tstrerror
(
code
));
metaError
(
"vgId:%d
,
meta snapshot writer close failed since %s"
,
TD_VID
(
pWriter
->
pMeta
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -192,6 +192,6 @@ int32_t metaSnapWrite(SMetaSnapWriter* pWriter, uint8_t* pData, uint32_t nData)
return
code
;
_err:
metaError
(
"vgId:%d vnode snapshot meta write failed since %s"
,
TD_VID
(
pMeta
->
pVnode
),
tstrerror
(
code
));
metaError
(
"vgId:%d
,
vnode snapshot meta write failed since %s"
,
TD_VID
(
pMeta
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
source/dnode/vnode/src/sma/smaEnv.c
浏览文件 @
bd31c9da
...
...
@@ -373,7 +373,7 @@ int32_t tdCheckAndInitSmaEnv(SSma *pSma, int8_t smaType) {
}
break
;
default:
smaError
(
"vgId:%d undefined smaType:%"
,
SMA_VID
(
pSma
),
smaType
);
smaError
(
"vgId:%d
,
undefined smaType:%"
,
SMA_VID
(
pSma
),
smaType
);
return
TSDB_CODE_FAILED
;
}
...
...
source/dnode/vnode/src/sma/smaSnapshot.c
浏览文件 @
bd31c9da
...
...
@@ -57,10 +57,10 @@ int32_t rsmaSnapReaderOpen(SSma* pSma, int64_t sver, int64_t ever, SRsmaSnapRead
}
}
*
ppReader
=
pReader
;
smaInfo
(
"vgId:%d vnode snapshot rsma reader opened succeed"
,
SMA_VID
(
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma reader opened succeed"
,
SMA_VID
(
pSma
));
return
TSDB_CODE_SUCCESS
;
_err:
smaError
(
"vgId:%d vnode snapshot rsma reader opened failed since %s"
,
SMA_VID
(
pSma
),
tstrerror
(
code
));
smaError
(
"vgId:%d
,
vnode snapshot rsma reader opened failed since %s"
,
SMA_VID
(
pSma
),
tstrerror
(
code
));
return
TSDB_CODE_FAILED
;
}
...
...
@@ -69,11 +69,11 @@ static int32_t rsmaSnapReadQTaskInfo(SRsmaSnapReader* pReader, uint8_t** ppData)
SSma
*
pSma
=
pReader
->
pSma
;
_exit:
smaInfo
(
"vgId:%d vnode snapshot rsma read qtaskinfo succeed"
,
SMA_VID
(
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma read qtaskinfo succeed"
,
SMA_VID
(
pSma
));
return
code
;
_err:
smaError
(
"vgId:%d vnode snapshot rsma read qtaskinfo failed since %s"
,
SMA_VID
(
pSma
),
tstrerror
(
code
));
smaError
(
"vgId:%d
,
vnode snapshot rsma read qtaskinfo failed since %s"
,
SMA_VID
(
pSma
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -82,7 +82,7 @@ int32_t rsmaSnapRead(SRsmaSnapReader* pReader, uint8_t** ppData) {
*
ppData
=
NULL
;
smaInfo
(
"vgId:%d vnode snapshot rsma read entry"
,
SMA_VID
(
pReader
->
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma read entry"
,
SMA_VID
(
pReader
->
pSma
));
// read rsma1/rsma2 file
for
(
int32_t
i
=
0
;
i
<
TSDB_RETENTION_L2
;
++
i
)
{
STsdbSnapReader
*
pTsdbSnapReader
=
pReader
->
pDataReader
[
i
];
...
...
@@ -90,7 +90,7 @@ int32_t rsmaSnapRead(SRsmaSnapReader* pReader, uint8_t** ppData) {
continue
;
}
if
(
!
pReader
->
rsmaDataDone
[
i
])
{
smaInfo
(
"vgId:%d vnode snapshot rsma read level %d not done"
,
SMA_VID
(
pReader
->
pSma
),
i
);
smaInfo
(
"vgId:%d
,
vnode snapshot rsma read level %d not done"
,
SMA_VID
(
pReader
->
pSma
),
i
);
code
=
tsdbSnapRead
(
pTsdbSnapReader
,
ppData
);
if
(
code
)
{
goto
_err
;
...
...
@@ -102,7 +102,7 @@ int32_t rsmaSnapRead(SRsmaSnapReader* pReader, uint8_t** ppData) {
}
}
}
else
{
smaInfo
(
"vgId:%d vnode snapshot rsma read level %d is done"
,
SMA_VID
(
pReader
->
pSma
),
i
);
smaInfo
(
"vgId:%d
,
vnode snapshot rsma read level %d is done"
,
SMA_VID
(
pReader
->
pSma
),
i
);
}
}
...
...
@@ -121,11 +121,11 @@ int32_t rsmaSnapRead(SRsmaSnapReader* pReader, uint8_t** ppData) {
}
_exit:
smaInfo
(
"vgId:%d vnode snapshot rsma read succeed"
,
SMA_VID
(
pReader
->
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma read succeed"
,
SMA_VID
(
pReader
->
pSma
));
return
code
;
_err:
smaError
(
"vgId:%d vnode snapshot rsma read failed since %s"
,
SMA_VID
(
pReader
->
pSma
),
tstrerror
(
code
));
smaError
(
"vgId:%d
,
vnode snapshot rsma read failed since %s"
,
SMA_VID
(
pReader
->
pSma
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -141,11 +141,11 @@ int32_t rsmaSnapReaderClose(SRsmaSnapReader** ppReader) {
if
(
pReader
->
pQTaskFReader
)
{
// TODO: close for qtaskinfo
smaInfo
(
"vgId:%d vnode snapshot rsma reader closed for qTaskInfo"
,
SMA_VID
(
pReader
->
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma reader closed for qTaskInfo"
,
SMA_VID
(
pReader
->
pSma
));
}
smaInfo
(
"vgId:%d vnode snapshot rsma reader closed"
,
SMA_VID
(
pReader
->
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma reader closed"
,
SMA_VID
(
pReader
->
pSma
));
taosMemoryFreeClear
(
*
ppReader
);
return
code
;
...
...
@@ -196,11 +196,11 @@ int32_t rsmaSnapWriterOpen(SSma* pSma, int64_t sver, int64_t ever, SRsmaSnapWrit
*
ppWriter
=
pWriter
;
smaInfo
(
"vgId:%d rsma snapshot writer open succeed"
,
TD_VID
(
pSma
->
pVnode
));
smaInfo
(
"vgId:%d
,
rsma snapshot writer open succeed"
,
TD_VID
(
pSma
->
pVnode
));
return
code
;
_err:
smaError
(
"vgId:%d rsma snapshot writer open failed since %s"
,
TD_VID
(
pSma
->
pVnode
),
tstrerror
(
code
));
smaError
(
"vgId:%d
,
rsma snapshot writer open failed since %s"
,
TD_VID
(
pSma
->
pVnode
),
tstrerror
(
code
));
*
ppWriter
=
NULL
;
return
code
;
}
...
...
@@ -222,13 +222,13 @@ int32_t rsmaSnapWriterClose(SRsmaSnapWriter** ppWriter, int8_t rollback) {
}
}
smaInfo
(
"vgId:%d vnode snapshot rsma writer close succeed"
,
SMA_VID
(
pWriter
->
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma writer close succeed"
,
SMA_VID
(
pWriter
->
pSma
));
taosMemoryFree
(
pWriter
);
*
ppWriter
=
NULL
;
return
code
;
_err:
smaError
(
"vgId:%d vnode snapshot rsma writer close failed since %s"
,
SMA_VID
(
pWriter
->
pSma
),
tstrerror
(
code
));
smaError
(
"vgId:%d
,
vnode snapshot rsma writer close failed since %s"
,
SMA_VID
(
pWriter
->
pSma
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -251,11 +251,11 @@ int32_t rsmaSnapWrite(SRsmaSnapWriter* pWriter, uint8_t* pData, uint32_t nData)
if
(
code
<
0
)
goto
_err
;
_exit:
smaInfo
(
"vgId:%d rsma snapshot write for data type %"
PRIi8
" succeed"
,
SMA_VID
(
pWriter
->
pSma
),
pHdr
->
type
);
smaInfo
(
"vgId:%d
,
rsma snapshot write for data type %"
PRIi8
" succeed"
,
SMA_VID
(
pWriter
->
pSma
),
pHdr
->
type
);
return
code
;
_err:
smaError
(
"vgId:%d rsma snapshot write for data type %"
PRIi8
" failed since %s"
,
SMA_VID
(
pWriter
->
pSma
),
pHdr
->
type
,
smaError
(
"vgId:%d
,
rsma snapshot write for data type %"
PRIi8
" failed since %s"
,
SMA_VID
(
pWriter
->
pSma
),
pHdr
->
type
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -280,11 +280,11 @@ static int32_t rsmaSnapWriteQTaskInfo(SRsmaSnapWriter* pWriter, uint8_t* pData,
// code = tsdbDelFWriterOpen(&pWriter->pDelFWriter, &delFile, pTsdb);
// if (code) goto _err;
}
smaInfo
(
"vgId:%d vnode snapshot rsma write qtaskinfo succeed"
,
SMA_VID
(
pWriter
->
pSma
));
smaInfo
(
"vgId:%d
,
vnode snapshot rsma write qtaskinfo succeed"
,
SMA_VID
(
pWriter
->
pSma
));
_exit:
return
code
;
_err:
smaError
(
"vgId:%d vnode snapshot rsma write qtaskinfo failed since %s"
,
SMA_VID
(
pWriter
->
pSma
),
tstrerror
(
code
));
smaError
(
"vgId:%d
,
vnode snapshot rsma write qtaskinfo failed since %s"
,
SMA_VID
(
pWriter
->
pSma
),
tstrerror
(
code
));
return
code
;
}
source/dnode/vnode/src/tq/tq.c
浏览文件 @
bd31c9da
...
...
@@ -121,7 +121,7 @@ int32_t tqSendMetaPollRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq,
};
tmsgSendRsp
(
&
resp
);
tqDebug
(
"vgId:%d from consumer:%"
PRId64
", (epoch %d) send rsp, res msg type %d, reqOffset:%"
PRId64
tqDebug
(
"vgId:%d
,
from consumer:%"
PRId64
", (epoch %d) send rsp, res msg type %d, reqOffset:%"
PRId64
", rspOffset:%"
PRId64
,
TD_VID
(
pTq
->
pVnode
),
pReq
->
consumerId
,
pReq
->
epoch
,
pRsp
->
resMsgType
,
pRsp
->
reqOffset
,
pRsp
->
rspOffset
);
...
...
@@ -181,7 +181,7 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con
char
buf2
[
80
]
=
{
0
};
tFormatOffset
(
buf1
,
80
,
&
pRsp
->
reqOffset
);
tFormatOffset
(
buf2
,
80
,
&
pRsp
->
rspOffset
);
tqDebug
(
"vgId:%d from consumer:%"
PRId64
", (epoch %d) send rsp, block num: %d, reqOffset:%s, rspOffset:%s"
,
tqDebug
(
"vgId:%d
,
from consumer:%"
PRId64
", (epoch %d) send rsp, block num: %d, reqOffset:%s, rspOffset:%s"
,
TD_VID
(
pTq
->
pVnode
),
pReq
->
consumerId
,
pReq
->
epoch
,
pRsp
->
blockNum
,
buf1
,
buf2
);
return
0
;
...
...
source/dnode/vnode/src/tq/tqPush.c
浏览文件 @
bd31c9da
...
...
@@ -223,7 +223,7 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_
memset(&pHandle->pushHandle.rpcInfo, 0, sizeof(SRpcHandleInfo));
taosWUnLockLatch(&pHandle->pushHandle.lock);
tqDebug("vgId:%d offset %" PRId64 " from consumer:%" PRId64 ", (epoch %d) send rsp, block num: %d, reqOffset:%" PRId64 ", rspOffset:%" PRId64,
tqDebug("vgId:%d
,
offset %" PRId64 " from consumer:%" PRId64 ", (epoch %d) send rsp, block num: %d, reqOffset:%" PRId64 ", rspOffset:%" PRId64,
TD_VID(pTq->pVnode), fetchOffset, pHandle->pushHandle.consumerId, pHandle->pushHandle.epoch, rsp.blockNum,
rsp.reqOffset, rsp.rspOffset);
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
bd31c9da
...
...
@@ -92,7 +92,7 @@ int32_t tsdbBegin(STsdb *pTsdb) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb begin failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb begin failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -175,11 +175,11 @@ static int32_t tsdbCommitDelStart(SCommitter *pCommitter) {
if
(
code
)
goto
_err
;
_exit:
tsdbDebug
(
"vgId:%d commit del start"
,
TD_VID
(
pTsdb
->
pVnode
));
tsdbDebug
(
"vgId:%d
,
commit del start"
,
TD_VID
(
pTsdb
->
pVnode
));
return
code
;
_err:
tsdbError
(
"vgId:%d commit del start failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit del start failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -235,7 +235,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d commit table del failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit table del failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -267,7 +267,7 @@ static int32_t tsdbCommitDelEnd(SCommitter *pCommitter) {
return
code
;
_err:
tsdbError
(
"vgId:%d commit del end failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit del end failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -331,7 +331,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d commit file data start failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit file data start failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -509,7 +509,7 @@ static int32_t tsdbMergeTableData(SCommitter *pCommitter, STbDataIter *pIter, SB
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb merge block and mem failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb merge block and mem failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -571,7 +571,7 @@ static int32_t tsdbCommitTableMemData(SCommitter *pCommitter, STbDataIter *pIter
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb commit table mem data failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb commit table mem data failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -594,7 +594,7 @@ static int32_t tsdbCommitTableDiskData(SCommitter *pCommitter, SBlock *pBlock, S
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb commit table disk data failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb commit table disk data failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -614,7 +614,7 @@ static int32_t tsdbCommitTableDataEnd(SCommitter *pCommitter, int64_t suid, int6
return
code
;
_err:
tsdbError
(
"vgId:%d commit table data end failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit table data end failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -689,7 +689,7 @@ static int32_t tsdbMergeAsSubBlock(SCommitter *pCommitter, STbDataIter *pIter, S
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb merge as subblock failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb merge as subblock failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -854,7 +854,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb commit table data failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb commit table data failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -886,7 +886,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d commit file data end failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit file data end failed since %s"
,
TD_VID
(
pCommitter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -962,7 +962,7 @@ static int32_t tsdbCommitFileData(SCommitter *pCommitter) {
return
code
;
_err:
tsdbError
(
"vgId:%d commit file data failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit file data failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbDataFReaderClose
(
&
pCommitter
->
dReader
.
pReader
);
tsdbDataFWriterClose
(
&
pCommitter
->
dWriter
.
pWriter
,
0
);
return
code
;
...
...
@@ -994,7 +994,7 @@ static int32_t tsdbStartCommit(STsdb *pTsdb, SCommitter *pCommitter) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb start commit failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb start commit failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1060,12 +1060,12 @@ static int32_t tsdbCommitData(SCommitter *pCommitter) {
tsdbCommitDataEnd
(
pCommitter
);
_exit:
tsdbDebug
(
"vgId:%d commit data done, nRow:%"
PRId64
,
TD_VID
(
pTsdb
->
pVnode
),
pMemTable
->
nRow
);
tsdbDebug
(
"vgId:%d
,
commit data done, nRow:%"
PRId64
,
TD_VID
(
pTsdb
->
pVnode
),
pMemTable
->
nRow
);
return
code
;
_err:
tsdbCommitDataEnd
(
pCommitter
);
tsdbError
(
"vgId:%d commit data failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit data failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1149,11 +1149,11 @@ static int32_t tsdbCommitDel(SCommitter *pCommitter) {
}
_exit:
tsdbDebug
(
"vgId:%d commit del done, nDel:%"
PRId64
,
TD_VID
(
pTsdb
->
pVnode
),
pMemTable
->
nDel
);
tsdbDebug
(
"vgId:%d
,
commit del done, nDel:%"
PRId64
,
TD_VID
(
pTsdb
->
pVnode
),
pMemTable
->
nDel
);
return
code
;
_err:
tsdbError
(
"vgId:%d commit del failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
commit del failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1185,10 +1185,10 @@ static int32_t tsdbEndCommit(SCommitter *pCommitter, int32_t eno) {
tsdbUnrefMemTable
(
pMemTable
);
tsdbFSDestroy
(
&
pCommitter
->
fs
);
tsdbInfo
(
"vgId:%d tsdb end commit"
,
TD_VID
(
pTsdb
->
pVnode
));
tsdbInfo
(
"vgId:%d
,
tsdb end commit"
,
TD_VID
(
pTsdb
->
pVnode
));
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb end commit failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb end commit failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
source/dnode/vnode/src/tsdb/tsdbFS.c
浏览文件 @
bd31c9da
...
...
@@ -78,7 +78,7 @@ static int32_t tsdbGnrtCurrent(STsdb *pTsdb, STsdbFS *pFS, char *fname) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb gnrt current failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb gnrt current failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
if
(
pData
)
taosMemoryFree
(
pData
);
return
code
;
}
...
...
@@ -152,7 +152,7 @@ _err:
// return code;
// _err:
// tsdbError("vgId:%d tsdb apply disk file set change failed since %s", TD_VID(pFS->pTsdb->pVnode), tstrerror(code));
// tsdbError("vgId:%d
,
tsdb apply disk file set change failed since %s", TD_VID(pFS->pTsdb->pVnode), tstrerror(code));
// return code;
// }
...
...
@@ -181,7 +181,7 @@ _err:
// return code;
// _err:
// tsdbError("vgId:%d tsdb apply del file change failed since %s", TD_VID(pFS->pTsdb->pVnode), tstrerror(code));
// tsdbError("vgId:%d
,
tsdb apply del file change failed since %s", TD_VID(pFS->pTsdb->pVnode), tstrerror(code));
// return code;
// }
...
...
@@ -241,7 +241,7 @@ _err:
// return code;
// _err:
// tsdbError("vgId:%d tsdb fs apply disk change failed sicne %s", TD_VID(pFS->pTsdb->pVnode), tstrerror(code));
// tsdbError("vgId:%d
,
tsdb fs apply disk change failed sicne %s", TD_VID(pFS->pTsdb->pVnode), tstrerror(code));
// return code;
// }
...
...
@@ -342,7 +342,7 @@ static int32_t tsdbScanAndTryFixFS(STsdb *pTsdb) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb scan and try fix fs failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb scan and try fix fs failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -509,7 +509,7 @@ int32_t tsdbFSOpen(STsdb *pTsdb) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb fs open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb fs open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -734,7 +734,7 @@ int32_t tsdbFSCommit1(STsdb *pTsdb, STsdbFS *pFSNew) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb fs commit phase 1 failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb fs commit phase 1 failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -980,7 +980,7 @@ int32_t tsdbFSCommit2(STsdb *pTsdb, STsdbFS *pFSNew) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb fs commit phase 2 failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb fs commit phase 2 failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbFile.c
浏览文件 @
bd31c9da
...
...
@@ -176,7 +176,7 @@ int32_t tsdbDFileRollback(STsdb *pTsdb, SDFileSet *pSet, EDataFileT ftype) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb rollback file failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb rollback file failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbMemTable.c
浏览文件 @
bd31c9da
...
...
@@ -374,7 +374,7 @@ static int32_t tsdbGetOrCreateTbData(SMemTable *pMemTable, tb_uid_t suid, tb_uid
p
=
taosArrayInsert
(
pMemTable
->
aTbData
,
idx
,
&
pTbData
);
taosWUnLockLatch
(
&
pMemTable
->
latch
);
tsdbDebug
(
"vgId:%d add table data %p at idx:%d"
,
TD_VID
(
pMemTable
->
pTsdb
->
pVnode
),
pTbData
,
idx
);
tsdbDebug
(
"vgId:%d
,
add table data %p at idx:%d"
,
TD_VID
(
pMemTable
->
pTsdb
->
pVnode
),
pTbData
,
idx
);
if
(
p
==
NULL
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
bd31c9da
...
...
@@ -3118,7 +3118,7 @@ int32_t tsdbTakeReadSnap(STsdb* pTsdb, STsdbReadSnap** ppSnap) {
goto
_exit
;
}
tsdbTrace
(
"vgId:%d take read snapshot"
,
TD_VID
(
pTsdb
->
pVnode
));
tsdbTrace
(
"vgId:%d
,
take read snapshot"
,
TD_VID
(
pTsdb
->
pVnode
));
_exit:
return
code
;
}
...
...
@@ -3137,5 +3137,5 @@ void tsdbUntakeReadSnap(STsdb* pTsdb, STsdbReadSnap* pSnap) {
taosMemoryFree
(
pSnap
);
}
tsdbTrace
(
"vgId:%d untake read snapshot"
,
TD_VID
(
pTsdb
->
pVnode
));
tsdbTrace
(
"vgId:%d
,
untake read snapshot"
,
TD_VID
(
pTsdb
->
pVnode
));
}
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
浏览文件 @
bd31c9da
...
...
@@ -55,7 +55,7 @@ int32_t tsdbDelFWriterOpen(SDelFWriter **ppWriter, SDelFile *pFile, STsdb *pTsdb
return
code
;
_err:
tsdbError
(
"vgId:%d failed to open del file writer since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
failed to open del file writer since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
*
ppWriter
=
NULL
;
return
code
;
}
...
...
@@ -80,7 +80,7 @@ int32_t tsdbDelFWriterClose(SDelFWriter **ppWriter, int8_t sync) {
return
code
;
_err:
tsdbError
(
"vgId:%d failed to close del file writer since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
failed to close del file writer since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -133,7 +133,7 @@ int32_t tsdbWriteDelData(SDelFWriter *pWriter, SArray *aDelData, uint8_t **ppBuf
return
code
;
_err:
tsdbError
(
"vgId:%d failed to write del data since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
failed to write del data since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -184,7 +184,7 @@ int32_t tsdbWriteDelIdx(SDelFWriter *pWriter, SArray *aDelIdx, uint8_t **ppBuf)
return
code
;
_err:
tsdbError
(
"vgId:%d write del idx failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
write del idx failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -216,7 +216,7 @@ int32_t tsdbUpdateDelFileHdr(SDelFWriter *pWriter) {
return
code
;
_err:
tsdbError
(
"vgId:%d update del file hdr failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
update del file hdr failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -283,7 +283,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d del file reader open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
del file reader open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
*
ppReader
=
NULL
;
return
code
;
}
...
...
@@ -365,7 +365,7 @@ int32_t tsdbReadDelData(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData
return
code
;
_err:
tsdbError
(
"vgId:%d read del data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
read del data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -428,7 +428,7 @@ int32_t tsdbReadDelIdx(SDelFReader *pReader, SArray *aDelIdx, uint8_t **ppBuf) {
return
code
;
_err:
tsdbError
(
"vgId:%d read del idx failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
read del idx failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -494,7 +494,7 @@ int32_t tsdbDataFReaderOpen(SDataFReader **ppReader, STsdb *pTsdb, SDFileSet *pS
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb data file reader open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb data file reader open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
*
ppReader
=
NULL
;
return
code
;
}
...
...
@@ -530,7 +530,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d data file reader close failed since %s"
,
TD_VID
((
*
ppReader
)
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
data file reader close failed since %s"
,
TD_VID
((
*
ppReader
)
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -592,7 +592,7 @@ int32_t tsdbReadBlockIdx(SDataFReader *pReader, SArray *aBlockIdx, uint8_t **ppB
return
code
;
_err:
tsdbError
(
"vgId:%d read block idx failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
read block idx failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -653,7 +653,7 @@ int32_t tsdbReadBlock(SDataFReader *pReader, SBlockIdx *pBlockIdx, SMapData *mBl
return
code
;
_err:
tsdbError
(
"vgId:%d read block failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
read block failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -1001,7 +1001,7 @@ int32_t tsdbReadColData(SDataFReader *pReader, SBlockIdx *pBlockIdx, SBlock *pBl
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb read col data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb read col data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf1
);
tFree
(
pBuf2
);
return
code
;
...
...
@@ -1084,7 +1084,7 @@ static int32_t tsdbReadSubBlockData(SDataFReader *pReader, SBlockIdx *pBlockIdx,
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb read sub block data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb read sub block data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
taosArrayDestroy
(
aBlockCol
);
return
code
;
}
...
...
@@ -1149,7 +1149,7 @@ int32_t tsdbReadBlockData(SDataFReader *pReader, SBlockIdx *pBlockIdx, SBlock *p
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb read block data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb read block data failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
if
(
pBuf1
)
tFree
(
pBuf1
);
if
(
pBuf2
)
tFree
(
pBuf2
);
return
code
;
...
...
@@ -1205,7 +1205,7 @@ int32_t tsdbReadBlockSma(SDataFReader *pReader, SBlock *pBlock, SArray *aColumnD
return
code
;
_err:
tsdbError
(
"vgId:%d read block sma failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
read block sma failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -1350,7 +1350,7 @@ int32_t tsdbDataFWriterOpen(SDataFWriter **ppWriter, STsdb *pTsdb, SDFileSet *pS
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb data file writer open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb data file writer open failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
*
ppWriter
=
NULL
;
return
code
;
}
...
...
@@ -1409,7 +1409,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d data file writer close failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
data file writer close failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1489,7 +1489,7 @@ int32_t tsdbUpdateDFileSetHeader(SDataFWriter *pWriter) {
return
code
;
_err:
tsdbError
(
"vgId:%d update DFileSet header failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
update DFileSet header failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1538,7 +1538,7 @@ int32_t tsdbWriteBlockIdx(SDataFWriter *pWriter, SArray *aBlockIdx, uint8_t **pp
return
code
;
_err:
tsdbError
(
"vgId:%d write block idx failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
write block idx failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf
);
return
code
;
}
...
...
@@ -1583,13 +1583,13 @@ int32_t tsdbWriteBlock(SDataFWriter *pWriter, SMapData *mBlock, uint8_t **ppBuf,
pHeadFile
->
size
+=
size
;
tFree
(
pBuf
);
tsdbTrace
(
"vgId:%d write block, offset:%"
PRId64
" size:%"
PRId64
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pBlockIdx
->
offset
,
tsdbTrace
(
"vgId:%d
,
write block, offset:%"
PRId64
" size:%"
PRId64
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pBlockIdx
->
offset
,
pBlockIdx
->
size
);
return
code
;
_err:
tFree
(
pBuf
);
tsdbError
(
"vgId:%d write block failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
write block failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1958,7 +1958,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d write block data failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
write block data failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tstrerror
(
code
));
tFree
(
pBuf1
);
tFree
(
pBuf2
);
taosArrayDestroy
(
aBlockCol
);
...
...
@@ -2073,6 +2073,6 @@ int32_t tsdbDFileSetCopy(STsdb *pTsdb, SDFileSet *pSetFrom, SDFileSet *pSetTo) {
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb DFileSet copy failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb DFileSet copy failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
\ No newline at end of file
source/dnode/vnode/src/tsdb/tsdbRetention.c
浏览文件 @
bd31c9da
...
...
@@ -106,7 +106,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb do retention failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
tsdbError
(
"vgId:%d
,
tsdb do retention failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
tstrerror
(
code
));
ASSERT
(
0
);
// tsdbFSRollback(pTsdb->pFS);
return
code
;
...
...
source/dnode/vnode/src/tsdb/tsdbSnapshot.c
浏览文件 @
bd31c9da
...
...
@@ -63,7 +63,7 @@ static int32_t tsdbSnapReadData(STsdbSnapReader* pReader, uint8_t** ppData) {
pReader
->
iBlockIdx
=
0
;
pReader
->
pBlockIdx
=
NULL
;
tsdbInfo
(
"vgId:%d vnode snapshot tsdb open data file to read for %s, fid:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb open data file to read for %s, fid:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
pReader
->
fid
);
}
...
...
@@ -141,7 +141,7 @@ static int32_t tsdbSnapReadData(STsdbSnapReader* pReader, uint8_t** ppData) {
tPutBlockData
((
uint8_t
*
)(
&
pId
[
1
]),
&
pReader
->
nBlockData
);
tsdbInfo
(
"vgId:%d vnode snapshot read data for %s, fid:%d suid:%"
PRId64
" uid:%"
PRId64
tsdbInfo
(
"vgId:%d
,
vnode snapshot read data for %s, fid:%d suid:%"
PRId64
" uid:%"
PRId64
" iBlock:%d minVersion:%d maxVersion:%d nRow:%d out of %d size:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
pReader
->
fid
,
pReader
->
pBlockIdx
->
suid
,
pReader
->
pBlockIdx
->
uid
,
pReader
->
iBlock
-
1
,
pBlock
->
minVersion
,
pBlock
->
maxVersion
,
pReader
->
nBlockData
.
nRow
,
pBlock
->
nRow
,
...
...
@@ -156,7 +156,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb read data for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb read data for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -231,7 +231,7 @@ static int32_t tsdbSnapReadDel(STsdbSnapReader* pReader, uint8_t** ppData) {
n
+=
tPutDelData
((
*
ppData
)
+
n
,
pDelData
);
}
tsdbInfo
(
"vgId:%d vnode snapshot tsdb read del data for %s, suid:%"
PRId64
" uid:%d"
PRId64
" size:%d"
,
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb read del data for %s, suid:%"
PRId64
" uid:%d"
PRId64
" size:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
pDelIdx
->
suid
,
pDelIdx
->
uid
,
size
);
break
;
...
...
@@ -241,7 +241,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb read del for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
pVnode
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb read del for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
pVnode
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -302,12 +302,12 @@ int32_t tsdbSnapReaderOpen(STsdb* pTsdb, int64_t sver, int64_t ever, int8_t type
goto
_err
;
}
tsdbInfo
(
"vgId:%d vnode snapshot tsdb reader opened for %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb reader opened for %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
*
ppReader
=
pReader
;
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb reader open for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb reader open for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
*
ppReader
=
NULL
;
return
code
;
...
...
@@ -333,7 +333,7 @@ int32_t tsdbSnapReaderClose(STsdbSnapReader** ppReader) {
tsdbFSUnref
(
pReader
->
pTsdb
,
&
pReader
->
fs
);
tsdbInfo
(
"vgId:%d vnode snapshot tsdb reader closed for %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
pReader
->
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb reader closed for %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
pReader
->
pTsdb
->
path
);
taosMemoryFree
(
pReader
);
*
ppReader
=
NULL
;
...
...
@@ -374,11 +374,11 @@ int32_t tsdbSnapRead(STsdbSnapReader* pReader, uint8_t** ppData) {
}
_exit:
tsdbDebug
(
"vgId:%d vnode snapshot tsdb read for %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
pReader
->
pTsdb
->
path
);
tsdbDebug
(
"vgId:%d
,
vnode snapshot tsdb read for %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
pReader
->
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb read for %s failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb read for %s failed since %s"
,
TD_VID
(
pReader
->
pTsdb
->
pVnode
),
pReader
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -444,7 +444,7 @@ static int32_t tsdbSnapWriteAppendData(STsdbSnapWriter* pWriter, uint8_t* pData,
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb snapshot write append data for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
tsdb snapshot write append data for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -531,11 +531,11 @@ static int32_t tsdbSnapWriteTableDataEnd(STsdbSnapWriter* pWriter) {
}
_exit:
tsdbInfo
(
"vgId:%d tsdb snapshot write table data end for %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
tsdb snapshot write table data end for %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb snapshot write table data end for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
tsdb snapshot write table data end for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -582,7 +582,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb snapshot move write table data for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
tsdb snapshot move write table data for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -722,7 +722,7 @@ static int32_t tsdbSnapWriteTableDataImpl(STsdbSnapWriter* pWriter) {
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb write table data impl for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb write table data impl for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -808,11 +808,11 @@ static int32_t tsdbSnapWriteTableData(STsdbSnapWriter* pWriter, TABLEID id) {
if
(
code
)
goto
_err
;
_exit:
tsdbDebug
(
"vgId:%d vnode snapshot tsdb write data impl for %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
tsdbDebug
(
"vgId:%d
,
vnode snapshot tsdb write data impl for %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb write data impl for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb write data impl for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -848,11 +848,11 @@ static int32_t tsdbSnapWriteDataEnd(STsdbSnapWriter* pWriter) {
}
_exit:
tsdbInfo
(
"vgId:%d vnode snapshot tsdb writer data end for %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb writer data end for %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb writer data end for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb writer data end for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -936,12 +936,12 @@ static int32_t tsdbSnapWriteData(STsdbSnapWriter* pWriter, uint8_t* pData, uint3
code
=
tsdbSnapWriteTableData
(
pWriter
,
id
);
if
(
code
)
goto
_err
;
tsdbInfo
(
"vgId:%d vnode snapshot tsdb write data for %s, fid:%d suid:%"
PRId64
" uid:%"
PRId64
" nRow:%d"
,
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb write data for %s, fid:%d suid:%"
PRId64
" uid:%"
PRId64
" nRow:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
fid
,
id
.
suid
,
id
.
suid
,
pBlockData
->
nRow
);
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb write data for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb write data for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1032,7 +1032,7 @@ _exit:
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb write del for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb write del for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1074,11 +1074,11 @@ static int32_t tsdbSnapWriteDelEnd(STsdbSnapWriter* pWriter) {
}
_exit:
tsdbInfo
(
"vgId:%d vnode snapshot tsdb write del for %s end"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb write del for %s end"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb write del end for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb write del end for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
...
...
@@ -1147,10 +1147,10 @@ int32_t tsdbSnapWriterOpen(STsdb* pTsdb, int64_t sver, int64_t ever, STsdbSnapWr
*
ppWriter
=
pWriter
;
tsdbInfo
(
"vgId:%d tsdb snapshot writer open for %s succeed"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
tsdb snapshot writer open for %s succeed"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb snapshot writer open for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
tsdb snapshot writer open for %s failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
pTsdb
->
path
,
tstrerror
(
code
));
*
ppWriter
=
NULL
;
return
code
;
...
...
@@ -1178,13 +1178,13 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** ppWriter, int8_t rollback) {
if
(
code
)
goto
_err
;
}
tsdbInfo
(
"vgId:%d vnode snapshot tsdb writer close for %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
tsdbInfo
(
"vgId:%d
,
vnode snapshot tsdb writer close for %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
taosMemoryFree
(
pWriter
);
*
ppWriter
=
NULL
;
return
code
;
_err:
tsdbError
(
"vgId:%d vnode snapshot tsdb writer close for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
tsdbError
(
"vgId:%d
,
vnode snapshot tsdb writer close for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
taosMemoryFree
(
pWriter
);
*
ppWriter
=
NULL
;
...
...
@@ -1215,11 +1215,11 @@ int32_t tsdbSnapWrite(STsdbSnapWriter* pWriter, uint8_t* pData, uint32_t nData)
}
_exit:
tsdbDebug
(
"vgId:%d tsdb snapshow write for %s succeed"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
tsdbDebug
(
"vgId:%d
,
tsdb snapshow write for %s succeed"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
);
return
code
;
_err:
tsdbError
(
"vgId:%d tsdb snapshow write for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tsdbError
(
"vgId:%d
,
tsdb snapshow write for %s failed since %s"
,
TD_VID
(
pWriter
->
pTsdb
->
pVnode
),
pWriter
->
pTsdb
->
path
,
tstrerror
(
code
));
return
code
;
}
source/dnode/vnode/src/vnd/vnodeSnapshot.c
浏览文件 @
bd31c9da
...
...
@@ -55,12 +55,12 @@ int32_t vnodeSnapReaderOpen(SVnode *pVnode, int64_t sver, int64_t ever, SVSnapRe
pReader
->
sver
=
sver
;
pReader
->
ever
=
ever
;
vInfo
(
"vgId:%d vnode snapshot reader opened, sver:%"
PRId64
" ever:%"
PRId64
,
TD_VID
(
pVnode
),
sver
,
ever
);
vInfo
(
"vgId:%d
,
vnode snapshot reader opened, sver:%"
PRId64
" ever:%"
PRId64
,
TD_VID
(
pVnode
),
sver
,
ever
);
*
ppReader
=
pReader
;
return
code
;
_err:
vError
(
"vgId:%d vnode snapshot reader open failed since %s"
,
TD_VID
(
pVnode
),
tstrerror
(
code
));
vError
(
"vgId:%d
,
vnode snapshot reader open failed since %s"
,
TD_VID
(
pVnode
),
tstrerror
(
code
));
*
ppReader
=
NULL
;
return
code
;
}
...
...
@@ -80,7 +80,7 @@ int32_t vnodeSnapReaderClose(SVSnapReader *pReader) {
metaSnapReaderClose
(
&
pReader
->
pMetaReader
);
}
vInfo
(
"vgId:%d vnode snapshot reader closed"
,
TD_VID
(
pReader
->
pVnode
));
vInfo
(
"vgId:%d
,
vnode snapshot reader closed"
,
TD_VID
(
pReader
->
pVnode
));
taosMemoryFree
(
pReader
);
return
code
;
}
...
...
@@ -211,10 +211,10 @@ _exit:
pReader
->
index
++
;
*
nData
=
sizeof
(
SSnapDataHdr
)
+
pHdr
->
size
;
pHdr
->
index
=
pReader
->
index
;
vInfo
(
"vgId:%d vnode snapshot read data,index:%"
PRId64
" type:%d nData:%d "
,
TD_VID
(
pReader
->
pVnode
),
vInfo
(
"vgId:%d
,
vnode snapshot read data,index:%"
PRId64
" type:%d nData:%d "
,
TD_VID
(
pReader
->
pVnode
),
pReader
->
index
,
pHdr
->
type
,
*
nData
);
}
else
{
vInfo
(
"vgId:%d vnode snapshot read data end, index:%"
PRId64
,
TD_VID
(
pReader
->
pVnode
),
pReader
->
index
);
vInfo
(
"vgId:%d
,
vnode snapshot read data end, index:%"
PRId64
,
TD_VID
(
pReader
->
pVnode
),
pReader
->
index
);
}
return
code
;
...
...
@@ -266,13 +266,13 @@ int32_t vnodeSnapWriterOpen(SVnode *pVnode, int64_t sver, int64_t ever, SVSnapWr
pVnode
->
state
.
commitID
++
;
pWriter
->
commitID
=
pVnode
->
state
.
commitID
;
vInfo
(
"vgId:%d vnode snapshot writer opened, sver:%"
PRId64
" ever:%"
PRId64
" commit id:%"
PRId64
,
TD_VID
(
pVnode
),
vInfo
(
"vgId:%d
,
vnode snapshot writer opened, sver:%"
PRId64
" ever:%"
PRId64
" commit id:%"
PRId64
,
TD_VID
(
pVnode
),
sver
,
ever
,
pWriter
->
commitID
);
*
ppWriter
=
pWriter
;
return
code
;
_err:
vError
(
"vgId:%d vnode snapshot writer open failed since %s"
,
TD_VID
(
pVnode
),
tstrerror
(
code
));
vError
(
"vgId:%d
,
vnode snapshot writer open failed since %s"
,
TD_VID
(
pVnode
),
tstrerror
(
code
));
*
ppWriter
=
NULL
;
return
code
;
}
...
...
@@ -322,12 +322,12 @@ int32_t vnodeSnapWriterClose(SVSnapWriter *pWriter, int8_t rollback, SSnapshot *
}
_exit:
vInfo
(
"vgId:%d vnode snapshot writer closed, rollback:%d"
,
TD_VID
(
pVnode
),
rollback
);
vInfo
(
"vgId:%d
,
vnode snapshot writer closed, rollback:%d"
,
TD_VID
(
pVnode
),
rollback
);
taosMemoryFree
(
pWriter
);
return
code
;
_err:
vError
(
"vgId:%d vnode snapshot writer close failed since %s"
,
TD_VID
(
pWriter
->
pVnode
),
tstrerror
(
code
));
vError
(
"vgId:%d
,
vnode snapshot writer close failed since %s"
,
TD_VID
(
pWriter
->
pVnode
),
tstrerror
(
code
));
return
code
;
}
...
...
@@ -340,7 +340,7 @@ int32_t vnodeSnapWrite(SVSnapWriter *pWriter, uint8_t *pData, uint32_t nData) {
ASSERT
(
pHdr
->
index
==
pWriter
->
index
+
1
);
pWriter
->
index
=
pHdr
->
index
;
vInfo
(
"vgId:%d vnode snapshot write data, index:%"
PRId64
" type:%d nData:%d"
,
TD_VID
(
pVnode
),
pHdr
->
index
,
vInfo
(
"vgId:%d
,
vnode snapshot write data, index:%"
PRId64
" type:%d nData:%d"
,
TD_VID
(
pVnode
),
pHdr
->
index
,
pHdr
->
type
,
nData
);
switch
(
pHdr
->
type
)
{
...
...
@@ -400,7 +400,7 @@ _exit:
return
code
;
_err:
vError
(
"vgId:%d vnode snapshot write failed since %s, index:%"
PRId64
" type:%d nData:%d"
,
TD_VID
(
pVnode
),
vError
(
"vgId:%d
,
vnode snapshot write failed since %s, index:%"
PRId64
" type:%d nData:%d"
,
TD_VID
(
pVnode
),
tstrerror
(
code
),
pHdr
->
index
,
pHdr
->
type
,
nData
);
return
code
;
}
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
bd31c9da
...
...
@@ -30,6 +30,7 @@ static inline void vnodeWaitBlockMsg(SVnode *pVnode, const SRpcMsg *pMsg) {
if
(
vnodeIsMsgBlock
(
pMsg
->
msgType
))
{
const
STraceId
*
trace
=
&
pMsg
->
info
.
traceId
;
vGTrace
(
"vgId:%d, msg:%p wait block, type:%s"
,
pVnode
->
config
.
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
));
pVnode
->
blockCount
=
1
;
tsem_wait
(
&
pVnode
->
syncSem
);
}
}
...
...
@@ -37,8 +38,11 @@ static inline void vnodeWaitBlockMsg(SVnode *pVnode, const SRpcMsg *pMsg) {
static
inline
void
vnodePostBlockMsg
(
SVnode
*
pVnode
,
const
SRpcMsg
*
pMsg
)
{
if
(
vnodeIsMsgBlock
(
pMsg
->
msgType
))
{
const
STraceId
*
trace
=
&
pMsg
->
info
.
traceId
;
vGTrace
(
"vgId:%d, msg:%p post block, type:%s"
,
pVnode
->
config
.
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
));
tsem_post
(
&
pVnode
->
syncSem
);
if
(
pVnode
->
blockCount
)
{
vGTrace
(
"vgId:%d, msg:%p post block, type:%s"
,
pVnode
->
config
.
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
));
pVnode
->
blockCount
=
0
;
tsem_post
(
&
pVnode
->
syncSem
);
}
}
}
...
...
@@ -281,14 +285,15 @@ void vnodeApplyWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) {
for
(
int32_t
i
=
0
;
i
<
numOfMsgs
;
++
i
)
{
if
(
taosGetQitem
(
qall
,
(
void
**
)
&
pMsg
)
==
0
)
continue
;
const
STraceId
*
trace
=
&
pMsg
->
info
.
traceId
;
vG
Info
(
"vgId:%d, msg:%p get from vnode-apply queue, type:%s handle:%p index:%ld"
,
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
info
.
handle
,
pMsg
->
info
.
conn
.
applyIndex
);
vG
Trace
(
"vgId:%d, msg:%p get from vnode-apply queue, type:%s handle:%p index:%"
PRId64
,
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
info
.
handle
,
pMsg
->
info
.
conn
.
applyIndex
);
SRpcMsg
rsp
=
{.
code
=
pMsg
->
code
,
.
info
=
pMsg
->
info
};
if
(
rsp
.
code
==
0
)
{
if
(
vnodeProcessWriteMsg
(
pVnode
,
pMsg
,
pMsg
->
info
.
conn
.
applyIndex
,
&
rsp
)
<
0
)
{
rsp
.
code
=
terrno
;
vError
(
"vgId:%d, msg:%p failed to apply since %s"
,
vgId
,
pMsg
,
terrstr
());
vGError
(
"vgId:%d, msg:%p failed to apply since %s, index:%"
PRId64
,
vgId
,
pMsg
,
terrstr
(),
pMsg
->
info
.
conn
.
applyIndex
);
}
}
...
...
@@ -297,7 +302,7 @@ void vnodeApplyWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) {
tmsgSendRsp
(
&
rsp
);
}
vGTrace
(
"vgId:%d, msg:%p is freed, code:0x%x
"
,
vgId
,
pMsg
,
rsp
.
code
);
vGTrace
(
"vgId:%d, msg:%p is freed, code:0x%x
index:%"
PRId64
,
vgId
,
pMsg
,
rsp
.
code
,
pMsg
->
info
.
conn
.
applyIndex
);
rpcFreeCont
(
pMsg
->
pCont
);
taosFreeQitem
(
pMsg
);
}
...
...
@@ -611,6 +616,18 @@ static int32_t vnodeSnapshotStartWrite(struct SSyncFSM *pFsm, void *pParam, void
#ifdef USE_TSDB_SNAPSHOT
SVnode
*
pVnode
=
pFsm
->
data
;
SSnapshotParam
*
pSnapshotParam
=
pParam
;
do
{
int32_t
itemSize
=
tmsgGetQueueSize
(
&
pVnode
->
msgCb
,
pVnode
->
config
.
vgId
,
APPLY_QUEUE
);
if
(
itemSize
==
0
)
{
vDebug
(
"vgId:%d, apply queue is empty, start write snapshot"
,
pVnode
->
config
.
vgId
);
break
;
}
else
{
vDebug
(
"vgId:%d, %d items in apply queue, write snapshot later"
,
pVnode
->
config
.
vgId
);
taosMsleep
(
10
);
}
}
while
(
true
);
int32_t
code
=
vnodeSnapWriterOpen
(
pVnode
,
pSnapshotParam
->
start
,
pSnapshotParam
->
end
,
(
SVSnapWriter
**
)
ppWriter
);
return
code
;
#else
...
...
@@ -622,7 +639,10 @@ static int32_t vnodeSnapshotStartWrite(struct SSyncFSM *pFsm, void *pParam, void
static
int32_t
vnodeSnapshotStopWrite
(
struct
SSyncFSM
*
pFsm
,
void
*
pWriter
,
bool
isApply
,
SSnapshot
*
pSnapshot
)
{
#ifdef USE_TSDB_SNAPSHOT
SVnode
*
pVnode
=
pFsm
->
data
;
vDebug
(
"vgId:%d, stop write snapshot, isApply:%d"
,
pVnode
->
config
.
vgId
,
isApply
);
int32_t
code
=
vnodeSnapWriterClose
(
pWriter
,
!
isApply
,
pSnapshot
);
vDebug
(
"vgId:%d, apply snapshot to vnode, code:0x%x"
,
pVnode
->
config
.
vgId
,
code
);
return
code
;
#else
taosMemoryFree
(
pWriter
);
...
...
@@ -634,6 +654,7 @@ static int32_t vnodeSnapshotDoWrite(struct SSyncFSM *pFsm, void *pWriter, void *
#ifdef USE_TSDB_SNAPSHOT
SVnode
*
pVnode
=
pFsm
->
data
;
int32_t
code
=
vnodeSnapWrite
(
pWriter
,
pBuf
,
len
);
vTrace
(
"vgId:%d, write snapshot, len:%d"
,
pVnode
->
config
.
vgId
,
len
);
return
code
;
#else
return
0
;
...
...
source/libs/sync/src/syncIndexMgr.c
浏览文件 @
bd31c9da
...
...
@@ -68,7 +68,7 @@ void syncIndexMgrSetIndex(SSyncIndexMgr *pSyncIndexMgr, const SRaftId *pRaftId,
char
host
[
128
];
uint16_t
port
;
syncUtilU642Addr
(
pRaftId
->
addr
,
host
,
sizeof
(
host
),
&
port
);
sError
(
"vgId:%d index mgr set for %s:%d, index:%"
PRId64
" error"
,
pSyncIndexMgr
->
pSyncNode
->
vgId
,
host
,
port
,
index
);
sError
(
"vgId:%d
,
index mgr set for %s:%d, index:%"
PRId64
" error"
,
pSyncIndexMgr
->
pSyncNode
->
vgId
,
host
,
port
,
index
);
}
SyncIndex
syncIndexMgrGetIndex
(
SSyncIndexMgr
*
pSyncIndexMgr
,
const
SRaftId
*
pRaftId
)
{
...
...
@@ -172,7 +172,7 @@ void syncIndexMgrSetTerm(SSyncIndexMgr *pSyncIndexMgr, const SRaftId *pRaftId, S
char
host
[
128
];
uint16_t
port
;
syncUtilU642Addr
(
pRaftId
->
addr
,
host
,
sizeof
(
host
),
&
port
);
sError
(
"vgId:%d index mgr set for %s:%d, term:%"
PRIu64
" error"
,
pSyncIndexMgr
->
pSyncNode
->
vgId
,
host
,
port
,
term
);
sError
(
"vgId:%d
,
index mgr set for %s:%d, term:%"
PRIu64
" error"
,
pSyncIndexMgr
->
pSyncNode
->
vgId
,
host
,
port
,
term
);
}
SyncTerm
syncIndexMgrGetTerm
(
SSyncIndexMgr
*
pSyncIndexMgr
,
const
SRaftId
*
pRaftId
)
{
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
bd31c9da
...
...
@@ -531,10 +531,10 @@ void syncGetEpSet(int64_t rid, SEpSet* pEpSet) {
snprintf
(
pEpSet
->
eps
[
i
].
fqdn
,
sizeof
(
pEpSet
->
eps
[
i
].
fqdn
),
"%s"
,
(
pSyncNode
->
pRaftCfg
->
cfg
.
nodeInfo
)[
i
].
nodeFqdn
);
pEpSet
->
eps
[
i
].
port
=
(
pSyncNode
->
pRaftCfg
->
cfg
.
nodeInfo
)[
i
].
nodePort
;
(
pEpSet
->
numOfEps
)
++
;
sInfo
(
"vgId:%d sync get epset: index:%d %s:%d"
,
pSyncNode
->
vgId
,
i
,
pEpSet
->
eps
[
i
].
fqdn
,
pEpSet
->
eps
[
i
].
port
);
sInfo
(
"vgId:%d
,
sync get epset: index:%d %s:%d"
,
pSyncNode
->
vgId
,
i
,
pEpSet
->
eps
[
i
].
fqdn
,
pEpSet
->
eps
[
i
].
port
);
}
pEpSet
->
inUse
=
pSyncNode
->
pRaftCfg
->
cfg
.
myIndex
;
sInfo
(
"vgId:%d sync get epset in-use:%d"
,
pSyncNode
->
vgId
,
pEpSet
->
inUse
);
sInfo
(
"vgId:%d
,
sync get epset in-use:%d"
,
pSyncNode
->
vgId
,
pEpSet
->
inUse
);
taosReleaseRef
(
tsNodeRefId
,
pSyncNode
->
rid
);
}
...
...
@@ -836,12 +836,12 @@ int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak) {
rpcFreeCont
(
rpcMsg
.
pCont
);
syncRespMgrDel
(
pSyncNode
->
pSyncRespMgr
,
seqNum
);
ret
=
1
;
sDebug
(
"vgId:%d optimized index:%"
PRId64
" success, msgtype:%s,%d"
,
pSyncNode
->
vgId
,
retIndex
,
sDebug
(
"vgId:%d
,
optimized index:%"
PRId64
" success, msgtype:%s,%d"
,
pSyncNode
->
vgId
,
retIndex
,
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
msgType
);
}
else
{
ret
=
-
1
;
terrno
=
TSDB_CODE_SYN_INTERNAL_ERROR
;
sError
(
"vgId:%d optimized index:%"
PRId64
" error, msgtype:%s,%d"
,
pSyncNode
->
vgId
,
retIndex
,
sError
(
"vgId:%d
,
optimized index:%"
PRId64
" error, msgtype:%s,%d"
,
pSyncNode
->
vgId
,
retIndex
,
TMSG_INFO
(
pMsg
->
msgType
),
pMsg
->
msgType
);
}
...
...
source/libs/sync/src/syncRaftEntry.c
浏览文件 @
bd31c9da
...
...
@@ -204,14 +204,14 @@ void syncEntryLog2(char* s, const SSyncRaftEntry* pObj) {
SRaftEntryHashCache
*
raftCacheCreate
(
SSyncNode
*
pSyncNode
,
int32_t
maxCount
)
{
SRaftEntryHashCache
*
pCache
=
taosMemoryMalloc
(
sizeof
(
SRaftEntryHashCache
));
if
(
pCache
==
NULL
)
{
sError
(
"vgId:%d raft cache create error"
,
pSyncNode
->
vgId
);
sError
(
"vgId:%d
,
raft cache create error"
,
pSyncNode
->
vgId
);
return
NULL
;
}
pCache
->
pEntryHash
=
taosHashInit
(
sizeof
(
SyncIndex
),
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
true
,
HASH_NO_LOCK
);
if
(
pCache
->
pEntryHash
==
NULL
)
{
sError
(
"vgId:%d raft cache create hash error"
,
pSyncNode
->
vgId
);
sError
(
"vgId:%d
,
raft cache create hash error"
,
pSyncNode
->
vgId
);
return
NULL
;
}
...
...
@@ -460,14 +460,14 @@ static void freeRaftEntry(void* param) {
SRaftEntryCache
*
raftEntryCacheCreate
(
SSyncNode
*
pSyncNode
,
int32_t
maxCount
)
{
SRaftEntryCache
*
pCache
=
taosMemoryMalloc
(
sizeof
(
SRaftEntryCache
));
if
(
pCache
==
NULL
)
{
sError
(
"vgId:%d raft cache create error"
,
pSyncNode
->
vgId
);
sError
(
"vgId:%d
,
raft cache create error"
,
pSyncNode
->
vgId
);
return
NULL
;
}
pCache
->
pSkipList
=
tSkipListCreate
(
MAX_SKIP_LIST_LEVEL
,
TSDB_DATA_TYPE_BINARY
,
sizeof
(
SyncIndex
),
cmpFn
,
SL_ALLOW_DUP_KEY
,
keyFn
);
if
(
pCache
->
pSkipList
==
NULL
)
{
sError
(
"vgId:%d raft cache create hash error"
,
pSyncNode
->
vgId
);
sError
(
"vgId:%d
,
raft cache create hash error"
,
pSyncNode
->
vgId
);
return
NULL
;
}
...
...
source/libs/sync/src/syncRaftLog.c
浏览文件 @
bd31c9da
...
...
@@ -244,7 +244,7 @@ static int32_t raftLogAppendEntry(struct SSyncLogStore* pLogStore, SSyncRaftEntr
SyncIndex writeIndex = raftLogWriteIndex(pLogStore);
if (pEntry->index != writeIndex) {
sError("vgId:%d wal write index error, entry-index:%" PRId64 " update to %" PRId64, pData->pSyncNode->vgId,
sError("vgId:%d
,
wal write index error, entry-index:%" PRId64 " update to %" PRId64, pData->pSyncNode->vgId,
pEntry->index, writeIndex);
pEntry->index = writeIndex;
}
...
...
@@ -359,7 +359,7 @@ static int32_t raftLogTruncate(struct SSyncLogStore* pLogStore, SyncIndex fromIn
const
char
*
errStr
=
tstrerror
(
err
);
int32_t
sysErr
=
errno
;
const
char
*
sysErrStr
=
strerror
(
errno
);
sError
(
"vgId:%d wal truncate error, from-index:%"
PRId64
", err:%d %X, msg:%s, syserr:%d, sysmsg:%s"
,
sError
(
"vgId:%d
,
wal truncate error, from-index:%"
PRId64
", err:%d %X, msg:%s, syserr:%d, sysmsg:%s"
,
pData
->
pSyncNode
->
vgId
,
fromIndex
,
err
,
err
,
errStr
,
sysErr
,
sysErrStr
);
ASSERT
(
0
);
...
...
@@ -544,7 +544,7 @@ int32_t logStoreTruncate(SSyncLogStore* pLogStore, SyncIndex fromIndex) {
const
char
*
errStr
=
tstrerror
(
err
);
int32_t
sysErr
=
errno
;
const
char
*
sysErrStr
=
strerror
(
errno
);
sError
(
"vgId:%d wal truncate error, from-index:%"
PRId64
", err:%d %X, msg:%s, syserr:%d, sysmsg:%s"
,
sError
(
"vgId:%d
,
wal truncate error, from-index:%"
PRId64
", err:%d %X, msg:%s, syserr:%d, sysmsg:%s"
,
pData
->
pSyncNode
->
vgId
,
fromIndex
,
err
,
err
,
errStr
,
sysErr
,
sysErrStr
);
ASSERT
(
0
);
...
...
@@ -587,7 +587,7 @@ int32_t logStoreUpdateCommitIndex(SSyncLogStore* pLogStore, SyncIndex index) {
const
char
*
errStr
=
tstrerror
(
err
);
int32_t
sysErr
=
errno
;
const
char
*
sysErrStr
=
strerror
(
errno
);
sError
(
"vgId:%d wal update commit index error, index:%"
PRId64
", err:%d %X, msg:%s, syserr:%d, sysmsg:%s"
,
sError
(
"vgId:%d
,
wal update commit index error, index:%"
PRId64
", err:%d %X, msg:%s, syserr:%d, sysmsg:%s"
,
pData
->
pSyncNode
->
vgId
,
index
,
err
,
err
,
errStr
,
sysErr
,
sysErrStr
);
ASSERT
(
0
);
...
...
source/libs/sync/src/syncReplication.c
浏览文件 @
bd31c9da
...
...
@@ -136,7 +136,7 @@ int32_t syncNodeAppendEntriesPeersSnapshot2(SSyncNode* pSyncNode) {
SyncIndex
newNextIndex
=
nextIndex
+
1
;
syncIndexMgrSetIndex
(
pSyncNode
->
pNextIndex
,
pDestId
,
newNextIndex
);
syncIndexMgrSetIndex
(
pSyncNode
->
pMatchIndex
,
pDestId
,
SYNC_INDEX_INVALID
);
sError
(
"vgId:%d sync get pre term error, nextIndex:%"
PRId64
", update next-index:%"
PRId64
sError
(
"vgId:%d
,
sync get pre term error, nextIndex:%"
PRId64
", update next-index:%"
PRId64
", match-index:%d, raftid:%"
PRId64
,
pSyncNode
->
vgId
,
nextIndex
,
newNextIndex
,
SYNC_INDEX_INVALID
,
pDestId
->
addr
);
...
...
@@ -228,7 +228,7 @@ int32_t syncNodeAppendEntriesPeersSnapshot(SSyncNode* pSyncNode) {
SyncIndex
newNextIndex
=
nextIndex
+
1
;
syncIndexMgrSetIndex
(
pSyncNode
->
pNextIndex
,
pDestId
,
newNextIndex
);
syncIndexMgrSetIndex
(
pSyncNode
->
pMatchIndex
,
pDestId
,
SYNC_INDEX_INVALID
);
sError
(
"vgId:%d sync get pre term error, nextIndex:%"
PRId64
", update next-index:%"
PRId64
sError
(
"vgId:%d
,
sync get pre term error, nextIndex:%"
PRId64
", update next-index:%"
PRId64
", match-index:%d, raftid:%"
PRId64
,
pSyncNode
->
vgId
,
nextIndex
,
newNextIndex
,
SYNC_INDEX_INVALID
,
pDestId
->
addr
);
...
...
source/libs/wal/src/walRead.c
浏览文件 @
bd31c9da
...
...
@@ -78,7 +78,7 @@ int32_t walNextValidMsg(SWalReader *pReader) {
int64_t
endVer
=
pReader
->
cond
.
scanUncommited
?
lastVer
:
committedVer
;
endVer
=
TMIN
(
appliedVer
,
endVer
);
wDebug
(
"vgId:%d wal start to fetch, ver %ld, last ver %ld commit ver %ld, applied ver %ld, end ver %ld"
,
wDebug
(
"vgId:%d
,
wal start to fetch, ver %ld, last ver %ld commit ver %ld, applied ver %ld, end ver %ld"
,
pReader
->
pWal
->
cfg
.
vgId
,
fetchVer
,
lastVer
,
committedVer
,
appliedVer
,
endVer
);
pReader
->
curStopped
=
0
;
while
(
fetchVer
<=
endVer
)
{
...
...
@@ -190,7 +190,8 @@ int32_t walReadSeekVerImpl(SWalReader *pReader, int64_t ver) {
return
-
1
;
}
wDebug
(
"wal version reset from %ld(invalid: %d) to %ld"
,
pReader
->
curVersion
,
pReader
->
curInvalid
,
ver
);
wDebug
(
"vgId:%d, wal version reset from %"
PRId64
"(invalid: %d) to %"
PRId64
,
pReader
->
pWal
->
cfg
.
vgId
,
pReader
->
curVersion
,
pReader
->
curInvalid
,
ver
);
pReader
->
curVersion
=
ver
;
return
0
;
...
...
@@ -199,7 +200,7 @@ int32_t walReadSeekVerImpl(SWalReader *pReader, int64_t ver) {
int32_t
walReadSeekVer
(
SWalReader
*
pReader
,
int64_t
ver
)
{
SWal
*
pWal
=
pReader
->
pWal
;
if
(
!
pReader
->
curInvalid
&&
ver
==
pReader
->
curVersion
)
{
wDebug
(
"
wal version %ld match, no need to reset"
,
ver
);
wDebug
(
"
vgId:%d, wal version %"
PRId64
" match, no need to reset"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
);
return
0
;
}
...
...
@@ -311,7 +312,7 @@ static int32_t walFetchBodyNew(SWalReader *pRead) {
return
-
1
;
}
wDebug
(
"v
ersion %ld is fetched, cursor advance"
,
ver
);
wDebug
(
"v
gId:%d, version %"
PRId64
" is fetched, cursor advance"
,
pRead
->
pWal
->
cfg
.
vgId
,
ver
);
pRead
->
curVersion
=
ver
+
1
;
return
0
;
}
...
...
@@ -331,7 +332,7 @@ static int32_t walSkipFetchBodyNew(SWalReader *pRead) {
}
pRead
->
curVersion
++
;
wDebug
(
"v
ersion advance to %ld, skip fetch"
,
pRead
->
curVersion
);
wDebug
(
"v
gId:%d, version advance to %"
PRId64
", skip fetch"
,
pRead
->
pWal
->
cfg
.
vgId
,
pRead
->
curVersion
);
return
0
;
}
...
...
@@ -424,7 +425,7 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) {
}
int32_t
walReadVer
(
SWalReader
*
pReader
,
int64_t
ver
)
{
wDebug
(
"vgId:%d wal start to read ver %ld"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
);
wDebug
(
"vgId:%d
,
wal start to read ver %ld"
,
pReader
->
pWal
->
cfg
.
vgId
,
ver
);
int64_t
contLen
;
int32_t
code
;
bool
seeked
=
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录