Cache manifest and manifest-list bytes by location, as Iceberg Java's `io.manifest.cache-*` does
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Start by tracing load_table, plan_files, _manifests, and fetch_manifest_entry to confirm where metadata, manifest-list, and manifest bytes are read. Then review the existing _manifest_cache and the related issues #1187, #3978, and #3991. Done means callers can supply a bounded, location-keyed byte cache for manifests and manifest lists, disabled by default, while parsing remains unchanged.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Feature Request / Improvement
Planning the same table repeatedly reads the same immutable files from object storage every time, and fails while the store is unreachable, even for a snapshot just planned.
Per load_table plus plan_files, pyiceberg 0.12.0 (and main) reads:
metadata.jsonon every load, on non-REST catalogs (REST returns it inline).- The manifest list on every plan.
_manifestsre-reads it on purpose, to avoid the O(N²) memory of caching overlappingManifestFiletuples (#1187). - Each manifest on every plan, via
fetch_manifest_entry._manifest_cachekeeps theManifestFilerecords, not the manifests' contents.
These files are never rewritten, so the bytes at a location never change.
Iceberg Java caches these bytes. ManifestFiles and ManifestLists read through a per-FileIO ContentCache, set by these properties (CatalogProperties):
io.manifest.cache-enabled(defaultfalse)io.manifest.cache.max-total-bytes(default 100 MiB)io.manifest.cache.max-content-length(default 8 MiB)io.manifest.cache.expiration-interval-ms(default 60 s)
Proposal
-
Cache manifest and manifest-list bytes by location, off by default and bounded in bytes, as in Java. Parsing stays as it is.
Caching bytes avoids the problem in #3978 / #3991. A
ManifestFilerecord carries values from the manifest list that names it, so a parsed-object cache keyed by path can serve one reference's values to another. (iceberg-rust addsadded_snapshot_id,sequence_numberandfirst_row_idto its key for this reason.) Bytes are the same for every reference. -
Let the caller supply the cache, e.g.
get(location) -> bytes | Noneandput(location, data), with the in-memory one as the default. A disk cache behind it would survive restarts and keep planning working through a store outage for snapshots already read. iceberg-rust has a similar hook (ObjectCacheProvide) for parsed objects.
metadata.json could use the same cache. For REST, #4075 / #4094 cover it with If-None-Match.
Java configures this with FileIO properties; #2952 used Config and an env var for manifest-cache-size. Either is fine.
Related: #4007 and #3662 make each read cheaper; this removes repeated reads.
What we do today
In Strata (a materialization layer that, among other things, caches Iceberg scans) we set py-io-impl to a FileIO that wraps the one load_file_io would pick. Its new_input serves *.metadata.json and *.avro on remote schemes from a bounded disk cache, keyed by location plus the endpoint properties, and passes everything else through.
Drawbacks:
- It identifies immutable files by suffix.
- It takes over
py-io-impl, so it must carry a user's ownpy-io-implunder another property. - It builds an inner FileIO per scheme, since a FileIO does not know which locations it will serve.
A cache hook at the read points above would remove the need for the wrapper.
- Linguagem predominante
- Python
- Estrelas
- 1.2k
- Forks
- 654
- Merge médio
- 2d 11h
- PRs com merge (30d)
- 122
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/iceberg-python
-
`inspect.files()` and the other file metadata tables raise `ArrowInvalid` when a snapshot has no manifestsTalvez já em andamento @YuangGao assumiu há 10 dias. Abertakind:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
apache/iceberg-python#4269 ·
Mantenedores costumam responder em até 1 dia
-
`inspect.entries()` raises TypeError when a data file has no column_sizesTalvez já em andamento @Rahul-cs50 assumiu há 14 dias. Abertakind:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/iceberg-python#4186 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
`older_than` reads a naive datetime as UTC and expires snapshots it should keepTalvez já em andamento @Rahul-cs50 assumiu há 13 dias. Abertakind:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
apache/iceberg-python#4182 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
REST: Send empty first-page pageToken when rest-page-size is setTalvez já em andamento @ehddnr301 assumiu há 32 dias. Abertakind:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
apache/iceberg-python#4096 ·
Mantenedores costumam responder em até 1 dia
-
PyArrowFileIO: every small S3 write is a 3-request multipart upload; expose allow_delayed_openTalvez já em andamento @David-Banquet assumiu há 29 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
apache/iceberg-python#4093 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de apache/iceberg-python
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
glossyio/traffic-monitor#312 ·
Mantenedores costumam responder em até 1 dia
-
local devenv exampleAbertadocumentation enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
es-ude/elastic-ai.creator#1046 ·
Mantenedores costumam responder em até 3 dias
-
ENH: permit cachetools >= 7Abertafeature request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
confident-ai/deepteam#306 ·
Mantenedores costumam responder em até 1 dia
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL portsTalvez já em andamento @himanchalkaushale assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
OWASP/Nettacker#1884 · 1 comentário ·
Mantenedores costumam responder em até 1 dia