zhangmeng916 commented on a change in pull request #1460:
URL: https://github.com/apache/helix/pull/1460#discussion_r504172942
##########
File path:
helix-core/src/main/java/org/apache/helix/messaging/handling/AsyncCallbackService.java
##########
@@ -113,12 +104,19 @@ public HelixTaskResult handleMessage() throws
InterruptedException {
+ _correlationId);
AsyncCallback callback = _callbackMap.get(_correlationId);
- synchronized (callback) {
- callback.onReply(_message);
- if (callback.isDone()) {
- _logger.info("Removing finished callback, correlationid:" +
_correlationId);
- _callbackMap.remove(_correlationId);
+ if (callback != null) {
+ synchronized (callback) {
+ callback.onReply(_message);
+ if (callback.isDone()) {
+ _logger.info("Removing finished callback, correlationid:" +
_correlationId);
+ _callbackMap.remove(_correlationId);
+ }
}
+ } else {
+ String msg = "Message " + _message.getMsgId()
+ + " does not have correponding callback. Probably timed out
already. Correlation id: "
+ + _correlationId;
+ _logger.warn(msg);
Review comment:
All i would like to ask is whether removing the previous thrown
exception will cause any information lost. If it's ok, then I'm fine.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]