From e5f2ace8310cace6a3b2b901ad6d48fce62f337a Mon Sep 17 00:00:00 2001 From: Emanuele Danovaro Date: Thu, 28 Nov 2024 11:42:32 +0000 Subject: [PATCH] addressed PR + fix toc async read --- src/fdb5/io/LustreSettings.cc | 2 +- src/fdb5/io/LustreSettings.h | 2 +- src/fdb5/toc/TocHandler.cc | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fdb5/io/LustreSettings.cc b/src/fdb5/io/LustreSettings.cc index 4b3decb87..5af6ced71 100644 --- a/src/fdb5/io/LustreSettings.cc +++ b/src/fdb5/io/LustreSettings.cc @@ -38,7 +38,7 @@ bool fdb5LustreapiSupported() { #endif } -int fdb5LustreapiFileCreate(eckit::PathName path, LustreStripe stripe) { +int fdb5LustreapiFileCreate(const eckit::PathName& path, LustreStripe stripe) { #if defined(fdb5_HAVE_LUSTRE) diff --git a/src/fdb5/io/LustreSettings.h b/src/fdb5/io/LustreSettings.h index 464f4c673..c3c12d47e 100644 --- a/src/fdb5/io/LustreSettings.h +++ b/src/fdb5/io/LustreSettings.h @@ -43,7 +43,7 @@ LustreStripe stripeDataLustreSettings(); //---------------------------------------------------------------------------------------------------------------------- -int fdb5LustreapiFileCreate(eckit::PathName path, LustreStripe stripe); +int fdb5LustreapiFileCreate(const eckit::PathName& path, LustreStripe stripe); bool fdb5LustreapiSupported(); diff --git a/src/fdb5/toc/TocHandler.cc b/src/fdb5/toc/TocHandler.cc index 76f1cadc5..ae978ec37 100644 --- a/src/fdb5/toc/TocHandler.cc +++ b/src/fdb5/toc/TocHandler.cc @@ -725,7 +725,7 @@ class SubtocPreloader { int fd; SYSCALL2((fd = ::open(path.localPath(), iomode)), path); closers.emplace_back(AutoFDCloser{fd}); - eckit::Length tocSize = 2*1024*1024; + eckit::Length tocSize = path.size(); aiocb& aio(aiocbs[i]); zero(aio); @@ -802,9 +802,8 @@ class SubtocPreloader { } } #else - NOTIMP + NOTIMP; #endif // eckit_HAVE_AIO - return std::move(subTocReadCache_); }