[
https://issues.apache.org/jira/browse/HIVE-26555?focusedWorklogId=836559&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-836559
]
ASF GitHub Bot logged work on HIVE-26555:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Jan/23 09:22
Start Date: 03/Jan/23 09:22
Worklog Time Spent: 10m
Work Description: sonarcloud[bot] commented on PR #3614:
URL: https://github.com/apache/hive/pull/3614#issuecomment-1369545254
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)
[0
Bugs](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)
[7 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: 836559)
Time Spent: 1h 50m (was: 1h 40m)
> Read-only mode for Hive database
> --------------------------------
>
> 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: 1h 50m
> Remaining Estimate: 0h
>
> h1. Purpose
> In failover/fail-back scenarios, a Hive database needs to be read-only, while
> other one is writable to keep a single source of truth.
> h1. User-Facing Changes
> Yes. EnforceReadOnlyDatabaseHook class implements ExecuteWithHookContext
> interface. hive.exec.pre.hooks needs to have the class name to initiate an
> instance. The "readonly" database property can be configured to turn it on
> and off.
> h2. Allowed read operations
> All read operations without any data/metadata change are allowed.
> * EXPLAIN
> * USE(or SWITCHDATABASE)
> * REPLDUMP
> * REPLSTATUS
> * EXPORT
> * KILL_QUERY
> * DESC prefix
> * SHOW prefix
> * QUERY with SELECT or EXPLAIN. INSERT, DELETE, UPDATE are disallowed.
> h2. Allowed write operations
> Most of write operations that change data/metadata are disallowed. There are
> few allowed exceptions. The first one is alter database to make a database
> writable. The second one is replication load to load a dumped database.
> * ALTER DATABASE db_name SET DBPROPERTIES without "readonly"="true".
> * REPLLOAD
> h1. Tests
> * read_only_hook.q: USE, SHOW, DESC, DESCRIBE, EXPLAIN, SELECT
> * read_only_delete.q
> * read_only_insert.q
--
This message was sent by Atlassian Jira
(v8.20.10#820010)