[Feature] Cut metadata round trips when planning a scan (known manifest sizes, listing probes, parallel manifest-list reads)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 58/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Domaine
- data-engineering
Piste de recherche
Commencez par ObjectsFile::Read, ReadIfFileExist, ReadArrowBatches et ReadFileSegment, puis suivez les callers de ManifestFile, ManifestList, FileStoreScan et SnapshotFileCollector. Inspectez également FileUtils::ListVersionedFileStatus et JindoFileSystem::ListDir. Le travail est terminé lorsque les tailles connues évitent les appels de statut des métadonnées, que les listings de répertoires inexistants continuent de fonctionner et que les lectures des manifests base/delta préservent l’ordre tout en s’exécutant en parallèle.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Search before asking
- I searched in the issues and found nothing similar.
Motivation
Scan planning pays several object-store round trips that are avoidable, either because the answer is already in metadata it has read or because one call can answer what two are asking.
- Manifest reads re-resolve a length the metadata already carries. A manifest list records each manifest's
fileSize, and a snapshot records its base/delta/changelog manifest-list sizes. ButObjectsFile::Read*opened these files with a bareOpen(path), so on a remote store every manifest and manifest list paid agetFileStatus/HeadObjectround trip just to learn a length planning already had. This is the metadata-path counterpart of the data-file fast path inOpen(const FileStatus&). ListVersionedFileStatusprobes existence before listing. It calledExists(dir)thenListDir(dir). Every file system already lists a missing directory as an empty result rather than an error, so the probe only decided whether to make a call that answers the same question — an extra round trip on every schema/snapshot/versioned-file lookup.- Jindo
ListDirasks the store twice. It calledExists(dir)thenGetFileStatus(dir); a singleGetFileStatusanswers both "is it there" and "is it a directory". ScanMode::ALLreads the base and delta manifest lists serially. They are two independent files and neither read depends on the other, so the two metadata round trips are paid one after the other instead of together.
For scans over many manifests, or against a high-latency object store, these round trips are a measurable and entirely avoidable part of planning latency.
Solution
- Thread an optional known length through the metadata read path:
ObjectsFile::Read/ReadIfFileExist/ReadArrowBatches/ReadFileSegmentgain astd::optional<int64_t> file_size(defaultstd::nullopt), and a newOpenForReadhelper opens withOpen(FileStatus(path, size))when the length is known and falls back toOpen(path)when it is not.ManifestFile::ReadBucketEntriesforwards it,ManifestList::ReadBase/Delta/ChangelogManifestspass the sizes recorded on the snapshot, andFileStoreScan/SnapshotFileCollectorpass eachManifestFileMeta::FileSize(). - Drop the
Exists()probe inFileUtils::ListVersionedFileStatusand list directly. - Collapse Jindo
ListDirto a singleGetFileStatus, mapping the SDK not-found to an empty listing (as the other file systems do) and propagating any other error. - In
FileStoreScan::ReadManifestsWithSnapshot, read the base and delta manifest lists concurrently through the existingexecutor_(Via+CollectAll), preserving base-then-delta order.
The size fields stay optional, so a snapshot or manifest list written before they existed keeps reading through the Open(path) fallback — this is an optimization, not a new requirement on the metadata.
Anything else?
- The length handed to
Open(FileStatus)is trusted, not re-validated, so a stale or wrong size would surface as a short or failed read. Manifest and manifest-list files are write-once and never rewritten, and the size is recorded by the same commit that wrote the file, so it cannot go stale underneath the read; a negative length is rejected by the baseOpen(const FileStatus&). - The size fast path benefits stores that override
Open(const FileStatus&)(todayObjectStoreFileSystem;ResolvingFileSystemforwards it).JindoFileSystemcurrently only overridesOpen(path), so for Jindo the manifest-size threading is inert until it gains that override; the Jindo win here is the single-callListDir. - No storage format or protocol change, and no new public API: the changed signatures are internal
src/paimonhelpers and the new parameter is defaulted.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Langage dominant
- C++
- Étoiles
- 65
- Forks
- 29
- Merge moyen
- 2 j 11 h
- PR mergées (30 j)
- 79
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/paimon-cpp
-
bug
apache/paimon-cpp#385 · 1 personne assignée ·
-
enhancement
apache/paimon-cpp#381 · 1 personne assignée ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
apache/paimon-cpp#375 · 1 personne assignée ·
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 45/100
apache/paimon-cpp#361 · 1 personne assignée ·
-
enhancement
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
apache/paimon-cpp#325 · 1 personne assignée ·
Toutes les issues de apache/paimon-cpp
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
ros2/message_filters#338 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
subsurface/subsurface#4984 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
google-ai-edge/LiteRT-LM#3739 ·