lhotari commented on code in PR #23817:
URL: https://github.com/apache/pulsar/pull/23817#discussion_r1905836128
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/intercept/ManagedLedgerInterceptorImplTest.java:
##########
@@ -446,26 +446,33 @@ public Processor inputProcessor() {
return new Processor() {
@Override
public ByteBuf process(Object contextObj, ByteBuf
inputPayload) {
- throw new RuntimeException(failureMsg);
+ Commands.skipBrokerEntryMetadataIfExist(inputPayload);
Review Comment:
In branch-3.0 & branch-3.3, the test fails due to this line. Removing it
makes the test pass.
```
java.lang.IndexOutOfBoundsException: readerIndex(0) + length(2) exceeds
writerIndex(1): UnpooledDuplicatedByteBuf(ridx: 0, widx: 1, cap: 256,
unwrapped: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx:
0, widx: 1, cap: 256))
at
io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442)
~[netty-buffer-4.1.116.Final.jar:4.1.116.Final]
at io.netty.buffer.AbstractByteBuf.readShort(AbstractByteBuf.java:749)
~[netty-buffer-4.1.116.Final.jar:4.1.116.Final]
at
org.apache.pulsar.common.protocol.Commands.skipBrokerEntryMetadataIfExist(Commands.java:1706)
~[classes/:?]
at
org.apache.pulsar.broker.intercept.ManagedLedgerInterceptorImplTest$3$1.process(ManagedLedgerInterceptorImplTest.java:454)
~[test-classes/:?]
at
org.apache.pulsar.broker.intercept.ManagedLedgerInterceptorImpl.processPayload(ManagedLedgerInterceptorImpl.java:171)
~[classes/:?]
at
org.apache.pulsar.broker.intercept.ManagedLedgerInterceptorImpl.processPayloadBeforeLedgerWrite(ManagedLedgerInterceptorImpl.java:196)
~[classes/:?]
at
org.apache.bookkeeper.mledger.impl.OpAddEntry.initiate(OpAddEntry.java:143)
~[classes/:?]
at
org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.internalAsyncAddEntry(ManagedLedgerImpl.java:873)
~[classes/:?]
at
org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl.lambda$asyncAddEntry$2(ManagedLedgerImpl.java:787)
~[classes/:?]
at
org.apache.bookkeeper.common.util.SingleThreadSafeScheduledExecutorService$SafeRunnable.run(SingleThreadSafeScheduledExecutorService.java:46)
~[bookkeeper-common-4.16.6.jar:4.16.6]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java) ~[?:?]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
~[?:?]
at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
~[netty-common-4.1.116.Final.jar:4.1.116.Final]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
```
--
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]