Details
-
Bug
-
Resolution: Done
-
Major
-
11.0.9.Final, 12.0.1.Final
-
None
Description
When a HotRodOperation completes successfully, the complete() method cancels the timeout future. completeExceptionally() is not overridden, so when the HotRodOperation receives a server error and completes insuccessfully, the timeout future is not cancelled.
This means after the socket timeout expires, the client logs one more error:
19:53:00,719 WARN (Test-Client-Async-1-1:[]) [HOTROD] ISPN004005: Error received from the server: org.infinispan.commons.CacheConfigurationException: ISPN000374: No such template 'some_template_name' when declaring 'some_name' 19:53:01,681 TRACE (Test-Client-Async-1-1:[]) [RetryOnFailureOperation] Add 127.0.0.1/<unresolved>:35113 to failed servers 19:53:01,681 WARN (Test-Client-Async-1-1:[]) [HOTROD] ISPN004098: Closing connection [id: 0x11dbc4f6, L:/127.0.0.1:41478 - R:127.0.0.1/127.0.0.1:35113] due to transport error java.net.SocketTimeoutException: AdminOperation{(default), taskName=@@cache@create, params=[name=[B0x736F6D655F6E616D65, template=[B0x736F6D655F74656D706C6174655F6E61..[18], flags=[B0x564F4C4154494C45], flags=0, connection=127.0.0.1/127.0.0.1:35113} timed out after 1000 ms at org.infinispan.client.hotrod.impl.operations.HotRodOperation.run(HotRodOperation.java:175) at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
Functionality should not be affected, as even if there are other operations pending on the same connection they should handle an unexpected connection close just fine.