Skip to content

Commit

Permalink
[Minor] Clickhouse: Send rows exactly when limit is reached
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Apr 23, 2019
1 parent babeb8b commit 3b3cfea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/lua/clickhouse.lua
Expand Up @@ -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 = {}
Expand Down

0 comments on commit 3b3cfea

Please sign in to comment.