avoid auto-collision on mutable files #391

Closed
opened 2008-04-23 18:49:37 +00:00 by warner · 2 comments

It would be convenient if there were no way to make a single Tahoe node
perform a colliding write with itself. What that means is that two
dirnode-mutate operations on the same directory, given to a single tahoe node
at about the same time, should result in two successes, rather than at least
one uncoordinated write error.

To accomplish this, we need:

  • a weakref table (in the client) that maps URI to DirectoryNode or
    MutableFileNode instance, so that two operations on the same node
    will use the same instance.
  • some locking/queueing/sequencing code in the DirectoryNode to cause
    the second operation to wait until the first has finished. There is
    already code for this purpose in MutableFileNode.

The fact that MutableFileNode.modify is covered by the MFN lock may
mean that we don't actually need any additional locking code in
DirectoryNode. But we still need the singleton table.

It would be convenient if there were no way to make a single Tahoe node perform a colliding write with itself. What that means is that two dirnode-mutate operations on the same directory, given to a single tahoe node at about the same time, should result in two successes, rather than at least one uncoordinated write error. To accomplish this, we need: * a weakref table (in the client) that maps URI to `DirectoryNode` or `MutableFileNode` instance, so that two operations on the same node will use the same instance. * some locking/queueing/sequencing code in the `DirectoryNode` to cause the second operation to wait until the first has finished. There is already code for this purpose in `MutableFileNode`. The fact that `MutableFileNode.modify` is covered by the MFN lock may mean that we don't actually need any additional locking code in `DirectoryNode`. But we still need the singleton table.
warner added the
code-encoding
major
enhancement
1.0.0
labels 2008-04-23 18:49:37 +00:00
warner added this to the undecided milestone 2008-04-23 18:49:37 +00:00
Author

see also #265

see also #265
warner added
code-mutable
and removed
code-encoding
labels 2008-04-24 23:46:21 +00:00
zooko modified the milestone from undecided to 1.1.0 2008-05-05 22:55:21 +00:00
warner self-assigned this 2008-05-09 00:51:53 +00:00
Author

I just implemented this, in changeset:26187bfc8166a868. It was pretty easy, actually.

I just implemented this, in changeset:26187bfc8166a868. It was pretty easy, actually.
warner added the
fixed
label 2008-05-09 01:18:41 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#391
No description provided.