Comment 1 for bug 237067

Revision history for this message
John A Meinel (jameinel) wrote : Re: "bzr check" on bzr+ssh:// branch returns ObjectNotLocked error

Something weird is happening here.

Considering that Branch.check() uses the @needs_read_lock decorator, and you can see the 'read_locked()' function in the traceback. Which means that the branch *should* be read locked, and by extension so should its repository.

Oh wait, isn't there a bug about RemoteBranch.lock_read() not properly locking the underlying repository?

Maybe I didn't actually get it submitted. The problem was that without doing '_ensure_real()' the RemoteBranch would fail to lock its repository. Because it assumed that self._real_branch would be locking it.

Basically a race condition. If you use an api on RemoteBranch that requires it to defer to the self._real_branch, then the repository is properly locked. As we move more functions to be over the RPC, you get more instances where that is not true, and you get failures like this.