You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "sungwy (via GitHub)" <gi...@apache.org> on 2026/09/16 15:34:12 UTC

[I] Process-global manifest cache is keyed only on manifest_path [iceberg-python]

sungwy opened a new issue, #3978:
URL: https://github.com/apache/iceberg-python/issues/3978

   `pyiceberg/manifest.py` holds a module-level cache:
   
   ```python
   _manifest_cache = _ManifestCache()
   ```
   
   Its docstring describes it accurately: *"Process-wide ManifestFile cache keyed by manifest_path."* The key is the path string alone — no catalog, table, session, or tenant forms part of it.
   
   ```python
   def get_or_cache(self, manifest_file: ManifestFile) -> ManifestFile:
       ...
       manifest_path = manifest_file.manifest_path
       if manifest_path in self._cache:
           return self._cache[manifest_path]
       self._cache[manifest_path] = manifest_file
       return manifest_file
   ```
   
   On a hit it returns the cached object and discards the one just read. Since `read_manifest_list` constructs `ManifestFile` objects from the entries of a *manifest list* rather than by reading each manifest file, the cached object reflects whatever the first manifest list to name that path declared — including its partition summaries, counts and sequence numbers.
   
   Two tables in the same process that reference the same `manifest_path` therefore share one `ManifestFile`, and the first read wins. Because those fields drive scan pruning, a stale or mismatched entry changes which files a scan considers.
   
   ---
   Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Process-global manifest cache is keyed only on manifest_path [iceberg-python]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on issue #3978:
URL: https://github.com/apache/iceberg-python/issues/3978#issuecomment-5714013007

   I'm not sure if this is a real bug. Sharing manifests between tables is quite controversial, since you don't know who owns the manifest file. If either table expires the manifest, the other table will be bricked.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org