phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5034) Log all critical statements in SYSTEM.LOG table.
Date Mon, 03 Dec 2018 16:37:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-5034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16707490#comment-16707490
] 

Josh Elser commented on PHOENIX-5034:
-------------------------------------

{quote}I suggest you to use {{CompilableStatement stmt = parseStatement(sql);}} and use {{instanceOf}}
to compare the type of statement with DropTable or AlterTable statement. 
{quote}
Agreed. Is a smell to be looking at the SQL instead of the result from parsing.
{quote}It's good to always log critical statements such as "DROP" or "ALTER" statements.
{quote}
I can see the value in this, using SYSTEM.LOG as an "audit" log. It also seems like a good
idea to also include some column to differentiate between DML and DDL statements when scanning
the SYSTEM.LOG table (filtering on them seems like a common ask). That may be a good "follow-on"
item :)

> Log all critical statements in SYSTEM.LOG table.
> ------------------------------------------------
>
>                 Key: PHOENIX-5034
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5034
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Xu Cang
>            Assignee: Xu Cang
>            Priority: Minor
>         Attachments: PHOENIX-5034-4.x-HBase-1.3.001.patch, PHOENIX-5034-4.x-HBase-1.3.002.patch,
PHOENIX-5034-4.x-HBase-1.3.003.patch, PHOENIX-5034-4.x-HBase-1.3.004.patch
>
>
> In production, sometimes engineers see table got dropped unexpectedly. It's not easy
to SCAN raw table from HBase itself to understand what happened and when the table get dropped.
> Since we already have SYSTEM.LOG query log facility in Phoenix that sampling query statement
(log 1% statement by default). It's good to always log critical statements such as "DROP"
or "ALTER" statements.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message