[ntuple] Streamline RPageSource class hierarchy#22681
Conversation
b0570d5 to
b651605
Compare
Make use of the dedicated callback that loads the compressed header and footer, instead of leaving it squashed in AttachImpl().
Test Results 21 files 21 suites 3d 4h 47m 50s ⏱️ Results for commit 90f3ea5. ♻️ This comment has been updated with latest results. |
| virtual void UnzipClusterImpl(ROOT::Internal::RCluster *cluster); | ||
| // Loads a page list into the provided buffer. The buffer parameter needs to point to a memory region large enough | ||
| // to hold the compressed page list. | ||
| virtual void LoadPageListImpl(const RNTupleLocator &locator, void *buffer) = 0; |
There was a problem hiding this comment.
Should we also pass the buffer size, to validate the requirement stated by the comment?
Also, since the buffer will be treated as a blob of bytes both by the caller and the callee, maybe we can mark it as a std::byte * for convenience...(similarly to the Serializer functions that use unsigned char; in fact, even though byte is better in principle we might still want to use unsigned char for consistency)
There was a problem hiding this comment.
I changed the parameter type from void * to unsigned char *. I'm not convinced about passing the buffer size. This method is protected, called by the base class to its descendent classes (so between parties who know what they are doing). Also, the required buffer length doesn't need to be computed (like in sprintf) but it is simply locator.GetNBytesOnStorage().
There was a problem hiding this comment.
it is simply locator.GetNBytesOnStorage()
Maybe then we can just spell this out in the comment and be ok with it
f497301 to
90f3ea5
Compare
A new callback that loads a particular page list from the backend storage. As a result, the logic to load the page lists and to populate the cluster group descriptor has been moved from the concrete page source implementations to the RPageSource base class. Moving on, this will allow to decouple loading the page lists from attaching the storage.
Further streamlining of the page source in preparation of huge file support.
LoadStructureImpl()for the DAOS page sourceRPageSource::LoadPageListImpl()abstract method so that concrete page sources don't need to populate the cluster group descriptor themselves but they only need to know how to load a page list.