fix a bug
This commit is contained in:
parent
5abb8224cf
commit
e687b4c7a1
|
@ -165,7 +165,7 @@ static int tsdbAddDFileSetToStatus(SFSStatus *pStatus, const SDFileSet *pSet) {
|
||||||
ASSERT(TSDB_FILE_CLOSED(&(pSet->files[1])));
|
ASSERT(TSDB_FILE_CLOSED(&(pSet->files[1])));
|
||||||
ASSERT(TSDB_FILE_CLOSED(&(pSet->files[2])));
|
ASSERT(TSDB_FILE_CLOSED(&(pSet->files[2])));
|
||||||
|
|
||||||
if (taosArrayPush(pStatus->df, (void *)pStatus) == NULL) {
|
if (taosArrayPush(pStatus->df, (void *)pSet) == NULL) {
|
||||||
terrno = TSDB_CODE_TDB_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_TDB_OUT_OF_MEMORY;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,6 +409,7 @@ void tsdbInitDFileSetEx(SDFileSet *pSet, SDFileSet *pOSet) {
|
||||||
int tsdbEncodeDFileSet(void **buf, SDFileSet *pSet) {
|
int tsdbEncodeDFileSet(void **buf, SDFileSet *pSet) {
|
||||||
int tlen = 0;
|
int tlen = 0;
|
||||||
|
|
||||||
|
tlen += taosEncodeFixedI32(buf, pSet->fid);
|
||||||
for (TSDB_FILE_T ftype = 0; ftype < TSDB_FILE_MAX; ftype++) {
|
for (TSDB_FILE_T ftype = 0; ftype < TSDB_FILE_MAX; ftype++) {
|
||||||
tlen += tsdbEncodeSDFile(buf, TSDB_DFILE_IN_SET(pSet, ftype));
|
tlen += tsdbEncodeSDFile(buf, TSDB_DFILE_IN_SET(pSet, ftype));
|
||||||
}
|
}
|
||||||
|
@ -417,6 +418,10 @@ int tsdbEncodeDFileSet(void **buf, SDFileSet *pSet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void *tsdbDecodeDFileSet(void *buf, SDFileSet *pSet) {
|
void *tsdbDecodeDFileSet(void *buf, SDFileSet *pSet) {
|
||||||
|
int32_t fid;
|
||||||
|
|
||||||
|
buf = taosDecodeFixedI32(buf, &(fid));
|
||||||
|
pSet->fid = fid;
|
||||||
for (TSDB_FILE_T ftype = 0; ftype < TSDB_FILE_MAX; ftype++) {
|
for (TSDB_FILE_T ftype = 0; ftype < TSDB_FILE_MAX; ftype++) {
|
||||||
buf = tsdbDecodeSDFile(buf, TSDB_DFILE_IN_SET(pSet, ftype));
|
buf = tsdbDecodeSDFile(buf, TSDB_DFILE_IN_SET(pSet, ftype));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue