提交 097f168a 编写于 作者: Z zhihaop

fix: remove dispatcherTryBatching to dispatcherTryDispatch

上级 a4013985
...@@ -111,13 +111,13 @@ void destroyAsyncDispatcher(SAsyncBulkWriteDispatcher* dispatcher); ...@@ -111,13 +111,13 @@ void destroyAsyncDispatcher(SAsyncBulkWriteDispatcher* dispatcher);
bool tscSupportBulkInsertion(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql); 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. * will merge the SSqlObj* in the buffer and send them to the vnodes.
* *
* @param pSql the insert statement to offer. * @param pSql the insert statement to offer.
* @return if offer success, returns true. * @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 * A holder of SAsyncBulkWriteDispatcher. Call dispatcherAcquire(...) to get the SAsyncBulkWriteDispatcher
......
...@@ -399,7 +399,7 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* para ...@@ -399,7 +399,7 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* para
if (tscDispatcher != NULL) { if (tscDispatcher != NULL) {
SAsyncBulkWriteDispatcher* dispatcher = dispatcherAcquire(tscDispatcher); SAsyncBulkWriteDispatcher* dispatcher = dispatcherAcquire(tscDispatcher);
if (dispatcherTryBatching(dispatcher, pSql)) { if (dispatcherTryDispatch(dispatcher, pSql)) {
taosReleaseRef(tscObjRef, pSql->self); taosReleaseRef(tscObjRef, pSql->self);
tscDebug("sql obj %p has been buffer in insert buffer", pSql); tscDebug("sql obj %p has been buffer in insert buffer", pSql);
return; return;
......
...@@ -445,7 +445,7 @@ bool tscSupportBulkInsertion(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSq ...@@ -445,7 +445,7 @@ bool tscSupportBulkInsertion(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSq
return true; return true;
} }
bool dispatcherTryBatching(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql) { bool dispatcherTryDispatch(SAsyncBulkWriteDispatcher* dispatcher, SSqlObj* pSql) {
if (atomic_load_8(&dispatcher->shutdown)) { if (atomic_load_8(&dispatcher->shutdown)) {
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册