commit 3b3cfea: [Minor] Clickhouse: Send rows exactly when limit is reached

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 23 14:49:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-23 15:44:04 +0100
URL: https://github.com/rspamd/rspamd/commit/3b3cfea31daf6d4572d819a624a6ea7ee6cd2e92 (HEAD -> master)

[Minor] Clickhouse: Send rows exactly when limit is reached

---
 src/plugins/lua/clickhouse.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua
index 7482da01e..c3be9e2d9 100644
--- a/src/plugins/lua/clickhouse.lua
+++ b/src/plugins/lua/clickhouse.lua
@@ -745,7 +745,7 @@ local function clickhouse_collect(task)
   table.insert(data_rows, row)
   lua_util.debugm(N, task, "add clickhouse row %s / %s", nrows, settings.limit)
 
-  if nrows > settings['limit'] then
+  if nrows >= settings['limit'] then
     clickhouse_send_data(task)
     nrows = 0
     data_rows = {}


More information about the Commits mailing list