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

Hotrod client tries to read one byte to much when Multimap returns KeyDoesNotExist

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 12.1.0.CR1
    • 12.0.0.Dev07, 11.0.8.Final
    • Hot Rod
    • None

    Description

      When using a mutimap.get(key) and the key is not in the multi map, a warning is printed:

      WARN [org.infinispan.HOTROD] (HotRod-client-async-pool-4-16) ISPN004098: Closing connection [...] due to transport error: org.infinispan.client.hotrod.exceptions.InvalidResponseException:: ISPN004003: Invalid magic number. Expected 0xa1 and received 0x0 ?

       

      This message could be traced back to here:

      https://github.com/infinispan/infinispan/blob/12.0.0.Dev07/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/multimap/operations/GetKeyMultimapOperation.java#L58-L64

      the package looks like: /magic:/0xA1, /VLong:messageId:/0x22, /GET_MULTIMAP_RESPONSE:/0x68, /OperationStatus.KeyDoesNotExist:/0x02, /no topology change:/0x00, /???/0x00

      The problem is the extra 0x00 (compare to the warning)

      The "extra bytes" are the results size, in the case of "NOT_EXIST" 0
      https://github.com/infinispan/infinispan/blob/12.0.0.Dev07/server/hotrod/src/main/java/org/infinispan/server/hotrod/Encoder2x.java#L342

      But in the KeyDoesNotExist case Multimap does not read the extra bytes.

      Related Issue: https://issues.redhat.com/browse/ISPN-11630 

      Most likely introduced while fixing that issue:

      https://github.com/infinispan/infinispan/commit/70f40926971d4769b24b13c1b5ef2bf1cff8595c#diff-1727f645d1ecfd01fd8001f16314de147b4ac1c8f1cc4938dc7a404579acc8d2R341

       

       

      Related Chat: https://infinispan.zulipchat.com/#narrow/stream/118645-infinispan/topic/magic.20number.2E.20Expected.200xa1.20and.20received.200x0

      Attachments

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei (Inactive)
              stephan.koelle Stephan Kölle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: