-
Notifications
You must be signed in to change notification settings - Fork 46
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
FIX: getOperationStatus method in asyncCollectionPipedInsert/Update. #621
Conversation
} | ||
} | ||
return new CollectionOperationStatus(true, "END", CollectionResponse.END); | ||
return mergedOperationStatus.get(0); |
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.
receivedStatus를 호출하는 곳에서 성공한 op의 status는
아래와 같이 설정하여 인수로 넣어줍니다.
기존 로직인 new CollectionOperationStatus(true, "END", CollectionResponse.END)
와 동일합니다.
public class CollectionPipedUpdateOperationImpl extends OperationImpl implements
CollectionPipedUpdateOperation {
private static final OperationStatus END = new CollectionOperationStatus(
true, "END", CollectionResponse.END);
}
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.
리뷰 완료
} | ||
} | ||
return new CollectionOperationStatus(true, "END", CollectionResponse.END); | ||
return mergedOperationStatus.get(0); |
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.
mergedOperationStatus가 empty인 경우는 없지만,
향후의 empty 경우를 고려하여 이 부분은 그대로 두시죠.
366d89d
to
d278823
Compare
mergedOperationStatus 필요 유무 검토오프라인에서 논의한대로
예를들어 정상적으로 piped가 동작하면 아래와 같이 응답이 옵니다.
|
d278823
to
e8e053d
Compare
mergedOperationStatus 필요 유무 재검토위 코멘트의 경우 해당 연산이 application단에서 cancel()이 호출되는 경우를 제외하고 작성되었습니다. 만약 리턴된 Future를 통해 op의 cancel()이 호출될 경우, //BaseOperatinImple
public final void cancel(String cause) {
cancelled = true;
if (handlingNode != null) {
cancelCause = "Cancelled (" + cause + " : (" + handlingNode.getNodeName() + ")" + ")";
} else {
cancelCause = "Cancelled (" + cause + ")";
}
wasCancelled();
callback.complete();
} 해당 메서드 로직에서는 wasCancelled()를 호출하고 이는 아래와 같습니다. protected void wasCancelled() {
getCallback().receivedStatus(STORE_CANCELED);
} 즉, 취소된 op의 상태를 receivedStatus를 그래서 결론적으로 |
e8e053d
to
6b20c98
Compare
@brido4125 |
6b20c98
to
4d479ec
Compare
#619
로부터 파생된 PR입니다.
piped 연산에서 getOperationStatus의 로직을 수정했습니다.