Conversation
killme2008
reviewed
Feb 15, 2017
| return; | ||
| } | ||
| this.started = true; | ||
| this.started = true; |
| } | ||
|
|
||
| if (this.stopped) { | ||
| throw new IllegalStateException("SelectorManager was stopped"); |
Author
There was a problem hiding this comment.
大神看我提的metaq issue:killme2008/Metamorphosis#129
客户端存在进入死循环,不强杀不退出的可能。
我的看法是,既然已经stop了,就不能再继续等,应该直接抛异常了。如果觉得这样不好,那有一种情况一定要抛异常,就是while语句为true,而线程又被interrupt,在这种情况下,状态已经不会变了,只能等整个程序退出。
Author
There was a problem hiding this comment.
我们的流集群崩溃,然后任务大面积卡住,哈,监控不全,哪些卡住都不知道
Author
There was a problem hiding this comment.
就是java进程不退出,kill命令发出去也不行,一定要kill -9才能杀掉。进程不退,占住metaq,新起来的又消费不了。
Owner
|
ok,这个知道了,其实 shutdown hook 是没有必要的。我会彻底修下,周末搞下。
2017-03-24 13:59 GMT+08:00 Jeffrey(Xilang) Yan <notifications@github.com>:
… ***@***.**** commented on this pull request.
------------------------------
In src/main/java/com/taobao/gecko/core/nio/impl/SelectorManager.java
<#5 (comment)>:
> @@ -148,7 +152,11 @@ void awaitReady() {
}
catch (final InterruptedException e) {
Thread.currentThread().interrupt();// reset interrupt status
- }
+ }
+
+ if (this.stopped) {
+ throw new IllegalStateException("SelectorManager was stopped");
就是java进程不退出,kill命令发出去也不行,一定要kill -9才能杀掉。进程不退,占住metaq,新起来的又消费不了。
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAA3Po_LXu8ioGqlreHsUCl4-eBZmttZks5ro1uzgaJpZM4MALs4>
.
--
庄晓丹
Email: killme2008@gmail.com xzhuang@avos.com
Site: http://fnil.net
Twitter: @killme2008
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在stopped状态,await应该异常退出,否则则进入是死循环