attic icon indicating copy to clipboard operation
attic copied to clipboard

exclusive=x flag and RemoteRepository

Open ThomasWaldmann opened this issue 10 years ago • 0 comments

The server dispatcher calls RepositoryServer.open(path, create). The method signature does not support a "exclusive" flag. Slightly confusing: the signature of Repository.open(path, exclusive) which has a different value at same position.

From RepositoryServer.open, it calls Repository(path, create) without giving exclusive=x. This means that the repository is (initially) not exclusively locked in the case of remote repositories. Later, in first call to prepare_txn, the shared lock will be upgraded to an exclusive lock.

Just wondering why local and remote repos are handled in that way. Some documentation about attic's locking rules / ideas behind the locking procedures would be nice.

ThomasWaldmann avatar Mar 09 '15 16:03 ThomasWaldmann