teragrep / rlp_03

Java RELP Server library
GNU Affero General Public License v3.0
1 stars 5 forks source link

Client: retried sends may result in double rsp for a same frame #159

Closed kortemik closed 4 months ago

kortemik commented 4 months ago

Description Client: retried sends may result in double rsp for a same frame. this will cause a following exception:

13.05.2024 17:40:38.087 [ERROR] [com.teragrep.rlp_03.channel.context.RelpReadImpl] [pool-2-thread-4] run() threw java.lang.IllegalStateException: txn not pending <[133]>
        at com.teragrep.rlp_03.client.TransactionService.complete(TransactionService.java:120)
        at com.teragrep.rlp_03.client.ClientDelegate.accept(ClientDelegate.java:81)
        at com.teragrep.rlp_03.channel.context.RelpReadImpl.processFrame(RelpReadImpl.java:234)
        at com.teragrep.rlp_03.channel.context.RelpReadImpl.run(RelpReadImpl.java:147)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

which needs to be handled

kortemik commented 4 months ago

this should not actually happen if server receiving is a proper one so exception in this case is very appropriate