diff --git a/src/inc/query.h b/src/inc/query.h index ccff05bc1be0bca05e83b9ad89a4ded7f018867a..ec1e458b628a60f0db86a48e9da9af7257454ed2 100644 --- a/src/inc/query.h +++ b/src/inc/query.h @@ -40,9 +40,6 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryTableMs */ bool qTableQuery(qinfo_t qinfo); -void* pGetRspMsg(qinfo_t qinfo); - - /** * Retrieve the produced results information, if current query is not paused or completed, * this function will be blocked to wait for the query execution completed or paused, @@ -65,6 +62,11 @@ int32_t qRetrieveQueryResultInfo(qinfo_t qinfo, bool* buildRes, void* pRspContex */ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp** pRsp, int32_t* contLen, bool* continueExec); +/** + * + * @param qinfo + * @return + */ void* qGetResultRetrieveMsg(qinfo_t qinfo); /** @@ -85,7 +87,7 @@ void qQueryMgmtNotifyClosed(void* pExecutor); void qCleanupQueryMgmt(void* pExecutor); void** qRegisterQInfo(void* pMgmt, uint64_t qInfo); void** qAcquireQInfo(void* pMgmt, uint64_t key); -void** qReleaseQInfo(void* pMgmt, void* pQInfo, bool needFree); +void** qReleaseQInfo(void* pMgmt, void* pQInfo, bool freeHandle); #ifdef __cplusplus } diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index ea0312b875567cf120256da548217849237123d1..704a383be2da8e054f0a124ff82c05ec975f9e18 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -6749,14 +6749,14 @@ void** qAcquireQInfo(void* pMgmt, uint64_t key) { } } -void** qReleaseQInfo(void* pMgmt, void* pQInfo, bool needFree) { +void** qReleaseQInfo(void* pMgmt, void* pQInfo, bool freeHandle) { SQueryMgmt *pQueryMgmt = pMgmt; if (pQueryMgmt->qinfoPool == NULL) { return NULL; } - taosCacheRelease(pQueryMgmt->qinfoPool, pQInfo, needFree); + taosCacheRelease(pQueryMgmt->qinfoPool, pQInfo, freeHandle); return 0; } diff --git a/src/query/tests/resultBufferTest.cpp b/src/query/tests/resultBufferTest.cpp index 3b74bf1b643d127ab10591242182ccbf414b0c3d..e9611a3232de4a8c442ca3985a2c447b091bc981 100644 --- a/src/query/tests/resultBufferTest.cpp +++ b/src/query/tests/resultBufferTest.cpp @@ -10,7 +10,7 @@ namespace { // simple test void simpleTest() { SDiskbasedResultBuf* pResultBuf = NULL; - int32_t ret = createDiskbasedResultBuffer(&pResultBuf, 1000, 64, 1024, 4, NULL); + int32_t ret = createDiskbasedResultBuffer(&pResultBuf, 64, 1024, 4096, NULL); int32_t pageId = 0; int32_t groupId = 0; @@ -52,7 +52,7 @@ void simpleTest() { void writeDownTest() { SDiskbasedResultBuf* pResultBuf = NULL; - int32_t ret = createDiskbasedResultBuffer(&pResultBuf, 1000, 64, 1024, 4, NULL); + int32_t ret = createDiskbasedResultBuffer(&pResultBuf, 64, 1024, 4*1024, NULL); int32_t pageId = 0; int32_t writePageId = 0; @@ -99,7 +99,7 @@ void writeDownTest() { void recyclePageTest() { SDiskbasedResultBuf* pResultBuf = NULL; - int32_t ret = createDiskbasedResultBuffer(&pResultBuf, 1000, 64, 1024, 4, NULL); + int32_t ret = createDiskbasedResultBuffer(&pResultBuf, 64, 1024, 4*1024, NULL); int32_t pageId = 0; int32_t writePageId = 0;