Comment 11 for bug 528041

Revision history for this message
Andrew Bennetts (spiv) wrote :

This appears to be happening because BzrDir.open_2.1 is often the first RPC tried, which means that underlying protocol version hasn't yet been determined either. If the server is older than bzr 1.6, that protocol version will turn out to be v2, and the client is smart enough to immediately realise that v2 implies the server must be older than 1.6. And of course the RPC will then fail because the server is too old to recognise the verb. Normally what happens is that the client then remembers that the server must be older than 2.1, and proceeds with the fallbacks. Unfortunately the simultaneous protocol-version probe has almost remembered that it is < 1.6, and this trips the AssertionError.

The fix is to remove the AssertionError: this is an essentially harmless condition. Developers may be interested to know when it happens, because it indicates somewhere where we could be more efficient in our network conversation, but there's no good reason for bzr to actually stop at this point. So I'm making a branch that quietly logs this event (and optionally warns developers about it if they set the -Dhpss debug flag).

(In this specific case it would be more optimal at the point that we find out that the protocol is v2 to not even try the RPC, but that's not easy to do in the current code without ugly hacks and saving a single round-trip when talking to such old servers is not particularly important anyway.)