You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (Created) (JIRA)" <ji...@apache.org> on 2011/11/12 01:52:51 UTC

[jira] [Created] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Write back to client 'incompatible' if we show up with wrong version
--------------------------------------------------------------------

                 Key: HBASE-4777
                 URL: https://issues.apache.org/jira/browse/HBASE-4777
             Project: HBase
          Issue Type: Bug
            Reporter: stack


We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.

Returning -1 as id up out of here is what causes the connection close:

{code}
    private void setupBadVersionResponse(int clientVersion) throws IOException {
      String errMsg = "Server IPC version " + CURRENT_VERSION +
      " cannot communicate with client version " + clientVersion;
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();

      if (clientVersion >= 3) {
        Call fakeCall =  new Call(-1, null, this, responder);
        // Versions 3 and greater can interpret this exception
        // response in the same manner
        setupResponse(buffer, fakeCall, Status.FATAL,
            null, VersionMismatch.class.getName(), errMsg);

        responder.doRespond(fakeCall);
      }
    }
{code}

Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.

Suggestion is that we return a 0 for the id.... the connection will stay up.

If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.

Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.

(There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149235#comment-13149235 ] 

Hudson commented on HBASE-4777:
-------------------------------

Integrated in HBase-TRUNK #2432 (See [https://builds.apache.org/job/HBase-TRUNK/2432/])
    HBASE-4777 Write back to client 'incompatible' if we show up with wrong version

stack : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java

                
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.92.0
>
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "stack (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-4777:
-------------------------

       Resolution: Fixed
    Fix Version/s: 0.92.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

Thanks for review lads.  Committed branch and trunk.
                
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.92.0
>
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149244#comment-13149244 ] 

Hudson commented on HBASE-4777:
-------------------------------

Integrated in HBase-0.92 #128 (See [https://builds.apache.org/job/HBase-0.92/128/])
    HBASE-4777 Write back to client 'incompatible' if we show up with wrong version

stack : 
Files : 
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java

                
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.92.0
>
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "Ted Yu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149195#comment-13149195 ] 

Ted Yu commented on HBASE-4777:
-------------------------------

+1 on patch.
opentsdb would be very useful for HBase 0.92
                
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "Lars Hofhansl (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149201#comment-13149201 ] 

Lars Hofhansl commented on HBASE-4777:
--------------------------------------

+1 as well
                
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "stack (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-4777:
-------------------------

    Attachment: 4777.txt
    
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148959#comment-13148959 ] 

Hadoop QA commented on HBASE-4777:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12503458/4777.txt
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 javadoc.  The javadoc tool appears to have generated -163 warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 50 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed unit tests in .

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/236//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/236//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/236//console

This message is automatically generated.
                
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4777) Write back to client 'incompatible' if we show up with wrong version

Posted by "stack (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-4777:
-------------------------

    Assignee: stack
      Status: Patch Available  (was: Open)
    
> Write back to client 'incompatible' if we show up with wrong version
> --------------------------------------------------------------------
>
>                 Key: HBASE-4777
>                 URL: https://issues.apache.org/jira/browse/HBASE-4777
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>         Attachments: 4777.txt
>
>
> We changed the RPC_VERSION to 4 in hbase-3939.  If a client comes in volunteering RPC_VERSION is 3, currently, we'll log 'wrong version' but we'll close the connection; the client has no chance of knowing why the server went away.
> Returning -1 as id up out of here is what causes the connection close:
> {code}
>     private void setupBadVersionResponse(int clientVersion) throws IOException {
>       String errMsg = "Server IPC version " + CURRENT_VERSION +
>       " cannot communicate with client version " + clientVersion;
>       ByteArrayOutputStream buffer = new ByteArrayOutputStream();
>       if (clientVersion >= 3) {
>         Call fakeCall =  new Call(-1, null, this, responder);
>         // Versions 3 and greater can interpret this exception
>         // response in the same manner
>         setupResponse(buffer, fakeCall, Status.FATAL,
>             null, VersionMismatch.class.getName(), errMsg);
>         responder.doRespond(fakeCall);
>       }
>     }
> {code}
> Instead, we need to return an id that does not close the connection so cilent gets chance to read the response.
> Suggestion is that we return a 0 for the id.... the connection will stay up.
> If an old client and it sends the wrong version, it'll move on to do getProtocolVersion... and will fail there.
> Other clients, e.g. asynchbase, if they get a response will have a response to switch what they send to suit the new server.
> (There are other issues -- e.g. Invocation is versioned now -- but Benoit needs some means of figuring whats on other side)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira