Hi Niclas,

In this commit[1] we make ResourceUsage in your report immutable. It seems
that in your final class loading result, it loads 2.9.1's LoadManagerShared
and 2.10.0's ResourceUsage, where 2.9.1 code assume field 'usage' is
mutable.

Could you try to check the effective classpath, especially which version of
pulsar-broker and pulsar-client-admin-api is in use?

Best,
tison.

[1]
https://github.com/apache/pulsar/commit/a2559923877b005e4eec797214d1bcd9fb378df7


Niclas Hedhman <nic...@hedhman.org> 于2022年6月15日周三 23:17写道:

> Hi,
> I have had a Pulsar system running for ~5 months and have had no
> problems.
>
> Today I updated my application that uses Pulsar, and everything stopped
> working. I naturally assumed that the problem was in my application. And
> after a lot of debugging I realized that it was Pulsar not delivering
> messages.
>
> "Maybe ran out of memory, let's restart. Oh well, why not upgrade to new
> version at the same time."
>
> And that failed, I got this "IllegalAccessError" and I thought, that the
> new version 2.10.0 required something special/new that I have not
> investigated, so go back to 2.9.1 and I still had the exception (see
> below). And I now think that this was the problem all the while...but
> how? No idea.
>
> Any pointers to what can cause this in 2.9.1 and/or 2.10.0 is most
> welcome.
>
>
> Thanks
> Niclas
>
>
> java.lang.IllegalAccessError: Update to non-static final field
> org.apache.pulsar.policies.data.loadbalancer.ResourceUsage.usage
> attempted from a different class
> (org.apache.pulsar.broker.loadbalance.impl.LoadManagerShared) than the
> field's declaring class
>          at
> org.apache.pulsar.broker.loadbalance.impl.LoadManagerShared.getSystemResourceUsage(LoadManagerShared.java:220)
>
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl.updateLocalBrokerData(ModularLoadManagerImpl.java:915)
>
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl.start(ModularLoadManagerImpl.java:876)
>
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerWrapper.start(ModularLoadManagerWrapper.java:102)
>
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.broker.PulsarService.startLoadManagementService(PulsarService.java:1022)
>
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.broker.PulsarService.start(PulsarService.java:737)
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.PulsarBrokerStarter$BrokerStarter.start(PulsarBrokerStarter.java:273)
>
> ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>          at
> org.apache.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:350)
> [org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
>

Reply via email to