Skip to content

Commit

Permalink
cells: update log message to describe why enqueing a message failed.
Browse files Browse the repository at this point in the history
The current log message does not describe why a message was thrown
away.  We have observed situations where the actual cause is not
obvious.

With this patch, the cause is logged.  The patch also distinguishes
between reply and non-reply messages.

Target: master
Requires-notes: no
Requires-book: no
Patch: https://rb.dcache.org/r/8225/
Acked-by: Tigran Mkrtchyan
  • Loading branch information
paulmillar committed May 22, 2015
1 parent 3c4a520 commit 9019d9b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions modules/cells/src/main/java/dmg/cells/nucleus/CellNucleus.java
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ void addToEventQueue(MessageEvent ce)
synchronized (_waitHash) {
_waitHash.put(msg.getLastUOID(), lock);
}
LOGGER.error("Message queue overflow. Dropping {}", ce);
LOGGER.error("Dropping reply: {}", e.getMessage());
}
} else {
try {
Expand All @@ -851,7 +851,7 @@ void addToEventQueue(MessageEvent ce)
} catch (RejectedExecutionException e) {
EventLogger.queueEnd(ce);
_eventQueueSize.decrementAndGet();
LOGGER.error("Message queue overflow. Dropping {}", ce);
LOGGER.error("Dropping message: {}", e.getMessage());
}
}
}
Expand Down Expand Up @@ -1069,6 +1069,12 @@ public void run()
}
}
}

@Override
public String toString()
{
return "Delivery-of-" + _message;
}
}

private class DeliverMessageTask implements Runnable
Expand Down Expand Up @@ -1111,5 +1117,11 @@ public void run()
}
}
}

@Override
public String toString()
{
return "Delivery-of-" + _event;
}
}
}

0 comments on commit 9019d9b

Please sign in to comment.