You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/04/16 16:01:43 UTC
[GitHub] xuehuashanshu opened a new issue #287: WaitNotifyObject class may
be a wake up error
xuehuashanshu opened a new issue #287: WaitNotifyObject class may be a wake up error
URL: https://github.com/apache/rocketmq/issues/287
describe:
WaitNotifyObject is a tool class,it can make threads wait or wake.However, I found that it didn't update the cache when the thread group wakes up. This may be an error.
https://github.com/apache/rocketmq/blob/3d56841fcc0cb9666307396d549343379a56b45c/store/src/main/java/org/apache/rocketmq/store/ha/WaitNotifyObject.java#L64-L77
'waiting' uses 'false' tags.'wake uping' uses 'true' tags.Maybe it can be corrected in the following way:
for (Long key : this.waitingThreadTable.keySet()) {
needNotify = needNotify || !waitingThreadTable.get(key);
waitingThreadTable.put(key, true);
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services