diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index b547905008de406820ab2d153dda5ac9d2930a50..8ec23757d1b7787091f9a1d242eb2023cfb7f243 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -311,11 +311,11 @@ keepColumnName 1 # unit Hour. Latency of data migration # keepTimeOffset 0 -# enable thread local write batching. -# writeBatchThreadLocal 0 +# taosc write batch size, maximum 4096, suggested value 64 ~ 512, default 0, 0 means disable write batching. +# writeBatchSize 0 -# taosc write batch size, maximum 4096, 0 means disabled write batching. suggesting value: 64 ~ 512. -# writeBatchSize 96 +# taosc write batch timeout in milliseconds, maximum 2048, suggested value 2 ~ 100, default 10. +# writeBatchTimeout 10 -# taosc write batch timeout in milliseconds, maximum 2048. suggesting value: 2 ~ 100. -# writeBatchTimeout 10 \ No newline at end of file +# using thread local write batching. this option is not available when writeBatchSize = 0.::: +# writeBatchThreadLocal 0 \ No newline at end of file diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index 232de38f9f9dd5287f2dadf99f2b57c04607de8c..a61859dd5925dcf065964c07f4be2501c1cab77a 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -411,7 +411,7 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* para // TODO return the correct error code to client in tscQueueAsyncError void taos_query_a(TAOS *taos, const char *sqlstr, __async_cb_func_t fp, void *param) { - taos_query_ra(taos, sqlstr, fp, param, true); + taos_query_ra(taos, sqlstr, fp, param, tsWriteBatchSize > 0); } TAOS_RES * taos_query_ra(TAOS *taos, const char *sqlstr, __async_cb_func_t fp, void *param, bool enableBatch) { diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 7dbca7977c8f5cfdf6be25e8de7a5eaffaefb5b4..5ae4b97d794f4462c088a7c768a7c24b9ec1938d 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -129,7 +129,7 @@ int64_t tsMaxRetentWindow = 24 * 3600L; // maximum time window tolerance // The tsc async write batching feature (using ABWD). bool tsWriteBatchThreadLocal = false; // if thread local enable, each thread will allocate a dispatcher. -int32_t tsWriteBatchSize = 96; // suggest: 64 - 512, 0 means disable batching. +int32_t tsWriteBatchSize = 0; // suggest: 64 - 512, default 0, 0 means disable batching. int32_t tsWriteBatchTimeout = 10; // suggest: 2 - 100 (unit: milliseconds) // the maximum allowed query buffer size during query processing for each data node.