lhotari commented on PR #23886: URL: https://github.com/apache/pulsar/pull/23886#issuecomment-2612674844
> Both the interface (`org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport`) and its implementation are being shaded, but the interface class isn’t being properly added to the shaded package. This mismatch is what’s causing the class resolution issue when using the shaded jar. > > To resolve this, we should ensure that the interface is also included in the shaded package, keeping it consistent with the implementation. Alternatively, as a simpler solution, we could consider removing that shading the `org.apache.pulsar.policies`, which would eliminate these classpath problems. Public interfaces shouldn't be shaded. Implementation classes should be shaded. That's the original intent. The mistake has been to use the classname in org.apache.pulsar.policies.data.loadbalancer.LoadReport#loadReportType field. Shading will change that to be the shaded class name and as a result of this, the deserialization will fail since there's a difference between client side and broker side for the value of the `loadReportType` field. This problem is addressed by the changes that I suggested in https://github.com/apache/pulsar/pull/23886#pullrequestreview-2572592840. -- 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]
