jgm / jgm/gitit

Race condition in updatePage?

Open
#180 2 comments 0 reactions 1 assignee Claimed by @jgm View on GitHub
Dominant language
Haskell
Stars
2.3k
Forks
231
PR merge metrics
No merged PRs in 30d

Description

What steps will reproduce the problem?

Haven't tried, because this is a theoretical problem that might be hard to
reproduce. If the same page is modified in two threads by updatePage, one
update might be overwritten by another in the working tree. Darcs and git
should correctly deal with two attempts to commit happening at the same
time, but the problem arises if the race condition occurs *before* darcs
record or git commit have been called.

I think basically you would need some kind of write lock. I think it might
as well be a wiki-wide single write lock, as I suspect darcs and git lock
the whole repository whenever they commit anyway.

Because the search function currently uses grep and therefore looks at the
working tree, I think the search will have to be locked as well during a
write lock. However, page views should not have to be locked, because they
use the revision control system rather than reading from the working tree,
so they should be unaffected.

What version of the product are you using? On what operating system?
Latest version from git

Google Code Info:
Issue #: 37
Author: gree...@gmail.com
Created On: 2009-03-10T16:45:25.000Z
Closed On:

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.