Bug 879570 - StateChunk with isLastChunk=true not sent when all entries are sent ahead
Summary: StateChunk with isLastChunk=true not sent when all entries are sent ahead
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.1.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-23 11:03 UTC by Radim Vansa
Modified: 2013-10-07 00:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-2546 0 Blocker Resolved StateChunk with isLastChunk=true not sent when all entries are sent ahead 2013-02-25 13:11:41 UTC

Description Radim Vansa 2012-11-23 11:03:17 UTC
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.

Comment 1 JBoss JIRA Server 2012-12-04 11:53:58 UTC
Mircea Markus <mmarkus> made a comment on jira ISPN-2546

[~rvansa] very good bug description!


Note You need to log in before you can comment on or make changes to this bug.