[ 
https://issues.apache.org/jira/browse/RATIS-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xinyu Tan reassigned RATIS-1889:
--------------------------------

    Assignee: Xinyu Tan

> NoSuchMethodError: RaftServerMetricsImpl.addNumPendingRequestsGauge
> -------------------------------------------------------------------
>
>                 Key: RATIS-1889
>                 URL: https://issues.apache.org/jira/browse/RATIS-1889
>             Project: Ratis
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 2.5.1
>            Reporter: Song Ziyang
>            Assignee: Xinyu Tan
>            Priority: Major
>
>  
> Error: Exception in thread "0@group-000100000001-LeaderElection10" 
> java.lang.NoSuchMethodError: 
> org.apache.ratis.server.metrics.RaftServerMetricsImpl.addNumPendingRequestsGauge(Ljava/util/function/Supplier;)V
> at 
> org.apache.ratis.server.impl.PendingRequests$RequestMap.<init>(PendingRequests.java:115)
> at 
> org.apache.ratis.server.impl.PendingRequests.<init>(PendingRequests.java:224)
> at 
> org.apache.ratis.server.impl.LeaderStateImpl.<init>(LeaderStateImpl.java:341)
> at org.apache.ratis.server.impl.RoleInfo.updateLeaderState(RoleInfo.java:82)
> at 
> org.apache.ratis.server.impl.RaftServerImpl.changeToLeader(RaftServerImpl.java:572)
> at org.apache.ratis.server.impl.LeaderElection.run(LeaderElection.java:248) 
> 16212 at java.lang.Thread.run(Thread.java:750)
>  
> The ratis jar was packaged  after snapshot-branch2, commit 
> 284ecbb25cb60a2ea3fde07fb71672fb122f53ac, using Oracle JDK 8u381 for Apple 
> Silicon. It ran well on my local env (with JRE 8u381). However, it failed in 
> github 
> CI([https://github.com/apache/iotdb/actions/runs/6117648373/job/16604591720)] 
> and [~tanxinyu]'s local computer (OpenJDK8 Zulu for Apple Silicon), 
> {*}reproducible{*}.
>  
> Previously I built ratis snapshot jars with  x86 JDK 8 and everything worked 
> just fine. I guess something goes wrong regarding Java Cross Platform 
> Compatibility. 
>  
> Miraculously, if we change the method reference (resource::getMegaSizeByte) 
> to lambda expression (() -> resource.getMegaSizeByte()), {*}the error goes 
> away{*}. 
> The semantics of method reference and lambda should be same (despite that 
> they do differ in byte code). 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to