Digest not set on FlushHeader on suspect member during a flush
--------------------------------------------------------------
Key: JGRP-445
URL:
http://jira.jboss.com/jira/browse/JGRP-445
Project: JGroups
Issue Type: Bug
Affects Versions: 2.5
Reporter: Michael Newcomb
Assigned To: Bela Ban
NullPointerException can occur in findVirtualSynchronyGaps() because the Digest is not
always set on the FlushHeader.
The below fix works, but not sure of it's implications.
private void onSuspect(Address address)
{
...
if (flushOkCompleted)
{
Digest digest = (Digest)down_prot.down(new Event(Event.GET_DIGEST));
// ************* Patch ************
FlushHeader fh = new FlushHeader(FlushHeader.FLUSH_COMPLETED, viewID);
fh.addDigest(digest);
m.putHeader(getName(),fh);
// ************* Patch ************
// original
// m.putHeader(getName(), new FlushHeader(FlushHeader.FLUSH_COMPLETED, viewID));
down_prot.down(new Event(Event.MSG, m));
if (log.isDebugEnabled())
log.debug(localAddress + " sent FLUSH_COMPLETED message to " +
flushCoordinator);
}
...
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira