alexanderbianchi opened a new pull request, #3679: URL: https://github.com/apache/iceberg-rust/pull/3679
## Which issue does this PR close? No linked upstream issue. Ports https://github.com/DataDog/iceberg-rust/pull/34 to upstream `main`. ## What changes are included in this PR? Loading a table constructs a Moka manifest cache even when the caller only needs table metadata. Dropping that unused cache performs Moka's epoch-reclamation work, which can also run deferred cleanup from other caches on the calling thread. Initialize the cache on the first manifest or manifest-list read, and never construct it when caching is disabled. Clones share the same lazy initialization and cached objects. Cache keys, capacity, weighting, encryption, and runtime scheduling retain their existing behavior. ## Are these changes tested? - `cargo test -p iceberg --lib --all-features --locked`: 2,154 passed, 1 existing ignored (including all 7 object-cache tests). - `cargo clippy -p iceberg --all-targets --all-features --locked -- -D warnings`: passed. - `cargo fmt --all -- --check`: passed. - Regenerated the Iceberg public API with `make generate-public-api` scoped to the core crate: no changes. Regression coverage checks that constructing, cloning, and dropping an unused cache does not initialize Moka; first use shares one cache with the configured capacity; clones return the same cached manifest/list objects; and disabled-cache reads never initialize Moka. ## AI Disclosure Adapted with OpenAI Codex from Geoffrey Claude's Datadog fork patch. Review should focus on initialization shared by clones and preserving disabled-cache behavior. The fork-only FileIO rebinding helper is absent upstream and is not included in this port. No performance benchmark was run. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
