[ https://issues.apache.org/jira/browse/HBASE-19953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16367893#comment-16367893 ]
Josh Elser commented on HBASE-19953: ------------------------------------ {quote}Only have been paying half-attention. You are putting in place a blocking latch for all DDL? Downside of calling post on fail ? The CP doesn't know the op failed? {quote} Right, the 1.x post semantics were that it would only get called when the operation was successful. In 2.0, this means that, because the pre-conditional checks that are done (e.g. can't delete a namespace that doesn't exist) don't fire and fail until after we already called the hook which results in the post hook getting called all the time. The manifestation of this was Apache Atlas was getting audit events for things that didn't actually happen which is no good. The easiest fix without rewriting a bunch is to use the blocking latch, but a more "elegant" (maybe just complicated) solution would be to push the post-hook call down into the Procedure implementation itself so that we can release the client RPC thread. I don't think either is super critical since all of these preparatory checks are fast. > Avoid calling post* hook when procedure fails > --------------------------------------------- > > Key: HBASE-19953 > URL: https://issues.apache.org/jira/browse/HBASE-19953 > Project: HBase > Issue Type: Bug > Components: master, proc-v2 > Reporter: Ramesh Mani > Assignee: Josh Elser > Priority: Critical > Fix For: 2.0.0-beta-2 > > Attachments: HBASE-19952.001.branch-2.patch, > HBASE-19953.002.branch-2.patch > > > Ramesh pointed out a case where I think we're mishandling some post\* > MasterObserver hooks. Specifically, I'm looking at the deleteNamespace. > We synchronously execute the DeleteNamespace procedure. When the user > provides a namespace that isn't empty, the procedure does a rollback (which > is just a no-op), but this doesn't propagate an exception up to the > NonceProcedureRunnable in {{HMaster#deleteNamespace}}. It took Ramesh > pointing it out a bit better to me that the code executes a bit differently > than we actually expect. > I think we need to double-check our post hooks and make sure we aren't > invoking them when the procedure actually failed. cc/ [~Apache9], [~stack]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)