commit 4a59005: [Minor] Empty reply == success in CH universe

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Apr 15 19:28:07 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-15 17:40:07 +0100
URL: https://github.com/rspamd/rspamd/commit/4a59005fec39461c019256a027c1d6279636ca3f

[Minor] Empty reply == success in CH universe

---
 lualib/lua_clickhouse.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua
index 7064ac925..99865e6ee 100644
--- a/lualib/lua_clickhouse.lua
+++ b/lualib/lua_clickhouse.lua
@@ -116,8 +116,8 @@ local function parse_clickhouse_response_json(params, data)
   local ucl = require "ucl"
 
   if data == nil then
-    -- clickhouse returned no data (i.e. empty result set): exiting
-    return 'no data', {}
+    -- clickhouse returned no data (i.e. empty result set) considered valid!
+    return nil, {}
   end
 
   if data:match('DB::Exception') then


More information about the Commits mailing list