Server too old with bzr 1.6b3

Andrew Bennetts andrew at canonical.com
Fri Jul 25 02:50:16 BST 2008


Stéphane Raimbault wrote:
> Hi,
> 
> I see this message when I branch my changes with a 1.5 version (CLI) from a
> 1.6b3 server:
> 
> bzr branch bzr+ssh://sra@warris/home/users/sra/repos/rpca
> Server is too old for streaming pull, reconnecting.  (Upgrade the server to
> Bazaar 1.2 to avoid this)
> 
> I think the message must be :
> (Upgrade the server to Bazaar 1.6 to avoid this)
> 
> The notion of client/server for bzr is disturbing at first!

Yes, this is an unfortuate result of removing a particular RPC from the server
in 1.6.  Earlier clients notice that and recover, but they think it means that
the server is old, rather than the server being too new.  It's really just a
cosmetic issue (and also a bit of a speed issue), but doesn't prevent anything
from working correctly.  So it's not serious, but it is a problem.

We can't really do anything about that for already released clients, but we
should try to think of ways to do better in future so that we don't have this
problem again.  The new protocol in bzr.dev includes a “Software version” header
in each response, so we could perhaps display that to the user in this error.
That header is free-form text though, so I wouldn't want the client to try parse
it to try guess if the server is too old vs. too new.

Currently the client keeps track of what it believes the server's version
probably is based on what RPC verbs have been accepted so far, and ratchets that
guess down whenever a verb is unrecognised by the server.  Perhaps it should
simply just keep track of which verbs are unrecognised, without assuming that if
one verb isn't supported that that would imply anything about other verbs.  That
would increase wasted requests a little, but maybe that's ok.

Another possibility is to introduce a new error code in the protocol to
distinguish “removed” from “unknown”.  We currently have “UnknownSmartMethod” as
an error response code, we could add “ExtinctSmartMethod”.  Clients could then
reliably understand that a method's absence doesn't imply that the server is
older than the client.

Probably this won't happen very often, though.  It's usually not hard to keep
supporting old methods in the server.

-Andrew.




More information about the bazaar mailing list