[jboss-jira] [JBoss JIRA] Created: (JBCACHE-1123) Non-streaming state transfer failures not properly handled

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Fri Jul 6 12:14:52 EDT 2007


Non-streaming state transfer failures not properly handled
----------------------------------------------------------

                 Key: JBCACHE-1123
                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1123
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Clustering
    Affects Versions: 2.0.0.CR3
            Reporter: Brian Stansberry
         Assigned To: Manik Surtani
             Fix For: 2.0.0.CR4


I'm noticing spurious WARN messages in the logs from JGroups when caches do partial state transfers and the cache being requested doesn't have the target node available:

WARN  [org.jgroups.protocols.pbcast.STATE_TRANSFER] state received from 192.168.1.164:4655 is null, will return null state to application

Looking at the JBC state transfer code, particularly StateTransferManager.getState(ObjectOutputStream out, Fqn fqn, long timeout, boolean force, boolean suppressErrors), the apparent intent is for a boolean 'false' and a CacheException to be written to the stream, serialized, and returned to the requestor. The CacheException is also thrown.

This is breaking in CacheImpl.MessageListenerAdaptor.getState() and getState(String):

         try
         {
            ExposedByteArrayOutputStream baos = new ExposedByteArrayOutputStream(16 * 1024);
            out = new MarshalledValueOutputStream(baos);

            getStateTransferManager().getState(out, Fqn.fromString(sourceRoot),
                    configuration.getStateRetrievalTimeout(), true, true);
            result = baos.getRawBuffer();
         }
         catch (Throwable t)
         {
            stateProducingFailed(t);
         }
         finally
         {
            Util.close(out);
         }
         return result;

The CacheException is thrown from StateTransferManager.getState().  Therefore "result = baos.getRawBuffer();" is never invoked.  Therefore the returned state is null, leading to the WARN on the recipient.  This seems contrary to the intent to propagate the boolean + exception to the recipient.

-- 
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

        



More information about the jboss-jira mailing list