[Feature] Cut metadata round trips when planning a scan (known manifest sizes, listing probes, parallel manifest-list reads)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- data-engineering
Línea de trabajo
Comienza con ObjectsFile::Read, ReadIfFileExist, ReadArrowBatches y ReadFileSegment; después, sigue a los callers de ManifestFile, ManifestList, FileStoreScan y SnapshotFileCollector. Inspecciona también FileUtils::ListVersionedFileStatus y JindoFileSystem::ListDir. Se considera terminado cuando los tamaños conocidos evitan las llamadas de estado de metadatos, los listados de directorios inexistentes siguen funcionando y las lecturas de los manifiestos base/delta conservan el orden mientras se ejecutan de forma concurrente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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!
- Lenguaje dominante
- C++
- Estrellas
- 65
- Forks
- 29
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 78
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/paimon-cpp
-
enhancement
apache/paimon-cpp#381 · 1 asignado ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
apache/paimon-cpp#375 · 1 asignado ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
apache/paimon-cpp#361 · 1 asignado ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
apache/paimon-cpp#325 · 1 asignado ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
apache/paimon-cpp#319 · 1 reacción · 1 asignado ·
Todos los issues de apache/paimon-cpp
Issues similares
-
ai_reviewed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ydb-platform/ydb#53869 · 3 comentarios ·
-
bug cert blocker needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
project-chip/connectedhomeip#74373 ·
-
[request] tracy/0.14.1 Abiertoupstream update
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
conan-io/conan-center-index#31035 ·
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
vllm-project/vllm-ascend#17329 ·