-
Notifications
You must be signed in to change notification settings - Fork 614
upgraded lz4 version #2706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgraded lz4 version #2706
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the LZ4 compression library from version 1.8.0 to 1.10.2, switching from the org.lz4 group to the at.yawk.lz4 fork. The upgrade addresses security concerns and JVM limitations in the latest version, which no longer includes the Unsafe factory instance. A test assertion was updated to accommodate both JavaSafe and JavaUnsafe implementations.
Key Changes:
- Updated LZ4 version from 1.8.0 to 1.10.2 with new Maven group ID
- Removed
lz4-pure-javadependency in favor of unifiedlz4-javaartifact - Modified test to handle both safe and unsafe LZ4 implementations
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Updated LZ4 version property and changed groupId in dependency management, removed lz4-pure-java dependency |
| client-v2/pom.xml | Changed LZ4 dependency groupId to at.yawk.lz4 |
| client-v2/src/test/java/com/clickhouse/client/ClientTests.java | Updated test assertion to accept both JavaSafe and JavaUnsafe implementations |
| clickhouse-r2dbc/pom.xml | Changed LZ4 dependency groupId to at.yawk.lz4 |
| clickhouse-jdbc/pom.xml | Changed LZ4 dependency groupId to at.yawk.lz4 |
| clickhouse-http-client/pom.xml | Removed lz4-pure-java dependency, added lz4-java as test dependency, updated shading configuration |
| clickhouse-data/pom.xml | Changed LZ4 dependency groupId to at.yawk.lz4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
clickhouse-http-client/pom.xml
Outdated
| <dependency> | ||
| <groupId>at.yawk.lz4</groupId> | ||
| <artifactId>lz4-java</artifactId> | ||
| <scope>test</scope> |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lz4-java dependency was previously available at runtime (optional) but is now only available in test scope. If LZ4 compression is used in production code within this module, this change may cause runtime failures. Verify whether this dependency should have compile or runtime scope instead of test scope.
| <scope>test</scope> | |
| <optional>true</optional> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix it.
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
mzitnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just address cursor comments
|
Just for records - LZ4 still present in shaded file |
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.lz4</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Native-image configs reference potentially missing Unsafe LZ4 classes
Medium Severity
The library upgrade to at.yawk.lz4:lz4-java removes Unsafe factory instances per the PR description, and the test was updated accordingly to accept either JavaSafe or JavaUnsafe. However, the native-image reflection configs in clickhouse-jdbc and jdbc-v2 still reference LZ4JavaUnsafeCompressor, LZ4JavaUnsafeFastDecompressor, LZ4JavaUnsafeSafeDecompressor, and LZ4HCJavaUnsafeCompressor classes with their INSTANCE fields. If these classes or fields no longer exist in the new library, GraalVM native-image builds will fail when attempting to register these for reflection.
Additional Locations (1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not see any references in native image.
|



Summary
at.yawk.lz4BUT package has not been changed so NO relocation rules should be changed.Closes #2697
Checklist
Delete items not relevant to your PR:
Note
Upgrade LZ4 and dependency coordinates
lz4.versionto1.10.2and replacesorg.lz4withat.yawk.lz4forlz4-javaacross modules (clickhouse-data,clickhouse-http-client,clickhouse-jdbc,clickhouse-r2dbc,client-v2, rootpom.xml).org.lz4:lz4-pure-javadependency and its shaded include; updates shade includes toat.yawk.lz4:lz4-javawhere applicable.Tests
client-v2testClientTests.testDisableNative()to acceptJavaSafeorJavaUnsafeintoString()due to changes in LZ4 factory availability.Written by Cursor Bugbot for commit bafb3c5. This will update automatically on new commits. Configure here.