fix invalid cmp
This commit is contained in:
parent
1531e2d7d3
commit
a0fd56c84f
|
@ -93,7 +93,7 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandF
|
|||
taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_ENTRY_LOCK);
|
||||
pMeta->chkpSaved = taosArrayInit(4, sizeof(int64_t));
|
||||
pMeta->chkpInUse = taosArrayInit(4, sizeof(int64_t));
|
||||
pMeta->chkpCap = 8;
|
||||
pMeta->chkpCap = 2;
|
||||
taosInitRWLatch(&pMeta->chkpDirLock);
|
||||
|
||||
int64_t chkpId = streamGetLatestCheckpointId(pMeta);
|
||||
|
@ -142,11 +142,11 @@ int32_t streamMetaReopen(SStreamMeta* pMeta, int64_t chkpId) {
|
|||
pMeta->streamBackendRid = -1;
|
||||
pMeta->streamBackend = NULL;
|
||||
|
||||
char* defaultPath = taosMemoryCalloc(1, strlen(pMeta->path) + 64);
|
||||
char* defaultPath = taosMemoryCalloc(1, strlen(pMeta->path) + 128);
|
||||
sprintf(defaultPath, "%s%s%s", pMeta->path, TD_DIRSEP, "state");
|
||||
taosRemoveDir(defaultPath);
|
||||
|
||||
char* newPath = taosMemoryCalloc(1, strlen(pMeta->path) + 64);
|
||||
char* newPath = taosMemoryCalloc(1, strlen(pMeta->path) + 128);
|
||||
sprintf(newPath, "%s%s%s", pMeta->path, TD_DIRSEP, "received");
|
||||
|
||||
int32_t code = taosStatFile(newPath, NULL, NULL, NULL);
|
||||
|
@ -155,7 +155,7 @@ int32_t streamMetaReopen(SStreamMeta* pMeta, int64_t chkpId) {
|
|||
code = taosRenameFile(newPath, defaultPath);
|
||||
if (code != 0) {
|
||||
terrno = TAOS_SYSTEM_ERROR(code);
|
||||
qError("vgId:%d failed to rename file, from %s to %s, code:%s", newPath, defaultPath, pMeta->vgId,
|
||||
qError("vgId:%d failed to rename file, from %s to %s, code:%s", pMeta->vgId, newPath, defaultPath,
|
||||
tstrerror(terrno));
|
||||
|
||||
taosMemoryFree(defaultPath);
|
||||
|
|
Loading…
Reference in New Issue