avoid auto-collision on mutable files #391

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

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.
tahoe-lafs added the
code-encoding
major
enhancement
1.0.0
labels 2008-04-23 18:49:37 +00:00
tahoe-lafs added this to the undecided milestone 2008-04-23 18:49:37 +00:00
warner commented 2008-04-24 23:46:21 +00:00
Author
Owner

see also #265

see also #265
tahoe-lafs added
code-mutable
and removed
code-encoding
labels 2008-04-24 23:46:21 +00:00
tahoe-lafs modified the milestone from undecided to 1.1.0 2008-05-05 22:55:21 +00:00
warner commented 2008-05-09 01:18:41 +00:00
Author
Owner

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

I just implemented this, in changeset:26187bfc8166a868. It was pretty easy, actually.
tahoe-lafs added the
fixed
label 2008-05-09 01:18:41 +00:00
warner closed this issue 2008-05-09 01:18:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

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