hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15071) Cleanup bypass semantic in MasterCoprocessorHost
Date Thu, 07 Jan 2016 03:20:40 GMT

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

Heng Chen commented on HBASE-15071:
-----------------------------------

Currently, the usages of bypass in MasterCoprocessorHost:
 * we ignore 'bypass' and comment it in JavaDoc,  e.g. preListSnapshot/deleteTable/truncateTable
 * skip the default action and return something arbitrary.  e.g. deleteColumn/addColumn (it
return -1, not a procedure id),  getNamespaces/listTableDescriptors (it return empty list)
 * skip the default action and throw exception.  e.g. deleteNamespace/createNamespace/modifyNamespace
 * skip default action and return nothing when caller has nothing to return.   e.g. preMove/
 * skip the default action and return the coprocessor's returned value. e.g. preBalanceSwitch
(the implementation has some trick)

IMO 2,3 contravenes semantic of 'bypass',  we could unify them firstly.  As [~stack] and [~mbertozzi]
suggestion,  some methods could just ignore 'bypass',  wdyt?

{quote}
There are others including the one where CP says bypass and then we return an empty response
when what is probably intended is that we somehow return a response from CP's pre-call (only
in most cases, there is no mechanism to do so).
{quote}
And as [~stack] mentioned above,  if we want keep the semantic of 'bypass', we also need a
mechanism to return pre-call response to client.  This is the 5th situation.



> Cleanup bypass semantic in MasterCoprocessorHost
> ------------------------------------------------
>
>                 Key: HBASE-15071
>                 URL: https://issues.apache.org/jira/browse/HBASE-15071
>             Project: HBase
>          Issue Type: Task
>          Components: Coprocessors
>    Affects Versions: 2.0.0
>            Reporter: stack
>            Priority: Blocker
>
> Lets decide on this one before we release 2.0.0.
> A bunch of methods in MasterCoprocessorHost on the 'pre' step allow returning true which
indicates the method invocation is not to proceed.
> Not all 'pre' steps do this. Just some.
> Seems a little arbitrary.
> How we skip out if we are not proceed with the invocation is also a little arbitrary.
> When a deleteColumn call is supposed to skip out, it returns a -1, a non-procId. If we
are to skip a balance call, we log that CP said skip and then return false to indicate the
balancer did not run (why?). Elsewhere we just exit silently. In createNamespace we used to
exit silently but HBASE-14888 just changed it so we throw a BypassCoprocessorException instead...

> Lets make them all work the same way.
> (This issue comes of chat w/ Matteo)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message