fix stream snap deadlock
This commit is contained in:
parent
b6005d6183
commit
77542cc461
|
@ -65,8 +65,8 @@ typedef struct {
|
||||||
rocksdb_compactionfilterfactory_t* filterFactory;
|
rocksdb_compactionfilterfactory_t* filterFactory;
|
||||||
TdThreadMutex mutex;
|
TdThreadMutex mutex;
|
||||||
char* idstr;
|
char* idstr;
|
||||||
int64_t refId;
|
|
||||||
char* path;
|
char* path;
|
||||||
|
int64_t refId;
|
||||||
|
|
||||||
int64_t chkpId;
|
int64_t chkpId;
|
||||||
SArray* chkpSaved;
|
SArray* chkpSaved;
|
||||||
|
|
|
@ -237,8 +237,9 @@ void* streamMetaGetBackendByTaskKey(SStreamMeta* pMeta, char* key, int64_t chkpI
|
||||||
taosThreadMutexUnlock(&pMeta->backendMutex);
|
taosThreadMutexUnlock(&pMeta->backendMutex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
int64_t tref = taosAddRef(taskDbWrapperId, pBackend);
|
||||||
*ref = taosAddRef(taskDbWrapperId, pBackend);
|
*ref = tref;
|
||||||
|
((STaskDbWrapper*)pBackend)->refId = tref;
|
||||||
|
|
||||||
taosHashPut(pMeta->pTaskDbUnique, key, strlen(key), &pBackend, sizeof(void*));
|
taosHashPut(pMeta->pTaskDbUnique, key, strlen(key), &pBackend, sizeof(void*));
|
||||||
taosThreadMutexUnlock(&pMeta->backendMutex);
|
taosThreadMutexUnlock(&pMeta->backendMutex);
|
||||||
|
@ -824,8 +825,6 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
||||||
|
|
||||||
taosArrayPush(pMeta->pTaskList, &pTask->id);
|
taosArrayPush(pMeta->pTaskList, &pTask->id);
|
||||||
} else {
|
} else {
|
||||||
tdbFree(pKey);
|
|
||||||
tdbFree(pVal);
|
|
||||||
taosMemoryFree(pTask);
|
taosMemoryFree(pTask);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue