New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some corner cases fixes #462
Conversation
jraft-core/src/main/java/com/alipay/sofa/jraft/core/Replicator.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/core/Replicator.java
Outdated
Show resolved
Hide resolved
jraft-core/src/main/java/com/alipay/sofa/jraft/core/Replicator.java
Outdated
Show resolved
Hide resolved
@fengjiachun @ujjboy @zongtanghu 有空帮忙看下 |
* Run closure with status in thread pool. | ||
*/ | ||
public static Future<?> runClosureInThread(final Closure done, final Status status) { | ||
if (done == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式,缩进问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
会统一改下
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/LogManagerImpl.java
Show resolved
Hide resolved
I have already put forward some code review suggestion. @killme2008 |
break; | ||
case DESTROYED: | ||
Utils.runInThread(() -> listener.onDestroyed(peer)); | ||
RpcUtils.runInThread(() -> listener.onDestroyed(peer)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式有问题
break; | ||
case ERROR: | ||
Utils.runInThread(() -> listener.onError(peer, status)); | ||
RpcUtils.runInThread(() -> listener.onError(peer, status)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式有问题
@@ -839,7 +840,7 @@ public static void waitForCaughtUp(final ThreadId id, final long maxMargin, fina | |||
final Replicator r = (Replicator) id.lock(); | |||
|
|||
if (r == null) { | |||
Utils.runClosureInThread(done, new Status(RaftError.EINVAL, "No such replicator")); | |||
RpcUtils.runClosureInThread(done, new Status(RaftError.EINVAL, "No such replicator")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式
Main changes: