thetumbled opened a new issue, #18388:
URL: https://github.com/apache/pulsar/issues/18388

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   latest.
   
   ### Minimal reproduce step
   
    ConcurrentLongLongPairHashMap  use optimistic locking to read data in 
Section, but if there is another thread that writing data to the same Section, 
and trigger the shrink process, then the index calculated using dirty capacity 
exceed the array size,  an ArrayIndexOut0fBoundsException will be throw, which 
is not handled. Eventually the connection with client will be closed.
   
   ### What did you expect to see?
   
   ```
   WARN org.apache.pulsar.broker.service.Servernx-[] Got exception, cause: 
java.lang.ArrayIndexOut0fBoundsException: Index 6821 out of bounds for length 4
   096, stackTrace: java.lang.ArrayIndexOutOfBoundsException: Index 6821 out of 
bounds for length 4096
   
atorg.apache.pulsar.common.util.collections.ConcurrentLongLongPairHashMap$Section.get(ConcurrentLongLongPairHashMap.java:331)
   
atorg.apache.pulsar.common.util.collections.ConcurrentLongLongPairHashMap.get(ConcurrentLongLongPairHashMap.java:204)
   at 
org.apache.pulsar.common.util.collections.ConcurrentLongLongPairHashMap.containsKey(ConcurrentLongLongPairHashMap.java:208)
   at 
org.apache.pulsar.broker.service.Consumer.getAckOwnerConsumer(Consumer.java:596)
   at 
org.apache.pulsar.broker.service.Consumer.individualAckNormal(Consumer.java:408)
   at org.apache.pulsar.broker.service.Consumer.messageAcked(Consumer.java:395)
   at org.apache.pulsar .broker 
.service.ServerCnx.handleAck(Server(nx.java:1456)
   at 
org.apache.pulsar.common.protocol.PulsarDecoder.channelRead(PulsarDecoder.java:145)
   ```
   
   ### What did you see instead?
   
   ,
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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]

Reply via email to