[ https://issues.apache.org/jira/browse/HIVE-26555?focusedWorklogId=811222&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811222 ]
ASF GitHub Bot logged work on HIVE-26555: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Sep/22 13:08 Start Date: 22/Sep/22 13:08 Worklog Time Spent: 10m Work Description: sonarcloud[bot] commented on PR #3614: URL: https://github.com/apache/hive/pull/3614#issuecomment-1254999341 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3614) [](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3614&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3614&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3614&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3614&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3614&metric=coverage&view=list) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3614&metric=duplicated_lines_density&view=list) No Duplication information Issue Time Tracking ------------------- Worklog Id: (was: 811222) Time Spent: 20m (was: 10m) > Read-only mode > -------------- > > Key: HIVE-26555 > URL: https://issues.apache.org/jira/browse/HIVE-26555 > Project: Hive > Issue Type: New Feature > Reporter: Teddy Choi > Assignee: Teddy Choi > Priority: Minor > Labels: pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > h1. Purpose > In failover/fail-back scenarios, a Hive instance needs to be read-only, while > other one is writable to keep a single source of truth. > h1. Design > EnforceReadOnlyHiveHook class can implement ExecuteWithHookContext interface. > hive.exec.pre.hooks needs to have the class name to initiate an instance. > "hive.enforce.readonly" can be configured to turn it on and off. > h2. Allowed operations prefixes > * USE(or SWITCHDATABASE) > * SELECT > * DESC > * DESCRIBE > * SET > * EXPLAIN > * ROLLBACK > * KILL > * ABORT > h1. Tests > * read_only_hook.q: USE, SHOW, DESC, DESCRIBE, EXPLAIN, SELECT > * read_only_hook_delete_failure.q > * read_only_hook_insert_failure.q > * read_only_hook_update_failure.q -- This message was sent by Atlassian Jira (v8.20.10#820010)