[
https://issues.apache.org/jira/browse/HIVE-29170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
László Bodor resolved HIVE-29170.
---------------------------------
Resolution: Fixed
> Restrict the Query History service from being modified at the session level
> ---------------------------------------------------------------------------
>
> Key: HIVE-29170
> URL: https://issues.apache.org/jira/browse/HIVE-29170
> Project: Hive
> Issue Type: Bug
> Affects Versions: 4.1.0
> Reporter: László Bodor
> Assignee: László Bodor
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> we should not allow this on session level:
> {code}
> set hive.query.history.enabled=true
> set hive.query.history.enabled=false
> {code}
> the service is initialized on HS2 startup, so this doesn't make sense and
> it's problematic in 2 ways:
> 1. originally false, and user tries to set it to true, this exception is hit:
> https://github.com/apache/hive/blob/1d6179dbff10d3594c31e319cdde2e7d2e08136b/ql/src/java/org/apache/hadoop/hive/ql/queryhistory/QueryHistoryService.java#L130
> {code}
> QueryHistoryService is not present when asked for the singleton instance
> {code}
> 2. originally true and user trues to set it to false:
> undefined behavior, or even worse, query history is turned off manually
> (which compromises transparency), because this codepath is hit:
> https://github.com/apache/hive/blob/1d6179dbff10d3594c31e319cdde2e7d2e08136b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L776
--
This message was sent by Atlassian Jira
(v8.20.10#820010)