Invalid query crashes plyql server + possible caching issues
l15k4 opened this issue · 1 comments
l15k4 commented
Hey,
An invalid query was issued to plyql server from imply data distribution 1.2.1 :
plyql -c 2 -h broker:8082 -i P2Y --json-server 8099
which crashed it :
/usr/local/lib/node_modules/plyql/node_modules/q/q.js:155
throw e;
^
Error: can not serialize an approximate unique value
at UniqueAttributeInfo.serialize (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:715:19)
at DruidExternal.makeSelectorFilter (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:3779:38)
at DruidExternal.timelessFilterToDruid (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:3833:37)
at DruidExternal.timelessFilterToDruid (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:3823:37)
at DruidExternal.makeNativeAggregateFilter (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:4534:30)
at DruidExternal.applyToAggregation (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:4686:36)
at DruidExternal.getAggregationsAndPostAggregations (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:4701:22)
at DruidExternal.getQueryAndPostProcess (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:4978:64)
at DruidExternal.External.queryValue (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:3170:48)
at ExternalExpression._computeResolved (/usr/local/lib/node_modules/plyql/node_modules/plywood/build/plywood.js:6788:29)
It was just count
query like this :
curl -X POST 'http://host/plyql' -H 'content-type: application/json' -d '{ "sql": "SELECT COUNT(bar) FROM baz" }'
bar
is hll field
Isn't this a really critical bug? Server being crashed by such a common query ?
Also what is strange about it is that I was investigating why all of a sudden plyql-server
returns empty results which should not be empty. And right after plyql-server
docker container restarted it was all good again.
vogievetsky commented
Wops forgot to update the issue. This has been fixed a long time ago. Should be returning a meaningful error now.