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

NoSuchElementException in Hot Rod Encoder

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 5.2.0.CR1
    • 5.2.0.Beta4
    • Remote Protocols
    • None

    Description

      Tomas noticed this a while ago in a specific functional test:
      https://bugzilla.redhat.com/show_bug.cgi?id=875151

      I'm creating a more general JIRA, cause I'm having this in resilience test.

      What I found by quick debug, is that here:

      https://github.com/infinispan/infinispan/blob/master/server/hotrod/src/main/scala/org/infinispan/server/hotrod/Encoders.scala#L106

                     for (segmentIdx <- 0 until numSegments) {
                        val denormalizedSegmentHashIds = allDenormalizedHashIds(segmentIdx)
                        val segmentOwners = ch.locateOwnersForSegment(segmentIdx)
                        for (ownerIdx <- 0 until segmentOwners.length) {
                           val address = segmentOwners(ownerIdx % segmentOwners.size)
                           val serverAddress = members(address)
                           val hashId = denormalizedSegmentHashIds(ownerIdx)
                           log.tracef("Writing hash id %d for %s:%s", hashId, serverAddress.host, serverAddress.port)
                           writeString(serverAddress.host, buf)
                           writeUnsignedShort(serverAddress.port, buf)
                           buf.writeInt(hashId)
                        }
                     }
      

      we're trying to obtain serverAddress for nonexistent address and NoSuchElementException is not handled properly.
      It hapens after I kill a node in a resilience test and the exception appears when querying for the node in the members cache.

      Attachments

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei (Inactive)
              mlinhard Michal Linhard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: