[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2886: Add filesizes to magic-folder status API output
Tahoe-LAFS
trac at tahoe-lafs.org
Tue Jan 9 19:45:38 UTC 2018
#2886: Add filesizes to magic-folder status API output
-----------------------------+---------------------------------------
Reporter: cypher | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: undecided
Component: unknown | Version: 1.12.1
Resolution: | Keywords: magic-folder transparency
Launchpad Bug: |
-----------------------------+---------------------------------------
Comment (by meejah):
Currently, the "tahoe magic-folder status" command does output file-sizes;
these come from the metadata on the directory entries (i.e. "query the
readcap for the dir") so you don't have to query each readcap for each
file (as far as I understand).
That said, I think the only way for the "status API" to get this
information would be to also read these dircaps .. so maybe it's better to
leave that up to application? That is, some applications might not care
about any metdata and so why should they have to wait for a bunch of
dircap fetches? (Or: why not put *all* available metadata from the dircap
into the status API?). For the upload sizes, these could be stat()-ed
locally by the API so wouldn't put additional overhead.
Re-reading the "status" code in magic-folder, it fetches 3 URLs up front
and can then display all the data (the dircaps for "upload_dircap" and
"collective_dircap") .. oh and then also has to grab the dircap for each
'other' participant in the "collective_dircap" list. So it reads 3 URLs,
and then one more for each participant in the magic-folder (and then has
all metadata for all files that anyone has put into the magic-folder).
My conclusion: it would be pretty low-overhead to "do the stat call for
you" and include file-sizes for uploads; for downloads that incurs
additional dircap fetches so it might be best to leave that up to the
application?
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2886#comment:2>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list