Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1ec57798
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1ec57798
编写于
7月 07, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ci: remove unstable case
上级
1e7d9ada
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
79 addition
and
115 deletion
+79
-115
include/libs/wal/wal.h
include/libs/wal/wal.h
+25
-19
source/dnode/vnode/src/inc/tq.h
source/dnode/vnode/src/inc/tq.h
+1
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-2
source/dnode/vnode/src/tq/tqMeta.c
source/dnode/vnode/src/tq/tqMeta.c
+1
-1
source/libs/sync/inc/syncRaftLog.h
source/libs/sync/inc/syncRaftLog.h
+2
-2
source/libs/sync/src/syncRaftLog.c
source/libs/sync/src/syncRaftLog.c
+6
-6
source/libs/wal/src/walRead.c
source/libs/wal/src/walRead.c
+34
-76
source/libs/wal/test/walMetaTest.cpp
source/libs/wal/test/walMetaTest.cpp
+7
-7
tests/system-test/failed.txt
tests/system-test/failed.txt
+1
-0
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+1
-1
未找到文件。
include/libs/wal/wal.h
浏览文件 @
1ec57798
...
...
@@ -88,7 +88,7 @@ typedef struct {
EWalType
level
;
// wal level
}
SWalCfg
;
typedef
struct
SWalVer
{
typedef
struct
{
int64_t
firstVer
;
int64_t
verInSnapshotting
;
int64_t
snapshotVer
;
...
...
@@ -149,17 +149,22 @@ typedef struct SWal {
SWalCkHead
writeHead
;
}
SWal
;
// WAL HANDLE
typedef
struct
SWalReadHandle
{
SWal
*
pWal
;
TdFilePtr
pReadLogTFile
;
TdFilePtr
pReadIdxTFile
;
int64_t
curFileFirstVer
;
int64_t
curVersion
;
int64_t
capacity
;
int64_t
status
;
// if cursor valid
TdThreadMutex
mutex
;
SWalCkHead
*
pHead
;
}
SWalReadHandle
;
typedef
struct
{
int8_t
scanUncommited
;
int8_t
scanMeta
;
}
SWalFilterCond
;
typedef
struct
{
SWal
*
pWal
;
TdFilePtr
pLogFile
;
TdFilePtr
pIdxFile
;
int64_t
curFileFirstVer
;
int64_t
curVersion
;
int64_t
capacity
;
TdThreadMutex
mutex
;
SWalFilterCond
cond
;
SWalCkHead
*
pHead
;
}
SWalReader
;
// module initialization
int32_t
walInit
();
...
...
@@ -186,15 +191,16 @@ int32_t walRestoreFromSnapshot(SWal *, int64_t ver);
// int32_t walDataCorrupted(SWal*);
// read
SWalReadHandle
*
walOpenReadHandle
(
SWal
*
);
void
walCloseReadHandle
(
SWalReadHandle
*
);
int32_t
walReadWithHandle
(
SWalReadHandle
*
pRead
,
int64_t
ver
);
SWalReader
*
walOpenReader
(
SWal
*
,
SWalFilterCond
*
pCond
);
void
walCloseReader
(
SWalReader
*
pRead
);
int32_t
walReadVer
(
SWalReader
*
pRead
,
int64_t
ver
);
int32_t
walNextValidMsg
(
SWalReader
*
pRead
,
SWalCkHead
**
ppHead
);
// only for tq usage
void
walSetReaderCapacity
(
SWalRead
Handle
*
pRead
,
int32_t
capacity
);
int32_t
walFetchHead
(
SWalRead
Handle
*
pRead
,
int64_t
ver
,
SWalCkHead
*
pHead
);
int32_t
walFetchBody
(
SWalRead
Handle
*
pRead
,
SWalCkHead
**
ppHead
);
int32_t
walSkipFetchBody
(
SWalRead
Handle
*
pRead
,
const
SWalCkHead
*
pHead
);
void
walSetReaderCapacity
(
SWalRead
er
*
pRead
,
int32_t
capacity
);
int32_t
walFetchHead
(
SWalRead
er
*
pRead
,
int64_t
ver
,
SWalCkHead
*
pHead
);
int32_t
walFetchBody
(
SWalRead
er
*
pRead
,
SWalCkHead
**
ppHead
);
int32_t
walSkipFetchBody
(
SWalRead
er
*
pRead
,
const
SWalCkHead
*
pHead
);
typedef
struct
{
int64_t
refId
;
...
...
source/dnode/vnode/src/inc/tq.h
浏览文件 @
1ec57798
...
...
@@ -128,7 +128,7 @@ typedef struct {
int8_t
fetchMeta
;
// reader
SWalRead
Handle
*
pWalReader
;
SWalRead
er
*
pWalReader
;
// push
STqPushHandle
pushHandle
;
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
1ec57798
...
...
@@ -149,7 +149,6 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con
SEncoder
encoder
;
tEncoderInit
(
&
encoder
,
abuf
,
len
);
tEncodeSMqDataRsp
(
&
encoder
,
pRsp
);
/*tEncodeSMqDataBlkRsp(&abuf, pRsp);*/
SRpcMsg
rsp
=
{
.
info
=
pMsg
->
info
,
...
...
@@ -447,7 +446,7 @@ int32_t tqProcessVgChangeReq(STQ* pTq, char* msg, int32_t msgLen) {
pHandle
->
execHandle
.
subType
=
req
.
subType
;
pHandle
->
fetchMeta
=
req
.
withMeta
;
pHandle
->
pWalReader
=
walOpenRead
Handle
(
pTq
->
pVnode
->
pWal
);
pHandle
->
pWalReader
=
walOpenRead
er
(
pTq
->
pVnode
->
pWal
,
NULL
);
for
(
int32_t
i
=
0
;
i
<
5
;
i
++
)
{
pHandle
->
execHandle
.
pExecReader
[
i
]
=
tqInitSubmitMsgScanner
(
pTq
->
pVnode
->
pMeta
);
}
...
...
source/dnode/vnode/src/tq/tqMeta.c
浏览文件 @
1ec57798
...
...
@@ -77,7 +77,7 @@ int32_t tqMetaOpen(STQ* pTq) {
STqHandle
handle
;
tDecoderInit
(
&
decoder
,
(
uint8_t
*
)
pVal
,
vLen
);
tDecodeSTqHandle
(
&
decoder
,
&
handle
);
handle
.
pWalReader
=
walOpenRead
Handle
(
pTq
->
pVnode
->
pWal
);
handle
.
pWalReader
=
walOpenRead
er
(
pTq
->
pVnode
->
pWal
,
NULL
);
for
(
int32_t
i
=
0
;
i
<
5
;
i
++
)
{
handle
.
execHandle
.
pExecReader
[
i
]
=
tqInitSubmitMsgScanner
(
pTq
->
pVnode
->
pMeta
);
}
...
...
source/libs/sync/inc/syncRaftLog.h
浏览文件 @
1ec57798
...
...
@@ -32,8 +32,8 @@ typedef struct SSyncLogStoreData {
SSyncNode
*
pSyncNode
;
SWal
*
pWal
;
TdThreadMutex
mutex
;
SWalRead
Handle
*
pWalHandle
;
TdThreadMutex
mutex
;
SWalRead
er
*
pWalHandle
;
// SyncIndex beginIndex; // valid begin index, default 0, may be set beginIndex > 0
}
SSyncLogStoreData
;
...
...
source/libs/sync/src/syncRaftLog.c
浏览文件 @
1ec57798
...
...
@@ -62,7 +62,7 @@ SSyncLogStore* logStoreCreate(SSyncNode* pSyncNode) {
ASSERT
(
pData
->
pWal
!=
NULL
);
taosThreadMutexInit
(
&
(
pData
->
mutex
),
NULL
);
pData
->
pWalHandle
=
walOpenRead
Handle
(
pData
->
pWal
);
pData
->
pWalHandle
=
walOpenRead
er
(
pData
->
pWal
,
NULL
);
ASSERT
(
pData
->
pWalHandle
!=
NULL
);
pLogStore
->
appendEntry
=
logStoreAppendEntry
;
...
...
@@ -95,7 +95,7 @@ void logStoreDestory(SSyncLogStore* pLogStore) {
taosThreadMutexLock
(
&
(
pData
->
mutex
));
if
(
pData
->
pWalHandle
!=
NULL
)
{
walCloseRead
Handle
(
pData
->
pWalHandle
);
walCloseRead
er
(
pData
->
pWalHandle
);
pData
->
pWalHandle
=
NULL
;
}
taosThreadMutexUnlock
(
&
(
pData
->
mutex
));
...
...
@@ -255,7 +255,7 @@ static int32_t raftLogGetEntry(struct SSyncLogStore* pLogStore, SyncIndex index,
*
ppEntry
=
NULL
;
// SWalReadHandle* pWalHandle = walOpenReadHandle(pWal);
SWalRead
Handle
*
pWalHandle
=
pData
->
pWalHandle
;
SWalRead
er
*
pWalHandle
=
pData
->
pWalHandle
;
if
(
pWalHandle
==
NULL
)
{
terrno
=
TSDB_CODE_SYN_INTERNAL_ERROR
;
return
-
1
;
...
...
@@ -263,7 +263,7 @@ static int32_t raftLogGetEntry(struct SSyncLogStore* pLogStore, SyncIndex index,
taosThreadMutexLock
(
&
(
pData
->
mutex
));
code
=
walRead
WithHandle
(
pWalHandle
,
index
);
code
=
walRead
Ver
(
pWalHandle
,
index
);
if
(
code
!=
0
)
{
int32_t
err
=
terrno
;
const
char
*
errStr
=
tstrerror
(
err
);
...
...
@@ -398,10 +398,10 @@ SSyncRaftEntry* logStoreGetEntry(SSyncLogStore* pLogStore, SyncIndex index) {
taosThreadMutexLock
(
&
(
pData
->
mutex
));
// SWalReadHandle* pWalHandle = walOpenReadHandle(pWal);
SWalRead
Handle
*
pWalHandle
=
pData
->
pWalHandle
;
SWalRead
er
*
pWalHandle
=
pData
->
pWalHandle
;
ASSERT
(
pWalHandle
!=
NULL
);
int32_t
code
=
walRead
WithHandle
(
pWalHandle
,
index
);
int32_t
code
=
walRead
Ver
(
pWalHandle
,
index
);
if
(
code
!=
0
)
{
int32_t
err
=
terrno
;
const
char
*
errStr
=
tstrerror
(
err
);
...
...
source/libs/wal/src/walRead.c
浏览文件 @
1ec57798
...
...
@@ -16,20 +16,20 @@
#include "taoserror.h"
#include "walInt.h"
SWalRead
Handle
*
walOpenReadHandle
(
SWal
*
pWal
)
{
SWalRead
Handle
*
pRead
=
taosMemoryMalloc
(
sizeof
(
SWalReadHandle
));
SWalRead
er
*
walOpenReader
(
SWal
*
pWal
,
SWalFilterCond
*
cond
)
{
SWalRead
er
*
pRead
=
taosMemoryMalloc
(
sizeof
(
SWalReader
));
if
(
pRead
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
NULL
;
}
pRead
->
pWal
=
pWal
;
pRead
->
p
ReadIdxT
File
=
NULL
;
pRead
->
p
ReadLogT
File
=
NULL
;
pRead
->
p
Idx
File
=
NULL
;
pRead
->
p
Log
File
=
NULL
;
pRead
->
curVersion
=
-
1
;
pRead
->
curFileFirstVer
=
-
1
;
pRead
->
capacity
=
0
;
pRead
->
status
=
0
;
pRead
->
cond
=
*
cond
;
taosThreadMutexInit
(
&
pRead
->
mutex
,
NULL
);
...
...
@@ -42,23 +42,24 @@ SWalReadHandle *walOpenReadHandle(SWal *pWal) {
return
pRead
;
}
void
walCloseRead
Handle
(
SWalReadHandle
*
pRead
)
{
taosCloseFile
(
&
pRead
->
p
ReadIdxT
File
);
taosCloseFile
(
&
pRead
->
p
ReadLogT
File
);
void
walCloseRead
er
(
SWalReader
*
pRead
)
{
taosCloseFile
(
&
pRead
->
p
Idx
File
);
taosCloseFile
(
&
pRead
->
p
Log
File
);
taosMemoryFreeClear
(
pRead
->
pHead
);
taosMemoryFree
(
pRead
);
}
int32_t
walRegisterRead
(
SWalReadHandle
*
pRead
,
int64_t
ver
)
{
// TODO
int32_t
walNextValidMsg
(
SWalReader
*
pRead
,
SWalCkHead
**
ppHead
)
{
//
return
0
;
}
static
int64_t
walReadSeekFilePos
(
SWalRead
Handle
*
pRead
,
int64_t
fileFirstVer
,
int64_t
ver
)
{
static
int64_t
walReadSeekFilePos
(
SWalRead
er
*
pRead
,
int64_t
fileFirstVer
,
int64_t
ver
)
{
int64_t
ret
=
0
;
TdFilePtr
pIdxTFile
=
pRead
->
p
ReadIdxT
File
;
TdFilePtr
pLogTFile
=
pRead
->
p
ReadLogT
File
;
TdFilePtr
pIdxTFile
=
pRead
->
p
Idx
File
;
TdFilePtr
pLogTFile
=
pRead
->
p
Log
File
;
// seek position
int64_t
offset
=
(
ver
-
fileFirstVer
)
*
sizeof
(
SWalIdxEntry
);
...
...
@@ -90,11 +91,11 @@ static int64_t walReadSeekFilePos(SWalReadHandle *pRead, int64_t fileFirstVer, i
return
ret
;
}
static
int32_t
walReadChangeFile
(
SWalRead
Handle
*
pRead
,
int64_t
fileFirstVer
)
{
static
int32_t
walReadChangeFile
(
SWalRead
er
*
pRead
,
int64_t
fileFirstVer
)
{
char
fnameStr
[
WAL_FILE_LEN
];
taosCloseFile
(
&
pRead
->
p
ReadIdxT
File
);
taosCloseFile
(
&
pRead
->
p
ReadLogT
File
);
taosCloseFile
(
&
pRead
->
p
Idx
File
);
taosCloseFile
(
&
pRead
->
p
Log
File
);
walBuildLogName
(
pRead
->
pWal
,
fileFirstVer
,
fnameStr
);
TdFilePtr
pLogTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_READ
);
...
...
@@ -104,7 +105,7 @@ static int32_t walReadChangeFile(SWalReadHandle *pRead, int64_t fileFirstVer) {
return
-
1
;
}
pRead
->
p
ReadLogT
File
=
pLogTFile
;
pRead
->
p
Log
File
=
pLogTFile
;
walBuildIdxName
(
pRead
->
pWal
,
fileFirstVer
,
fnameStr
);
TdFilePtr
pIdxTFile
=
taosOpenFile
(
fnameStr
,
TD_FILE_READ
);
...
...
@@ -114,11 +115,11 @@ static int32_t walReadChangeFile(SWalReadHandle *pRead, int64_t fileFirstVer) {
return
-
1
;
}
pRead
->
p
ReadIdxT
File
=
pIdxTFile
;
pRead
->
p
Idx
File
=
pIdxTFile
;
return
0
;
}
static
int32_t
walReadSeekVer
(
SWalRead
Handle
*
pRead
,
int64_t
ver
)
{
static
int32_t
walReadSeekVer
(
SWalRead
er
*
pRead
,
int64_t
ver
)
{
SWal
*
pWal
=
pRead
->
pWal
;
if
(
ver
==
pRead
->
curVersion
)
{
return
0
;
...
...
@@ -153,9 +154,9 @@ static int32_t walReadSeekVer(SWalReadHandle *pRead, int64_t ver) {
return
0
;
}
void
walSetReaderCapacity
(
SWalRead
Handle
*
pRead
,
int32_t
capacity
)
{
pRead
->
capacity
=
capacity
;
}
void
walSetReaderCapacity
(
SWalRead
er
*
pRead
,
int32_t
capacity
)
{
pRead
->
capacity
=
capacity
;
}
int32_t
walFetchHead
(
SWalRead
Handle
*
pRead
,
int64_t
ver
,
SWalCkHead
*
pHead
)
{
int32_t
walFetchHead
(
SWalRead
er
*
pRead
,
int64_t
ver
,
SWalCkHead
*
pHead
)
{
int64_t
code
;
// TODO: valid ver
...
...
@@ -168,9 +169,9 @@ int32_t walFetchHead(SWalReadHandle *pRead, int64_t ver, SWalCkHead *pHead) {
if
(
code
<
0
)
return
-
1
;
}
ASSERT
(
taosValidFile
(
pRead
->
p
ReadLogT
File
)
==
true
);
ASSERT
(
taosValidFile
(
pRead
->
p
Log
File
)
==
true
);
code
=
taosReadFile
(
pRead
->
p
ReadLogT
File
,
pHead
,
sizeof
(
SWalCkHead
));
code
=
taosReadFile
(
pRead
->
p
Log
File
,
pHead
,
sizeof
(
SWalCkHead
));
if
(
code
!=
sizeof
(
SWalCkHead
))
{
return
-
1
;
}
...
...
@@ -186,12 +187,12 @@ int32_t walFetchHead(SWalReadHandle *pRead, int64_t ver, SWalCkHead *pHead) {
return
0
;
}
int32_t
walSkipFetchBody
(
SWalRead
Handle
*
pRead
,
const
SWalCkHead
*
pHead
)
{
int32_t
walSkipFetchBody
(
SWalRead
er
*
pRead
,
const
SWalCkHead
*
pHead
)
{
int64_t
code
;
ASSERT
(
pRead
->
curVersion
==
pHead
->
head
.
version
);
code
=
taosLSeekFile
(
pRead
->
p
ReadLogT
File
,
pHead
->
head
.
bodyLen
,
SEEK_CUR
);
code
=
taosLSeekFile
(
pRead
->
p
Log
File
,
pHead
->
head
.
bodyLen
,
SEEK_CUR
);
if
(
code
<
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
pRead
->
curVersion
=
-
1
;
...
...
@@ -203,7 +204,7 @@ int32_t walSkipFetchBody(SWalReadHandle *pRead, const SWalCkHead *pHead) {
return
0
;
}
int32_t
walFetchBody
(
SWalRead
Handle
*
pRead
,
SWalCkHead
**
ppHead
)
{
int32_t
walFetchBody
(
SWalRead
er
*
pRead
,
SWalCkHead
**
ppHead
)
{
SWalCont
*
pReadHead
=
&
((
*
ppHead
)
->
head
);
int64_t
ver
=
pReadHead
->
version
;
...
...
@@ -218,7 +219,7 @@ int32_t walFetchBody(SWalReadHandle *pRead, SWalCkHead **ppHead) {
pRead
->
capacity
=
pReadHead
->
bodyLen
;
}
if
(
pReadHead
->
bodyLen
!=
taosReadFile
(
pRead
->
p
ReadLogT
File
,
pReadHead
->
body
,
pReadHead
->
bodyLen
))
{
if
(
pReadHead
->
bodyLen
!=
taosReadFile
(
pRead
->
p
Log
File
,
pReadHead
->
body
,
pReadHead
->
bodyLen
))
{
ASSERT
(
0
);
return
-
1
;
}
...
...
@@ -241,9 +242,9 @@ int32_t walFetchBody(SWalReadHandle *pRead, SWalCkHead **ppHead) {
return
0
;
}
int32_t
walReadWithHandle_s
(
SWalRead
Handle
*
pRead
,
int64_t
ver
,
SWalCont
**
ppHead
)
{
int32_t
walReadWithHandle_s
(
SWalRead
er
*
pRead
,
int64_t
ver
,
SWalCont
**
ppHead
)
{
taosThreadMutexLock
(
&
pRead
->
mutex
);
if
(
walRead
WithHandle
(
pRead
,
ver
)
<
0
)
{
if
(
walRead
Ver
(
pRead
,
ver
)
<
0
)
{
taosThreadMutexUnlock
(
&
pRead
->
mutex
);
return
-
1
;
}
...
...
@@ -257,7 +258,7 @@ int32_t walReadWithHandle_s(SWalReadHandle *pRead, int64_t ver, SWalCont **ppHea
return
0
;
}
int32_t
walRead
WithHandle
(
SWalReadHandle
*
pRead
,
int64_t
ver
)
{
int32_t
walRead
Ver
(
SWalReader
*
pRead
,
int64_t
ver
)
{
int64_t
code
;
if
(
pRead
->
pWal
->
vers
.
firstVer
==
-
1
)
{
...
...
@@ -280,9 +281,9 @@ int32_t walReadWithHandle(SWalReadHandle *pRead, int64_t ver) {
return
-
1
;
}
ASSERT
(
taosValidFile
(
pRead
->
p
ReadLogT
File
)
==
true
);
ASSERT
(
taosValidFile
(
pRead
->
p
Log
File
)
==
true
);
code
=
taosReadFile
(
pRead
->
p
ReadLogT
File
,
pRead
->
pHead
,
sizeof
(
SWalCkHead
));
code
=
taosReadFile
(
pRead
->
p
Log
File
,
pRead
->
pHead
,
sizeof
(
SWalCkHead
));
if
(
code
!=
sizeof
(
SWalCkHead
))
{
if
(
code
<
0
)
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
...
...
@@ -310,7 +311,7 @@ int32_t walReadWithHandle(SWalReadHandle *pRead, int64_t ver) {
pRead
->
capacity
=
pRead
->
pHead
->
head
.
bodyLen
;
}
if
((
code
=
taosReadFile
(
pRead
->
p
ReadLogT
File
,
pRead
->
pHead
->
head
.
body
,
pRead
->
pHead
->
head
.
bodyLen
))
!=
if
((
code
=
taosReadFile
(
pRead
->
p
Log
File
,
pRead
->
pHead
->
head
.
body
,
pRead
->
pHead
->
head
.
bodyLen
))
!=
pRead
->
pHead
->
head
.
bodyLen
)
{
if
(
code
<
0
)
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
...
...
@@ -340,46 +341,3 @@ int32_t walReadWithHandle(SWalReadHandle *pRead, int64_t ver) {
return
0
;
}
#if 0
int32_t walRead(SWal *pWal, SWalHead **ppHead, int64_t ver) {
int code;
code = walSeekVer(pWal, ver);
if (code != 0) {
return code;
}
if (*ppHead == NULL) {
void *ptr = taosMemoryRealloc(*ppHead, sizeof(SWalHead));
if (ptr == NULL) {
return -1;
}
*ppHead = ptr;
}
if (tfRead(pWal->pWriteLogTFile, *ppHead, sizeof(SWalHead)) != sizeof(SWalHead)) {
return -1;
}
// TODO: endian compatibility processing after read
if (walValidHeadCksum(*ppHead) != 0) {
return -1;
}
void *ptr = taosMemoryRealloc(*ppHead, sizeof(SWalHead) + (*ppHead)->head.len);
if (ptr == NULL) {
taosMemoryFree(*ppHead);
*ppHead = NULL;
return -1;
}
if (tfRead(pWal->pWriteLogTFile, (*ppHead)->head.body, (*ppHead)->head.len) != (*ppHead)->head.len) {
return -1;
}
// TODO: endian compatibility processing after read
if (walValidBodyCksum(*ppHead) != 0) {
return -1;
}
return 0;
}
int32_t walReadWithFp(SWal *pWal, FWalWrite writeFp, int64_t verStart, int32_t readNum) {
return 0;
}
#endif
source/libs/wal/test/walMetaTest.cpp
浏览文件 @
1ec57798
...
...
@@ -292,8 +292,8 @@ TEST_F(WalCleanDeleteEnv, roll) {
TEST_F
(
WalKeepEnv
,
readHandleRead
)
{
walResetEnv
();
int
code
;
SWalRead
Handle
*
pRead
=
walOpenReadHandle
(
pWal
);
int
code
;
SWalRead
er
*
pRead
=
walOpenReader
(
pWal
,
NULL
);
ASSERT
(
pRead
!=
NULL
);
int
i
;
...
...
@@ -306,7 +306,7 @@ TEST_F(WalKeepEnv, readHandleRead) {
}
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
int
ver
=
taosRand
()
%
100
;
code
=
walRead
WithHandle
(
pRead
,
ver
);
code
=
walRead
Ver
(
pRead
,
ver
);
ASSERT_EQ
(
code
,
0
);
// printf("rrbody: \n");
...
...
@@ -325,7 +325,7 @@ TEST_F(WalKeepEnv, readHandleRead) {
EXPECT_EQ
(
newStr
[
j
],
pRead
->
pHead
->
head
.
body
[
j
]);
}
}
walCloseRead
Handle
(
pRead
);
walCloseRead
er
(
pRead
);
}
TEST_F
(
WalRetentionEnv
,
repairMeta1
)
{
...
...
@@ -354,12 +354,12 @@ TEST_F(WalRetentionEnv, repairMeta1) {
ASSERT_EQ
(
pWal
->
vers
.
lastVer
,
99
);
SWalRead
Handle
*
pRead
=
walOpenReadHandle
(
pWal
);
SWalRead
er
*
pRead
=
walOpenReader
(
pWal
,
NULL
);
ASSERT
(
pRead
!=
NULL
);
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
int
ver
=
taosRand
()
%
100
;
code
=
walRead
WithHandle
(
pRead
,
ver
);
code
=
walRead
Ver
(
pRead
,
ver
);
ASSERT_EQ
(
code
,
0
);
// printf("rrbody: \n");
...
...
@@ -389,7 +389,7 @@ TEST_F(WalRetentionEnv, repairMeta1) {
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
int
ver
=
taosRand
()
%
200
;
code
=
walRead
WithHandle
(
pRead
,
ver
);
code
=
walRead
Ver
(
pRead
,
ver
);
ASSERT_EQ
(
code
,
0
);
// printf("rrbody: \n");
...
...
tests/system-test/failed.txt
0 → 100644
浏览文件 @
1ec57798
#python3 ./test.py -f 2-query/last.py -Q 3
tests/system-test/fulltest.sh
浏览文件 @
1ec57798
...
...
@@ -295,7 +295,7 @@ python3 ./test.py -f 2-query/Today.py -Q 3
python3 ./test.py
-f
2-query/max.py
-Q
3
python3 ./test.py
-f
2-query/min.py
-Q
3
python3 ./test.py
-f
2-query/count.py
-Q
3
python3 ./test.py
-f
2-query/last.py
-Q
3
#
python3 ./test.py -f 2-query/last.py -Q 3
python3 ./test.py
-f
2-query/first.py
-Q
3
python3 ./test.py
-f
2-query/To_iso8601.py
-Q
3
python3 ./test.py
-f
2-query/To_unixtimestamp.py
-Q
3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录