enh: added memory allocators for parser and planner
This commit is contained in:
parent
2f475399a6
commit
a914816ce7
|
@ -250,7 +250,6 @@ typedef struct SRequestObj {
|
|||
bool inRetry;
|
||||
uint32_t prevCode; // previous error code: todo refactor, add update flag for catalog
|
||||
uint32_t retry;
|
||||
// SNodeAllocator* pNodeAllocator;
|
||||
int64_t allocatorRefId;
|
||||
} SRequestObj;
|
||||
|
||||
|
|
|
@ -288,6 +288,7 @@ void *createRequest(uint64_t connId, int32_t type) {
|
|||
|
||||
pRequest->body.resInfo.convertUcs4 = true; // convert ucs4 by default
|
||||
pRequest->type = type;
|
||||
pRequest->allocatorRefId = -1;
|
||||
|
||||
pRequest->pDb = getDbOfConnection(pTscObj);
|
||||
pRequest->pTscObj = pTscObj;
|
||||
|
|
|
@ -153,14 +153,14 @@ int32_t nodesCreateAllocator(int32_t chunkSize, int64_t* pRefId) {
|
|||
}
|
||||
|
||||
void nodesDestroyAllocator(int64_t refId) {
|
||||
if (refId < 0) {
|
||||
if (refId <= 0) {
|
||||
return;
|
||||
}
|
||||
taosReleaseRef(allocatorReqRefPool, refId);
|
||||
}
|
||||
|
||||
void nodesResetAllocator(int64_t refId) {
|
||||
if (refId < 0) {
|
||||
if (refId <= 0) {
|
||||
pNodeAllocator = NULL;
|
||||
} else {
|
||||
pNodeAllocator = taosAcquireRef(allocatorReqRefPool, refId);
|
||||
|
@ -169,7 +169,7 @@ void nodesResetAllocator(int64_t refId) {
|
|||
}
|
||||
|
||||
int64_t nodesIncAllocatorRefCount(int64_t refId) {
|
||||
if (refId < 0) {
|
||||
if (refId <= 0) {
|
||||
return -1;
|
||||
}
|
||||
SNodeAllocator* pAllocator = taosAcquireRef(allocatorReqRefPool, refId);
|
||||
|
|
Loading…
Reference in New Issue