--- /dev/null
+<!DOCtype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>Avoiding Write Collisions in Tahoe</title>
+ <link rev="made" class="mailto" href="mailto:zooko[at]zooko[dot]com">
+ <meta name="description" content="how to avoid write collisions in Tahoe">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="keywords" content="tahoe secure decentralized filesystem installation">
+ </head>
+
+ <body>
+ <h1>Write Collisions</h1>
+ <p>Tahoe does not provide locking of the mutable files and directories. If there is more than one simultaneous attempt to change a mutable file or directory, then an <cite>UncoordinatedWriteError</p> will result. This might, in rare cases, cause the file or directory contents to be accidentally deleted. The user is expected to ensure that there is at most one outstanding write or update request for a given file or directory at a time. One convenient way to accomplish this is to make a different file or directory for each person or process which wants to write.</p>
+
+ </body>
+</html>
return "<NeedMoreDataError (%d bytes)>" % self.needed_bytes
class UncoordinatedWriteError(Exception):
- pass
+ def __repr__(self):
+ return "<%s -- You, oh user, tried to change a file or directory at the same time as another process was trying to change it. To avoid data loss, don't do this. Please see docs/write_coordination.html for details.>" % (self.__class__.__name__,)
class CorruptShareError(Exception):
def __init__(self, peerid, shnum, reason):