apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.64k stars 3.26k forks source link

Doris 普通账户给sql设置 traceId, 不能用这个账户获取queryID,要用root账户就才能获取queryID[Bug] #20847

Open lovingfeel opened 1 year ago

lovingfeel commented 1 year ago

Search before asking

Version

版本 selectdb_doris_1.2.0.1-x86_64-avx2

What's Wrong?

先用dwbuilder_dev账号 执行 了如下两个命令:

set session_context= "trace_id:653234" select sleep(1000) ; 再发送http get请求 http://xxxx:8050/rest/v2/manager/query/trace_id/653234 去获取queryID, 用普通账户dwbuilder_dev 获取的结果: {“msg”:“Bad Request”,“code”:403,“data”:“not found query id”,“count”:0}

用root账户 就能获取到正确的结果,如下所示,这是bug吗 {“msg”:“success”,“code”:0,“data”:“e59c658bc1cd4a3a-9d8fc9e8036b95a7”,“count”:0}

What You Expected?

希望普通账户dwbuilder_dev 能用trace_id 获取到queryID,而不是用root账户

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

hechao-ustc commented 1 year ago

你应该需要给普通账户添加相关的权限,可以看下这个文档:https://doris.apache.org/zh-CN/docs/dev/admin-manual/privilege-ldap/user-privilege