seanyinx commented on a change in pull request #114: SCB-227 stop sub tx from
running when global tx failed
URL:
https://github.com/apache/incubator-servicecomb-saga/pull/114#discussion_r161518352
##########
File path:
omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/LoadBalancedClusterMessageSender.java
##########
@@ -150,13 +153,14 @@ private MessageSender fastestSender() {
.filter(entry -> entry.getValue() < Long.MAX_VALUE)
.min(Comparator.comparingLong(Entry::getValue))
.map(Entry::getKey)
- .orElse((event -> {
+ .orElse(event -> {
try {
- availableMessageSenders.take().send(event);
- } catch (InterruptedException e) {
+ return availableMessageSenders.take().send(event);
+ } catch (InterruptedException ignored) {
Thread.currentThread().interrupt();
}
- }));
+ throw new OmegaException("Failed to send event " + event + " due to
interruption");
Review comment:
preferably to move this line to catch clause and pass interrupted exception
to its constructor
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services