You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The description of #100 suggests that subsequent PRs could include configurability for:
What is linked how or copied.
Limit increase in disk usage.
Expanding on that, the focus here is on duplicateUnderlyingFiles. It calls getPath which can tell if a file is in Files/, Pixels/, Thumbnails/, ManagedRepository/, lib/scripts/ (throws) or elsewhere (throws). It also calls duplicateFile which currently decides between hard-linking and copying and could conceivably soft-link. One can imagine extending omero::cmd::Duplicate with extra options that:
Decide for each location (Pixels/, ManagedRepository/, whatever) how to duplicate the underlying files, conceivably with a list of fallback options.
Limit the total extra bytes written to files, by accumulating the Files.size or OriginalFile.size total whenever copying then throwing to cause rollback if some threshold is exceeded.
For example, one could define enums for FILES, PIXELS, THUMBS, MANAGED and for HARD_LINK, SOFT_LINK, COPY then allow the client to pass a dictionary with the former as keys whose values are lists of the latter, the current default being:
FILES → [COPY]
PIXELS → [COPY]
THUMBS → [COPY]
MANAGED → [HARD_LINK, COPY]
Also allow passing a disk usage limit such that one gets an exception if COPY adds up to more. That too could usefully be a dictionary keyed on file location.
Server configuration could specify constraints in similar terms for admins and normal users.
The text was updated successfully, but these errors were encountered:
The description of #100 suggests that subsequent PRs could include configurability for:
Expanding on that, the focus here is on
duplicateUnderlyingFiles
. It callsgetPath
which can tell if a file is inFiles/
,Pixels/
,Thumbnails/
,ManagedRepository/
,lib/scripts/
(throws) or elsewhere (throws). It also callsduplicateFile
which currently decides between hard-linking and copying and could conceivably soft-link. One can imagine extending omero::cmd::Duplicate with extra options that:Pixels/
,ManagedRepository/
, whatever) how to duplicate the underlying files, conceivably with a list of fallback options.Files.size
orOriginalFile.size
total whenever copying then throwing to cause rollback if some threshold is exceeded.For example, one could define enums for
FILES
,PIXELS
,THUMBS
,MANAGED
and forHARD_LINK
,SOFT_LINK
,COPY
then allow the client to pass a dictionary with the former as keys whose values are lists of the latter, the current default being:FILES
→ [COPY
]PIXELS
→ [COPY
]THUMBS
→ [COPY
]MANAGED
→ [HARD_LINK
,COPY
]Also allow passing a disk usage limit such that one gets an exception if
COPY
adds up to more. That too could usefully be a dictionary keyed on file location.Server configuration could specify constraints in similar terms for admins and normal users.
The text was updated successfully, but these errors were encountered: