liyang commented on KYLIN-2105:
[~gaodayue], sorry for being picky, but I really don't like the long query ID.
It looks ugly from a cleanliness point of view.
Personally, I think the 'project' and timestamp are not good elements of query
ID. Project is user input, it can be arbitrarily long and could pollute the
logs all over. A potential injection point if it is part of query ID. Timestamp
on the other hand is redundant information. Every line of log already has
timestamp, including the line where query ID is generated.
Six random chars are good.
(I'm making some review changes on top of the commit. We can settle the Query
ID format again after reaching consensus.)
> add QueryId
> Key: KYLIN-2105
> URL: https://issues.apache.org/jira/browse/KYLIN-2105
> Project: Kylin
> Issue Type: Sub-task
> Components: Query Engine, Storage - HBase
> Affects Versions: v1.6.0
> Reporter: Dayue Gao
> Assignee: Dayue Gao
> Labels: patch
> Fix For: v1.6.0
> * for each query, generate an unique id.
> * the id could describe some context information about the query, like start
> time, project name, etc.
> * for query thread, we could use query id as the name of the thread. As long
> as user logs thread's name, he can grep query log by query id afterwards.
> * pass query id to coprocessor, so that query id gets logged both in query
> server and region server.
> * BadQueryDetector should also log query id
This message was sent by Atlassian JIRA