Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a8928b04
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看板
提交
a8928b04
编写于
2月 01, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1207
上级
6ca40de9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
18 addition
and
18 deletion
+18
-18
src/inc/tsdb.h
src/inc/tsdb.h
+2
-2
src/inc/tsync.h
src/inc/tsync.h
+2
-2
src/tsdb/src/tsdbCommit.c
src/tsdb/src/tsdbCommit.c
+2
-2
src/tsdb/src/tsdbFS.c
src/tsdb/src/tsdbFS.c
+3
-3
src/tsdb/src/tsdbReadImpl.c
src/tsdb/src/tsdbReadImpl.c
+2
-2
src/tsdb/src/tsdbSync.c
src/tsdb/src/tsdbSync.c
+5
-5
tests/pytest/pytest_1.sh
tests/pytest/pytest_1.sh
+1
-1
tests/pytest/pytest_2.sh
tests/pytest/pytest_2.sh
+1
-1
未找到文件。
src/inc/tsdb.h
浏览文件 @
a8928b04
...
...
@@ -352,8 +352,8 @@ void tsdbIncCommitRef(int vgId);
void
tsdbDecCommitRef
(
int
vgId
);
// For TSDB file sync
int
tsdbSyncSend
(
void
*
pRepo
,
int
socketFd
);
int
tsdbSyncRecv
(
void
*
pRepo
,
int
socketFd
);
int
tsdbSyncSend
(
void
*
pRepo
,
SOCKET
socketFd
);
int
tsdbSyncRecv
(
void
*
pRepo
,
SOCKET
socketFd
);
#ifdef __cplusplus
}
...
...
src/inc/tsync.h
浏览文件 @
a8928b04
...
...
@@ -79,8 +79,8 @@ typedef void (*FStopSyncFile)(int32_t vgId, uint64_t fversion);
// get file version
typedef
int32_t
(
*
FGetVersion
)(
int32_t
vgId
,
uint64_t
*
fver
,
uint64_t
*
vver
);
typedef
int32_t
(
*
FSendFile
)(
void
*
tsdb
,
int32_t
socketFd
);
typedef
int32_t
(
*
FRecvFile
)(
void
*
tsdb
,
int32_t
socketFd
);
typedef
int32_t
(
*
FSendFile
)(
void
*
tsdb
,
SOCKET
socketFd
);
typedef
int32_t
(
*
FRecvFile
)(
void
*
tsdb
,
SOCKET
socketFd
);
typedef
struct
{
int32_t
vgId
;
// vgroup ID
...
...
src/tsdb/src/tsdbCommit.c
浏览文件 @
a8928b04
...
...
@@ -863,7 +863,7 @@ static int tsdbWriteBlockInfo(SCommitH *pCommih) {
return
0
;
}
tlen
=
sizeof
(
SBlockInfo
)
+
sizeof
(
SBlock
)
*
(
nSupBlocks
+
nSubBlocks
)
+
sizeof
(
TSCKSUM
);
tlen
=
(
uint32_t
)(
sizeof
(
SBlockInfo
)
+
sizeof
(
SBlock
)
*
(
nSupBlocks
+
nSubBlocks
)
+
sizeof
(
TSCKSUM
)
);
// Write SBlockInfo part
if
(
tsdbMakeRoom
((
void
**
)(
&
(
TSDB_COMMIT_BUF
(
pCommih
))),
tlen
)
<
0
)
return
-
1
;
...
...
@@ -901,7 +901,7 @@ static int tsdbWriteBlockInfo(SCommitH *pCommih) {
blkIdx
.
uid
=
TABLE_UID
(
pTable
);
blkIdx
.
hasLast
=
pBlock
->
last
?
1
:
0
;
blkIdx
.
maxKey
=
pBlock
->
keyLast
;
blkIdx
.
numOfBlocks
=
nSupBlocks
;
blkIdx
.
numOfBlocks
=
(
uint32_t
)
nSupBlocks
;
blkIdx
.
len
=
tlen
;
blkIdx
.
offset
=
(
uint32_t
)
offset
;
...
...
src/tsdb/src/tsdbFS.c
浏览文件 @
a8928b04
...
...
@@ -484,7 +484,7 @@ void tsdbFSIterInit(SFSIter *pIter, STsdbFS *pfs, int direction) {
if
(
direction
==
TSDB_FS_ITER_FORWARD
)
{
pIter
->
index
=
0
;
}
else
{
pIter
->
index
=
size
-
1
;
pIter
->
index
=
(
int
)(
size
-
1
)
;
}
pIter
->
fid
=
((
SDFileSet
*
)
taosArrayGet
(
pfs
->
cstatus
->
df
,
pIter
->
index
))
->
fid
;
...
...
@@ -507,7 +507,7 @@ void tsdbFSIterSeek(SFSIter *pIter, int fid) {
pIter
->
index
=
-
1
;
pIter
->
fid
=
TSDB_IVLD_FID
;
}
else
{
pIter
->
index
=
TARRAY_ELEM_IDX
(
pfs
->
cstatus
->
df
,
ptr
);
pIter
->
index
=
(
int
)(
TARRAY_ELEM_IDX
(
pfs
->
cstatus
->
df
,
ptr
)
);
pIter
->
fid
=
((
SDFileSet
*
)
ptr
)
->
fid
;
}
}
...
...
@@ -800,7 +800,7 @@ int tsdbLoadMetaCache(STsdbRepo *pRepo, bool recoverMeta) {
return
-
1
;
}
if
(
tsdbRestoreTable
(
pRepo
,
pBuf
,
(
size_
t
)
pRecord
->
size
)
<
0
)
{
if
(
tsdbRestoreTable
(
pRepo
,
pBuf
,
(
in
t
)
pRecord
->
size
)
<
0
)
{
tsdbError
(
"vgId:%d failed to restore table, uid %"
PRId64
", since %s"
PRIu64
,
REPO_ID
(
pRepo
),
pRecord
->
uid
,
tstrerror
(
terrno
));
tfree
(
pBuf
);
...
...
src/tsdb/src/tsdbReadImpl.c
浏览文件 @
a8928b04
...
...
@@ -323,7 +323,7 @@ int tsdbLoadBlockStatis(SReadH *pReadh, SBlock *pBlock) {
return
-
1
;
}
if
(
!
taosCheckChecksumWhole
((
uint8_t
*
)(
pReadh
->
pBlkData
),
size
))
{
if
(
!
taosCheckChecksumWhole
((
uint8_t
*
)(
pReadh
->
pBlkData
),
(
uint32_t
)
size
))
{
terrno
=
TSDB_CODE_TDB_FILE_CORRUPTED
;
tsdbError
(
"vgId:%d block statis part in file %s is corrupted since wrong checksum, offset:%"
PRId64
" len :%"
PRIzu
,
TSDB_READ_REPO_ID
(
pReadh
),
TSDB_FILE_FULL_NAME
(
pDFile
),
(
int64_t
)
pBlock
->
offset
,
size
);
...
...
@@ -487,7 +487,7 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
if
(
tsdbCheckAndDecodeColumnData
(
pDataCol
,
POINTER_SHIFT
(
pBlockData
,
tsize
+
toffset
),
tlen
,
pBlock
->
algorithm
,
pBlock
->
numOfRows
,
pDataCols
->
maxPoints
,
TSDB_READ_COMP_BUF
(
pReadh
),
taosTSizeof
(
TSDB_READ_COMP_BUF
(
pReadh
)))
<
0
)
{
(
int
)
taosTSizeof
(
TSDB_READ_COMP_BUF
(
pReadh
)))
<
0
)
{
tsdbError
(
"vgId:%d file %s is broken at column %d block offset %"
PRId64
" column offset %d"
,
TSDB_READ_REPO_ID
(
pReadh
),
TSDB_FILE_FULL_NAME
(
pDFile
),
tcolId
,
(
int64_t
)
pBlock
->
offset
,
toffset
);
return
-
1
;
...
...
src/tsdb/src/tsdbSync.c
浏览文件 @
a8928b04
...
...
@@ -22,7 +22,7 @@
typedef
struct
{
STsdbRepo
*
pRepo
;
SRtn
rtn
;
int32_t
socketFd
;
SOCKET
socketFd
;
void
*
pBuf
;
bool
mfChanged
;
SMFile
*
pmf
;
...
...
@@ -33,7 +33,7 @@ typedef struct {
#define SYNC_BUFFER(sh) ((sh)->pBuf)
static
void
tsdbInitSyncH
(
SSyncH
*
pSyncH
,
STsdbRepo
*
pRepo
,
int32_t
socketFd
);
static
void
tsdbInitSyncH
(
SSyncH
*
pSyncH
,
STsdbRepo
*
pRepo
,
SOCKET
socketFd
);
static
void
tsdbDestroySyncH
(
SSyncH
*
pSyncH
);
static
int32_t
tsdbSyncSendMeta
(
SSyncH
*
pSynch
);
static
int32_t
tsdbSyncRecvMeta
(
SSyncH
*
pSynch
);
...
...
@@ -49,7 +49,7 @@ static int32_t tsdbSendDFileSetInfo(SSyncH *pSynch, SDFileSet *pSet);
static
int32_t
tsdbRecvDFileSetInfo
(
SSyncH
*
pSynch
);
static
int
tsdbReload
(
STsdbRepo
*
pRepo
,
bool
isMfChanged
);
int32_t
tsdbSyncSend
(
void
*
tsdb
,
int32_t
socketFd
)
{
int32_t
tsdbSyncSend
(
void
*
tsdb
,
SOCKET
socketFd
)
{
STsdbRepo
*
pRepo
=
(
STsdbRepo
*
)
tsdb
;
SSyncH
synch
=
{
0
};
...
...
@@ -78,7 +78,7 @@ _err:
return
-
1
;
}
int32_t
tsdbSyncRecv
(
void
*
tsdb
,
int32_t
socketFd
)
{
int32_t
tsdbSyncRecv
(
void
*
tsdb
,
SOCKET
socketFd
)
{
STsdbRepo
*
pRepo
=
(
STsdbRepo
*
)
tsdb
;
SSyncH
synch
=
{
0
};
...
...
@@ -111,7 +111,7 @@ _err:
return
-
1
;
}
static
void
tsdbInitSyncH
(
SSyncH
*
pSyncH
,
STsdbRepo
*
pRepo
,
int32_t
socketFd
)
{
static
void
tsdbInitSyncH
(
SSyncH
*
pSyncH
,
STsdbRepo
*
pRepo
,
SOCKET
socketFd
)
{
pSyncH
->
pRepo
=
pRepo
;
pSyncH
->
socketFd
=
socketFd
;
tsdbGetRtnSnap
(
pRepo
,
&
(
pSyncH
->
rtn
));
...
...
tests/pytest/pytest_1.sh
浏览文件 @
a8928b04
...
...
@@ -16,7 +16,7 @@ python3 ./test.py -f insert/nchar.py
python3 ./test.py
-f
insert/nchar-unicode.py
python3 ./test.py
-f
insert/multi.py
python3 ./test.py
-f
insert/randomNullCommit.py
python3 insert/retentionpolicy.py
#
python3 insert/retentionpolicy.py
python3 ./test.py
-f
insert/alterTableAndInsert.py
python3 ./test.py
-f
insert/insertIntoTwoTables.py
#python3 ./test.py -f insert/before_1970.py
...
...
tests/pytest/pytest_2.sh
浏览文件 @
a8928b04
# update
python3 ./test.py
-f
update/allow_update.py
#
python3 ./test.py -f update/allow_update.py
python3 ./test.py
-f
update/allow_update-0.py
python3 ./test.py
-f
update/append_commit_data.py
python3 ./test.py
-f
update/append_commit_last-0.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录