Assertion error and stalled commit when concurrently committing the same file in different sessions
GoogleCodeExporter opened this issue · 1 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Create two sessions, "session1" and "session2".
2. Check out to two workdirs with the respective names.
3. Add some files to the workdirs, and make sure to add the same files in both
workdirs. Add enough files to the workdirs so that it will take some time to
commit (ensuring concurrent access).
4. Commit both workdirs at the same time.
What is the expected output? What do you see instead?
Both commits should succeed, as they are in different sessions. Instead, only
the commit first to finish will succeed. The other one will fail with an
assertion error:
File "common.py", line 179, in move_file
assert not os.path.exists(destination)
This error occurs after the new snapshot has been consolidated, which causes
the same error to occur again every time the repository is accessed, as the
processing queue remains.
A workaround to restore the repository is to manually delete the contents of
the "queue" directory. This removes the failed commit.
Original issue reported on code.google.com by ekb...@gmail.com
on 9 Mar 2012 at 10:20
GoogleCodeExporter commented
Fixed in changeset 2c6ba9f91582.
Original comment by ekb...@gmail.com
on 23 Mar 2012 at 6:52
- Changed state: Verified