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

Josh Elser commented on HBASE-19953:
------------------------------------

{quote}So I think 'Avoid calling post* hook when procedure fails' is not stand 
here, since in 1.x we will call postModifyTable even before the modify process 
finish.
{quote}
This is surprising to me. I thought the code was otherwise. I'll have to take 
another look.
{quote}I think we can revert the change here, otherwise, user will suffer a RPC 
timeout when alter/truncate big tables.
{quote}
Caveat: if they're using the synchronous API, right?
{quote}Last but not least, as mentioned in HBASE-20658, the sync latch will be 
release after prepare state in DDLs like enable/disable other than 
alter/truncate(which only release it after the whole process finish). So there 
is a inconsistency here, we are trying hard to make sure postModifyTable to be 
called only after the whole process finish, but for other post* hooks like 
postEnableTable, they are not.
{quote}
How would we reconcile this? IIRC, our public API states that the call will 
block until the operation is complete. Seems to me that you're suggesting that 
we do not actually adhere to that in all places, nor that we should.

In reality, a synchronous API for DDL operations is super-useful – applications 
can't reasonably proceed to run if an action hasn't completed. So, I'd pose the 
question: how would we know when to say that a DDL operation is "completed 
enough"?

I am -1 on just reverting this. That would break a use-case while fixing 
another – not the right way to solve this. Let's talk through the semantics we 
can reasonably implement and what we need to provide for users. From there, we 
can figure out what we can safely implement.

> 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, 2.0.0
>
>         Attachments: HBASE-19952.001.branch-2.patch, 
> HBASE-19953.002.branch-2.patch, HBASE-19953.003.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)

Reply via email to