diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-05 14:53:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-05 14:53:30 -0400 |
commit | e771c645595fb6cedf0f0c5f2af393712013deb2 (patch) | |
tree | 380a369ed994a44a71fb31fc26de5cf3117b6ff9 | |
parent | 1ab7b2b8eaa1de567e20c36edf10affdd7f6ac8d (diff) |
races
-rw-r--r-- | doc/design/assistant/inotify.mdwn | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/design/assistant/inotify.mdwn b/doc/design/assistant/inotify.mdwn index 6692b7d94..938aa2355 100644 --- a/doc/design/assistant/inotify.mdwn +++ b/doc/design/assistant/inotify.mdwn @@ -39,3 +39,34 @@ really useful, it needs to: - Support OSes other than Linux; it only uses inotify currently. OSX and FreeBSD use the same mechanism, and there is a Haskell interface for it, + +## the races + +Many races need to be dealt with by this code. Here are some of them. + +* File is added and then removed before the annex add finishes. + + Currently unfixed; The annex add re-adds the file as a symlink and then + the remove event does nothing since the file exists. + +* File is added and then replaced with another file before the annex add + makes its symlink. + + Currently unfixed; The annex add will fail creating its symlink since + the file exists. The second add event will add the new file. + +* File is added and then replaced with another file before the annex add + moves its content into the annex. + + Currently unfixed; The new content will be moved to the annex under the + old checksum, and fsck will later catch this inconsistency. + +* File is removed and then re-added before the removal event finishes. + + Not a problem; The removal event removes the old file from the index, and + the add event adds the new one. + +* File is removed and then re-added before the removal event starts. + + Not a problem; The removal event does nothing since the file exists, + and the add event replaces it in git with the new one. |