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

stack commented on HBASE-20698:
-------------------------------

Looking at the patch again, carrying version in ServerMetrics on every report 
is unavoidable? I remember looking at the Connection and we volunteer version 
on first connect... IIRC. It'd be too hard to get it from there... and connect 
it to ServerManager.  

What is the change at head of MasterRpcServices? We get our own version and 
then report that as the remote servers?

Otherwise, this looks really good. +1 for branch-2.0 too.... 

> Master don't record right server version until new started region server call 
> regionServerReport method
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-20698
>                 URL: https://issues.apache.org/jira/browse/HBASE-20698
>             Project: HBase
>          Issue Type: Bug
>          Components: proc-v2
>    Affects Versions: 2.0.0
>            Reporter: Guanghao Zhang
>            Assignee: Guanghao Zhang
>            Priority: Major
>         Attachments: HBASE-20698.master.001.patch, 
> HBASE-20698.master.002.patch, HBASE-20698.master.003.patch
>
>
> When a new region server started, it will call regionServerStartup first. 
> Master will record this server as a new online server and may dispath 
> RemoteProcedure to the new server. But master only record the server version 
> when the new region server call regionServerReport method. Dispatch a new 
> RemoteProcedure to this new regionserver will fail if version is not right.
> {code:java}
>   @Override
>   protected void remoteDispatch(final ServerName serverName,
>       final Set<RemoteProcedure> remoteProcedures) {
>     final int rsVersion = 
> master.getAssignmentManager().getServerVersion(serverName);
>     if (rsVersion >= RS_VERSION_WITH_EXEC_PROCS) {
>       LOG.trace("Using procedure batch rpc execution for serverName={} 
> version={}",
>         serverName, rsVersion);
>       submitTask(new ExecuteProceduresRemoteCall(serverName, 
> remoteProcedures));
>     } else {
>       LOG.info(String.format(
>         "Fallback to compat rpc execution for serverName=%s version=%s",
>         serverName, rsVersion));
>       submitTask(new CompatRemoteProcedureResolver(serverName, 
> remoteProcedures));
>     }
>   }
> {code}
> The above code use version to resolve compatibility problem. So dispatch will 
> work right for old version region server. But for RefreshPeerProcedure, it is 
> new since hbase 2.0. So RefreshPeerProcedure don't need this. But the new 
> region server version is not right, it will use CompatRemoteProcedureResolver 
> for RefreshPeerProcedure, too. So the RefreshPeerProcedure can't be executed 
> rightly.



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

Reply via email to