GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — [fix][misc] Unable to connect an etcd metastore with recent releases due to jetc-core sharding problem by Shawyeok · Pull Request #23604 · apache/pulsar Conversation
|
Thank you, @Shawyeok! Great work. How did you find out that IntelliJ expects this format? Could we remove overriding of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Shawyeok Please submit a similar change to BookKeeper since there's a similar solution to shade jetcd-core in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sure, will do it tomorrow. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@ ## master #23604 +/- ## ============================================ + Coverage 73.57% 74.35% +0.78% - Complexity 32624 34443 +1819 ============================================ Files 1877 1944 +67 Lines 139502 147127 +7625 Branches 15299 16225 +926 ============================================ + Hits 102638 109398 +6760 - Misses 28908 29293 +385 - Partials 7956 8436 +480
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
### Motivation There is a potential jar shading issue introduced in #4426 that causes `NoClassDefFoundError` when connecting to an etcd metadata store. The `jetcd-core-shaded` module was introduced in #4426 to address the compatibility issues between jetcd-core’s grpc-java dependency and Netty. You can find more details [here][1] and in the [grpc-java documentation][2]. [1]: #4426 (comment) [2]: https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty Currently, we use `unpack-shaded-jar` execution unpacks the shaded jar produced by `maven-shade-plugin:shade` into the `jetcd-core-shaded/target/classes` directory. However, the classes in this directory conflict with its dependencies. If the `maven-shade-plugin:shade` runs again without cleaning this directory, it can produce an incorrect shaded jar. You can replicate and verify this issue with the following commands: ```shell # Step 1: Clean the build directory mvn clean # Step 2: Perform an install and unpack the shaded jar into a directory. # Verify the import statement for `io.netty.handler.logging.ByteBufFormat` in # `org/apache/pulsar/jetcd/shaded/io/vertx/core/net/NetClientOptions.class`. # The correct import should be: # `import io.grpc.netty.shaded.io.netty.handler.logging.ByteBufFormat;`. mvn install unzip $M2_REPO/org/apache/bookkeeper/metadata/drivers/jetcd-core-shaded/4.18.0-SNAPSHOT/jetcd-core-shaded-4.18.0-SNAPSHOT-shaded.jar \ -d metadata-drivers/jetcd-core-shaded/target/first-classes # Step 3: Run the install command again without cleaning. # The unpacked jar from the previous step will persist in `target/classes`. # Unpack the shaded jar into a different directory (e.g., second-classes) and check the import. # The incorrect import will be: # `import io.grpc.netty.shaded.io.grpc.netty.shaded.io.netty.handler.logging.ByteBufFormat;`. mvn install unzip $M2_REPO/org/apache/bookkeeper/metadata/drivers/jetcd-core-shaded/4.18.0-SNAPSHOT/jetcd-core-shaded-4.18.0-SNAPSHOT-shaded.jar \ -d metadata-drivers/jetcd-core-shaded/target/second-classes # Step 4: Use IntelliJ IDEA's "Compare Directories" tool to compare the `first-classes` # and `second-classes` directories. The differences in imports should become apparent. ``` We can remove the attach and unpack configurations, and it should work fine. This issue has already been [reported][3] in apache/pulsar, and a similar [patch][patch] has addressed it. [3]: apache/pulsar#23513 [patch]: apache/pulsar#23604
…due to jetc-core sharding problem (#23604) Co-authored-by: Lari Hotari <[email protected]> (cherry picked from commit 89ccb73)
…due to jetc-core sharding problem (#23604) Co-authored-by: Lari Hotari <[email protected]> (cherry picked from commit 89ccb73)
…due to jetc-core sharding problem (#23604) Co-authored-by: Lari Hotari <[email protected]> (cherry picked from commit 89ccb73)
…due to jetc-core sharding problem (apache#23604) Co-authored-by: Lari Hotari <[email protected]> (cherry picked from commit 89ccb73) (cherry picked from commit 23f1ef0)
…due to jetc-core sharding problem (apache#23604) Co-authored-by: Lari Hotari <[email protected]> (cherry picked from commit 89ccb73) (cherry picked from commit 23f1ef0)
…due to jetc-core sharding problem (apache#23604) Co-authored-by: Lari Hotari <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug] NoClassDefFoundError: io/grpc/netty/shaded/io/grpc/netty/shaded/io/netty/handler/logging/ByteBufFormat
There was an error while loading. Please reload this page.