revert and remove allocator
This commit is contained in:
parent
3203e8fe42
commit
6bf4614bfa
|
@ -58,15 +58,19 @@ STQ* tqOpen(const char* path, STqCfg* tqConfig, SMemAllocatorFactory* allocFac)
|
||||||
}
|
}
|
||||||
pTq->path = strdup(path);
|
pTq->path = strdup(path);
|
||||||
pTq->tqConfig = tqConfig;
|
pTq->tqConfig = tqConfig;
|
||||||
|
#if 0
|
||||||
pTq->tqMemRef.pAllocatorFactory = allocFac;
|
pTq->tqMemRef.pAllocatorFactory = allocFac;
|
||||||
pTq->tqMemRef.pAllocator = allocFac->create(allocFac);
|
pTq->tqMemRef.pAllocator = allocFac->create(allocFac);
|
||||||
if (pTq->tqMemRef.pAllocator == NULL) {
|
if (pTq->tqMemRef.pAllocator == NULL) {
|
||||||
// TODO: error code of buffer pool
|
// TODO: error code of buffer pool
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
pTq->tqMeta = tqStoreOpen(path, (FTqSerialize)tqSerializeGroup, (FTqDeserialize)tqDeserializeGroup, free, 0);
|
pTq->tqMeta = tqStoreOpen(path, (FTqSerialize)tqSerializeGroup, (FTqDeserialize)tqDeserializeGroup, free, 0);
|
||||||
if (pTq->tqMeta == NULL) {
|
if (pTq->tqMeta == NULL) {
|
||||||
allocFac->destroy(allocFac, pTq->tqMemRef.pAllocator);
|
|
||||||
free(pTq);
|
free(pTq);
|
||||||
|
#if 0
|
||||||
|
allocFac->destroy(allocFac, pTq->tqMemRef.pAllocator);
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ static int vnodeOpenImpl(SVnode *pVnode) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Open TQ
|
// Open TQ
|
||||||
sprintf(dir, "%s/tq", pVnode->path);
|
sprintf(dir, "%s/tq", pVnode->path);
|
||||||
pVnode->pTq = tqOpen(dir, &(pVnode->config.tqCfg), vBufPoolGetMAF(pVnode));
|
pVnode->pTq = tqOpen(dir, &(pVnode->config.tqCfg), vBufPoolGetMAF(pVnode));
|
||||||
if (pVnode->pTq == NULL) {
|
if (pVnode->pTq == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue