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 (Updated) (JIRA)" <ji...@apache.org> on 2011/11/12 01:54:51 UTC
[jira] [Updated] (HBASE-4777) Write back to client 'incompatible'
if we show up with wrong version
[ 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