Handling of 0-length files on CTA dev side
Introduction
As shown in https://gitlab.cern.ch/cta/operations/-/issues/1538, and other issues, the handling of 0-length files needs to be re-evaluated on EOSCTA.
The entire discussion can be see here:
Problem on CTA Frontend
The main inconsistency on the CTA Frontend is that 0-length files are not queued for archival by the CloseW
event.
As a result, nothing is ever reported back to EOS (not even an error) and CheckOnTape will never report that the file is on TAPE.
This is explained better here:
(Due to other preceding problems, this does not actually happen in xrootd
transfers, only with http
)
Possible solutions
CloseW
event. This will result in an answer such as this:
1. Let the CTA Frontend return an error on the [
{
"error": "CTA does not archive 0-length files on tape",
"locality": "DISK",
"path": "/eos/ctaatlaspps/tabtest/2024-11-11_0length_test"
}
]
Advantages:
- Consistent handling of 0-length files on the CTA side.
- EOS/dCache can treat 0-length files the same as other files.
Disadvantage:
- Unless we decide to enable it for every user, we need to add a new column to the CTA Catalogue
VO
table. - Another solution is to add a new option to the configuration file on each CTA Frontend. This would be a "hack" that would need to be setup for every frontend (and every VO?).
Open
event on the CTA Frontend.
2. Handle 0-length files directly on the EOS WFE code, instead of triggering the Advantages:
- We can easily enable/disable this on the disk instance level. We just need an extra entry on the EOS configuration file.
- Easy to code on EOS. For other use-cases we are already generating errors for archival requests on EOS.
Disadvantages:
- No control on CTA side. Unclear behaviour on CTA.
3. Accept 0-length files on CTA
Advantages:
- Treated and queued as any other tape file. Disadvantages:
- Needs to be handled in a special way when writing or reading from tape.
- Can lead to several bugs in the code, if not properly handled in all corner cases.
Edited by Joao Afonso