未验证 提交 3cadc67c 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #10082 from taosdata/hotfix/compatibility_fs_current-D

back compatibility fix for .current
...@@ -128,7 +128,7 @@ _err: ...@@ -128,7 +128,7 @@ _err:
int tsdbApplyRtnOnFSet(STsdbRepo *pRepo, SDFileSet *pSet, SRtn *pRtn) { int tsdbApplyRtnOnFSet(STsdbRepo *pRepo, SDFileSet *pSet, SRtn *pRtn) {
SDiskID did; SDiskID did;
SDFileSet nSet; SDFileSet nSet = {0};
STsdbFS * pfs = REPO_FS(pRepo); STsdbFS * pfs = REPO_FS(pRepo);
int level; int level;
......
...@@ -91,10 +91,8 @@ static int tsdbEncodeDFileSetArray(void **buf, SArray *pArray) { ...@@ -91,10 +91,8 @@ static int tsdbEncodeDFileSetArray(void **buf, SArray *pArray) {
} }
static int tsdbDecodeDFileSetArray(void **originBuf, void *buf, SArray *pArray, SFSHeader *pSFSHeader) { static int tsdbDecodeDFileSetArray(void **originBuf, void *buf, SArray *pArray, SFSHeader *pSFSHeader) {
uint64_t nset; uint64_t nset = 0;
SDFileSet dset;
dset.ver = TSDB_FSET_VER_0; // default value
taosArrayClear(pArray); taosArrayClear(pArray);
buf = taosDecodeFixedU64(buf, &nset); buf = taosDecodeFixedU64(buf, &nset);
...@@ -113,6 +111,7 @@ static int tsdbDecodeDFileSetArray(void **originBuf, void *buf, SArray *pArray, ...@@ -113,6 +111,7 @@ static int tsdbDecodeDFileSetArray(void **originBuf, void *buf, SArray *pArray,
} }
for (size_t i = 0; i < nset; i++) { for (size_t i = 0; i < nset; i++) {
SDFileSet dset = {0}; // ver is TSDB_FSET_VER_0(0) at default
buf = tsdbDecodeDFileSet(buf, &dset, pSFSHeader->version); buf = tsdbDecodeDFileSet(buf, &dset, pSFSHeader->version);
taosArrayPush(pArray, (void *)(&dset)); taosArrayPush(pArray, (void *)(&dset));
} }
......
...@@ -457,7 +457,7 @@ static int32_t tsdbSyncRecvDFileSetArray(SSyncH *pSynch) { ...@@ -457,7 +457,7 @@ static int32_t tsdbSyncRecvDFileSetArray(SSyncH *pSynch) {
// Create local files and copy from remote // Create local files and copy from remote
SDiskID did; SDiskID did;
SDFileSet fset; SDFileSet fset = {0};
tfsAllocDisk(fidLevel, &(did.level), &(did.id)); tfsAllocDisk(fidLevel, &(did.level), &(did.id));
if (did.level == TFS_UNDECIDED_LEVEL) { if (did.level == TFS_UNDECIDED_LEVEL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册