chanjarster commented on a change in pull request #599: SCB-1604 modify 
InterruptedException
URL: https://github.com/apache/servicecomb-pack/pull/599#discussion_r349445529
 
 

 ##########
 File path: 
omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/ForwardRecovery.java
 ##########
 @@ -66,6 +66,7 @@ public Object applyTo(ProceedingJoinPoint joinPoint, 
Compensable compensable, Co
         }
       }
     } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
 
 Review comment:
   I use the method mentioned 
[here](https://chanjarster.github.io/post/java-remote-debug/) and 
[here](https://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html)
 to debug the code when `mvn clean install`.
   Weird things happens, the execution goes into ForwardRecovery#L69 which is 
not possible:
   ```java
       } catch (InterruptedException e) {
   >L69  String errorMessage = "Failed to handle tx because it is interrupted, 
global tx id: " + context.globalTxId()
             + ", local tx id: " + context.localTxId() + ", method: " + 
method.toString();
         LOG.error(errorMessage);
         interceptor.onError(parentTxId, compensationMethodSignature(joinPoint, 
compensable, method), e);
         throw new OmegaException(errorMessage);
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to