This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
commit 0f3ab0a9cb259a561597b7f49e37b76085db80d6 Author: imlijinting <imlijint...@outlook.com> AuthorDate: Sat Aug 25 12:04:24 2018 +0800 [SCB-865] Refactoring the Omega Interceptors 1. Removing parentId when dealing with error. --- .../saga/omega/transaction/SagaStartAnnotationProcessor.java | 4 ++-- .../apache/servicecomb/saga/omega/transaction/SagaStartAspect.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java index 066db09..b0b2de4 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java @@ -47,10 +47,10 @@ class SagaStartAnnotationProcessor { } } - void onError(String parentTxId, String compensationMethod, Throwable throwable) { + void onError(String compensationMethod, Throwable throwable) { String globalTxId = omegaContext.globalTxId(); sender.send( - new TxAbortedEvent(globalTxId, omegaContext.localTxId(), parentTxId, compensationMethod, + new TxAbortedEvent(globalTxId, omegaContext.localTxId(), null, compensationMethod, throwable)); } } diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAspect.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAspect.java index 5fb2fef..0dc3279 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAspect.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAspect.java @@ -59,7 +59,7 @@ public class SagaStartAspect { } catch (Throwable throwable) { // We don't need to handle the OmegaException here if (!(throwable instanceof OmegaException)) { - sagaStartAnnotationProcessor.onError(context.globalTxId(), method.toString(), throwable); + sagaStartAnnotationProcessor.onError(method.toString(), throwable); LOG.error("Transaction {} failed.", context.globalTxId()); } throw throwable;