You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "sunchao (via GitHub)" <gi...@apache.org> on 2026/09/21 23:34:59 UTC
[I] Shuffle schema cache can evict recent entries and retain oversized schemas [datafusion-comet]
sunchao opened a new issue, #6097:
URL: https://github.com/apache/datafusion-comet/issues/6097
### Describe the bug
The shuffle schema cache introduced by #5809 has two cache-policy problems in `native/shuffle/src/ipc.rs`:
- A hit swaps the selected entry with the front. This changes the relative recency of other entries, so an insertion can evict a more recently used schema.
- The four-entry limit does not bound the size of the retained raw schema messages and parsed schemas. Large valid field names or schema metadata can remain cached for the lifetime of a worker thread. The metadata scratch limit does not cover those separate cache entries.
### Steps to reproduce
For eviction order, decode schemas in the order `A B C D A E D` with a four-entry cache. Promoting A should leave D newer than B and C, so inserting E should evict B and the final D should hit. The current swap instead moves D to the oldest slot and E evicts it.
For retention, decode a valid batch whose schema has a large field name or metadata value, then drop the decoded batch. The cache continues to own the parsed schema and its serialized message. Serialized size alone is insufficient because the parsed schema owns additional copies of strings.
### Expected behavior
Cache hits preserve the recency order of other entries. Oversized valid schemas continue to decode, but bypass cache admission without evicting useful normal entries. Admission considers both serialized and parsed schema size.
### Additional context
Verified in main at `ccdff0a4bfeee377ffa8654a1ef7843e63b3b8b8`. These are cache reuse and retention issues; the fix can preserve the IPC format and both existing decoder entry points.
--
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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Shuffle schema cache can evict recent entries and retain oversized schemas [datafusion-comet]
Posted by "sunchao (via GitHub)" <gi...@apache.org>.
sunchao closed issue #6097: Shuffle schema cache can evict recent entries and retain oversized schemas
URL: https://github.com/apache/datafusion-comet/issues/6097
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org