From 097f168aa8c30285019b3b115ff972d20669ca6b Mon Sep 17 00:00:00 2001 From: zhihaop Date: Sun, 18 Sep 2022 19:10:03 +0800 Subject: [PATCH] fix: remove dispatcherTryBatching to dispatcherTryDispatch --- src/client/inc/tscBulkWrite.h | 4 ++-- src/client/src/tscAsync.c | 2 +- src/client/src/tscBulkWrite.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/inc/tscBulkWrite.h b/src/client/inc/tscBulkWrite.h index 92fcc19f22..f83b9d33c4 100644 --- a/src/client/inc/tscBulkWrite.h +++ b/src/client/inc/tscBulkWrite.h @@ -111,13 +111,13 @@ void destroyAsyncDispatcher(SAsyncBulkWriteDispatcher* dispatcher); bool tscSupportBulkInsertion(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql); /** - * Try to offer the SSqlObj* to the buffer. If the number of row reach `asyncBatchSize`, the function + * Try to offer the SSqlObj* to the dispatcher. If the number of row reach `batchSize`, the function * will merge the SSqlObj* in the buffer and send them to the vnodes. * * @param pSql the insert statement to offer. * @return if offer success, returns true. */ -bool dispatcherTryBatching(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql); +bool dispatcherTryDispatch(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql); /** * A holder of SAsyncBulkWriteDispatcher. Call dispatcherAcquire(...) to get the SAsyncBulkWriteDispatcher diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index 4d0d41a6e2..8e05ea73a5 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -399,7 +399,7 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* para if (tscDispatcher != NULL) { SAsyncBulkWriteDispatcher* dispatcher = dispatcherAcquire(tscDispatcher); - if (dispatcherTryBatching(dispatcher, pSql)) { + if (dispatcherTryDispatch(dispatcher, pSql)) { taosReleaseRef(tscObjRef, pSql->self); tscDebug("sql obj %p has been buffer in insert buffer", pSql); return; diff --git a/src/client/src/tscBulkWrite.c b/src/client/src/tscBulkWrite.c index 33bb37f0f3..ad03072cc5 100644 --- a/src/client/src/tscBulkWrite.c +++ b/src/client/src/tscBulkWrite.c @@ -445,7 +445,7 @@ bool tscSupportBulkInsertion(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSq return true; } -bool dispatcherTryBatching(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql) { +bool dispatcherTryDispatch(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql) { if (atomic_load_8(&dispatcher->shutdown)) { return false; } -- GitLab