Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12241

Client listener can miss events during failover

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 11.0.3.Final
    • Hot Rod, Listeners
    • None

      EventSocketTimeoutTest.testSocketTimeoutWithEvent is failing randomly in my environment, and sometimes in CI as well:

      17:59:15,954 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed: org.infinispan.client.hotrod.event.EventSocketTimeoutTest.testSocketTimeoutWithEvent
      java.lang.AssertionError: 
      	at org.testng.AssertJUnit.fail(AssertJUnit.java:59) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.assertTrue(AssertJUnit.java:24) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.assertNotNull(AssertJUnit.java:267) ~[testng-6.14.3.jar:?]
      	at org.testng.AssertJUnit.assertNotNull(AssertJUnit.java:259) ~[testng-6.14.3.jar:?]
      	at org.infinispan.client.hotrod.event.EventLogListener.pollEvent(EventLogListener.java:58) ~[test-classes/:?]
      	at org.infinispan.client.hotrod.event.EventLogListener.expectSingleEvent(EventLogListener.java:152) ~[test-classes/:?]
      	at org.infinispan.client.hotrod.event.EventLogListener.expectOnlyCreatedEvent(EventLogListener.java:122) ~[test-classes/:?]
      	at org.infinispan.client.hotrod.event.EventSocketTimeoutTest.lambda$testSocketTimeoutWithEvent$1(EventSocketTimeoutTest.java:58) ~[test-classes/:?]
      	at org.infinispan.client.hotrod.test.HotRodClientTestingUtil.withClientListener(HotRodClientTestingUtil.java:138) ~[test-classes/:?]
      	at org.infinispan.client.hotrod.event.EventSocketTimeoutTest.testSocketTimeoutWithEvent(EventSocketTimeoutTest.java:51) ~[test-classes/:?]
      

      The reason for the failure is that when the client closes a listener's channel (in this case after a socket read timeout), the listener is automatically re-added, but the client can still perform new writes while the listener is being added.

      Of course, other listeners can also perform new writes during the same time, and the listener will also miss the events for those writes.

              Unassigned Unassigned
              dberinde@redhat.com Dan Berindei (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: