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

StateChunk with isLastChunk=true not sent when all entries are sent ahead

    XMLWordPrintable

Details

    Description

      During a state transfer the entries are sent batched to chunks. However, if all entries are sent in the non-last chunk, the list in entriesBySegment.get(segmentId) is empty. The code for sending last chunks is following:

      OutboundTransferTask.sendEntries(...)
      ...
      if (isLast) {
               for (int segmentId : segments) {
                  List<InternalCacheEntry> entries = entriesBySegment.get(segmentId);
                  if (entries == null) {
                     chunks.add(new StateChunk(segmentId, InfinispanCollections.<InternalCacheEntry>emptyList(), true));
                  }
               }
            }
      ...
      

      See that the check is entries == null but not entries.isEmpty().
      This causes to leave some segments unfinished, never finishing the state transfer.

      Attachments

        Activity

          People

            anistor Adrian Nistor (Inactive)
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: