Build: Bump caffeine from 2.9.3 to 3.2.0#16680
Open
moomindani wants to merge 1 commit into
Open
Conversation
6c93c31 to
62383b4
Compare
62383b4 to
bf4d084
Compare
bf4d084 to
9d15c54
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caffeine
2.9.3dates to December 3, 2021; this bumps it to3.2.0(January 2025) — ~4.5 years and a major line newer. Dependabot ignores major updates for the gradle ecosystem (version-update:semver-major), so the catalog has stayed on 2.9.3.No production source changes are required: the API Iceberg uses (
Caffeine.newBuilder,expireAfterAccess/expireAfterWrite,maximumSize,softValues/weakValues,removalListener,Ticker,LoadingCache) is unchanged between 2.x and 3.x, and Iceberg already targets Java 17 (Caffeine 3.x requires Java 11+).Bundled dependency changes. Caffeine 3.x migrated its nullness annotations from the Checker Framework to JSpecify, so the runtime bundles now pull
org.jspecify:jspecify:1.0in place oforg.checkerframework:checker-qual, along with a newercom.google.errorprone:error_prone_annotations. I regenerated the affectedruntime-deps.txtbaselines via./gradlew :<module>:generateRuntimeDeps(spark 3.5/4.0/4.1, flink 1.20/2.0/2.1, kafka-connect) and updated the spark/flink runtimeLICENSEfiles to swap the checker-qual entry for JSpecify (Apache-2.0).aws-bundleis intentionally unchanged — it pulls Caffeine 2.9 transitively from the AWS SDK, independent of this catalog version.checkRuntimeDepspasses for the spark and flink runtimes.Test change.
TestCacheMetricsReport#testCacheMetricsFromCaffeineCacheasserted an exact eviction count of 2. Under Caffeine 3.x that scenario's weighted-eviction count is implementation-dependent (the admission policy may evict the incoming entry or existing ones, yielding 1 or 2 across runs), so the assertion now checksevictionCount()is non-zero instead of an exact value. Only the test assertion changed;CacheMetricsReportitself is unchanged.Why it's worth doing, tied to how Iceberg uses Caffeine:
sun.misc.Unsafedependency in favor ofVarHandle(since 3.0).Unsafememory access is deprecated for removal and warns on recent JDKs, so this matters for Iceberg/Spark running on newer Java.expireAfterWritepath: 3.2 extended the expiration-write optimization to more operations. Iceberg already usesexpireAfterWrite(StandardEncryptionManager,RESTTableCache, the S3 REST signer cache), and implement cache policy #14440 is proposing to add it to the catalog cache as well.Verified
iceberg-core,iceberg-aws,iceberg-hive-metastore,iceberg-spark-4.1, andiceberg-flink-1.20compile, and core cache tests pass.