[ntpl] Allow XRootD redirection with EOS files#20272
Conversation
jblomer
left a comment
There was a problem hiding this comment.
Thanks for addressing this!
Test Results 23 files 23 suites 3d 13h 13m 8s ⏱️ For more details on these failures, see this check. Results for commit d447fee. ♻️ This comment has been updated with latest results. |
3e7059b to
ab97475
Compare
0ec1f2f to
4422f5e
Compare
c6f6051 to
45b2a23
Compare
|
To the best of my understanding, this PR is simply moving the code that used to live separately in which is the same that triggered #17544 . What's even more worrying is that I don't see the error on every test execution, but sometimes the test also runs without failing. Before merging this PR I need to understand why that happens. It's possible the problem is still there somehow also without the code changes of this PR. |
45b2a23 to
2794616
Compare
|
Regarding the issues with the
I would wait for the latter issue to also be confirmed fix before moving on with this PR, FYI @amadio. |
|
@vepadulano it looks like this PR can advance |
The logic to extract the extended attribute 'eos.url.xroot' from a path to an EOS file on a FUSE mount is centralised in a separate header in RIO, with an internal function called GetEOSRedirectedXRootUrl. This function can be called anywhere needed in the rest of ROOT. With this commit, the following places use this functionality: - TFile::Open (done before this commit) - RLoopManager::ChangeSpec (done before this commit) - RRawFile::Create (introduced in this commit) In particular the last means introducing the redirection also for RNTupleReader, which follows a different logic to open the TFile.
2794616 to
d447fee
Compare
|
The two EOS issues I had mentioned previously seem to be fixed, although I am now looking at another failure that is happening. This is the ROOT reproducer #include <ROOT/RDataFrame.hxx>
#include <ROOT/RNTupleReader.hxx>
#include <ROOT/RSnapshotOptions.hxx>
void write(const char *dataset, const char *path, const char *type) {
ROOT::RDataFrame df{5};
ROOT::RDF::RSnapshotOptions opts;
if (strcmp(type, "ttree") == 0)
opts.fOutputFormat = ROOT::RDF::ESnapshotOutputFormat::kTTree;
else
opts.fOutputFormat = ROOT::RDF::ESnapshotOutputFormat::kRNTuple;
df.Define("x", []() { return 42; }).Snapshot(dataset, path, "", opts);
}
void test_rntuplereader_open() {
write("events", "anotherfile.root", "rntuple");
write("events", "rntuplereader_myfile.root", "rntuple");
auto r = ROOT::RNTupleReader::Open("events", "rntuplereader_myfile.root");
}
int main() {
test_rntuplereader_open();
}The logic is fairly simple:
It looks like writing two files one after another is causing initially some corruption in the file being read, then on subsequent runs of the same application shows an error message about not having permission to write to the first file I am at the moment trying to see if I can create an EOS-only reproducer without ROOT. |
|
The error from the parallel writer about the file not being writable is due to TNetXNGFile not properly sanitising the input mode option "RECREATE_WITHOUT_GLOBALREGISTRATION" which is then parsed to the appropriate XRootD file open mode. Since it's not recognised, the file is opened in read only mode root/net/netxng/src/TNetXNGFile.cxx Line 180 in 63097c0 The other issue about the invalid read from RMiniFileReader is still unsolved. |
|
The invalid read is caused by not closing the output TFile in |
Fixes #20213
With these changes I can see the redirection happening when reading an RNTuple on EOS from lxplus (going from
ntpl001_staff.roottoroot://eoshome-v.cern.ch//eos/user/v/vpadulan/ntpl001_staff.rootThere might be more places where the redirection needs to happen though.