[tahoe-lafs-trac-stream] [tahoe-lafs] #1058: DELETE /uri/$DIRCAP/[SUBDIRS../]CHILDNAME to free space
tahoe-lafs
trac at tahoe-lafs.org
Tue Jul 30 15:51:05 UTC 2013
#1058: DELETE /uri/$DIRCAP/[SUBDIRS../]CHILDNAME to free space
-----------------------------------+-------------------------
Reporter: wangleziji | Owner:
Type: defect | Status: closed
Priority: major | Milestone: undecided
Component: code-frontend-web | Version: 1.5.0
Resolution: invalid | Keywords: delete file
Launchpad Bug: |
-----------------------------------+-------------------------
Changes (by markberger):
* status: new => closed
* resolution: => invalid
Old description:
> after upload a file in a directory,then I try to delete the file,but the
> response.status is 200,but the space is not freed.
> the code:
> conn = httplib.HTTPConnection('192.168.0.27:3456')
> conn.request('DELETE','/uri/'+cap+name)
> response = conn.getresponse()
>
> http://tahoe-lafs.org/source/tahoe/trunk/docs/frontends/webapi.txt
> describe:
> This removes the given name from its parent directory. CHILDNAME is
> the name to be removed, and $DIRCAP/SUBDIRS.. indicates the directory
> that will be modified.
> Note that this does not actually delete the file or directory that
> the name points to from the tahoe grid -- it only removes the named
> reference from this directory. If there are other names in this directory
> or in other directories that point to the resource, then it will remain
> accessible through those paths. Even if all names pointing to this object
> are removed from their parent directories, then someone with possession
> of its read-cap can continue to access the object through that cap.
> The object will only become completely unreachable once 1: there are
> no reachable directories that reference it, and 2: nobody is holding a
> read- or write- cap to the object. (This behavior is very similar to the
> way hardlinks and anonymous files work in traditional UNIX filesystems).
> This operation will not modify more than a single directory.
> Intermediate directories which were implicitly created by PUT or POST
> methods will *not* be automatically removed by DELETE.
> This method returns the file- or directory- cap of the object that
> was just removed.
>
> but I want to know how to delete the file completely and free the
> disk space after upload!!
New description:
after upload a file in a directory,then I try to delete the file,but the
response.status is 200,but the space is not freed.
the code:
conn = httplib.HTTPConnection('192.168.0.27:3456')
conn.request('DELETE','/uri/'+cap+name)
response = conn.getresponse()
http://tahoe-lafs.org/source/tahoe/trunk/docs/frontends/webapi.txt
describe:
This removes the given name from its parent directory. CHILDNAME is
the name to be removed, and $DIRCAP/SUBDIRS.. indicates the directory that
will be modified.
Note that this does not actually delete the file or directory that
the name points to from the tahoe grid -- it only removes the named
reference from this directory. If there are other names in this directory
or in other directories that point to the resource, then it will remain
accessible through those paths. Even if all names pointing to this object
are removed from their parent directories, then someone with possession of
its read-cap can continue to access the object through that cap.
The object will only become completely unreachable once 1: there are
no reachable directories that reference it, and 2: nobody is holding a
read- or write- cap to the object. (This behavior is very similar to the
way hardlinks and anonymous files work in traditional UNIX filesystems).
This operation will not modify more than a single directory.
Intermediate directories which were implicitly created by PUT or POST
methods will *not* be automatically removed by DELETE.
This method returns the file- or directory- cap of the object that was
just removed.
but I want to know how to delete the file completely and free the disk
space after upload!!
--
Comment:
The file will garbage collected once those two criteria are met, and this
will free the disk space. By design, Tahoe doesn't allow users to
permanently delete a file.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1058#comment:1>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list