Skip to content
This repository was archived by the owner on Oct 13, 2024. It is now read-only.

[SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID #237

Closed
wants to merge 1 commit into from

Conversation

jeremyxu2010
Copy link
Contributor

  1. 补偿方法里通过omegaContext.globalTxId()和omegaContext.localTxId()可得到当前分布式事务的全局事务ID及本地事务ID
  2. 解决macOS系统下protoc-gen-grpc-java crash导致无法正常通过maven test的问题,升级依赖的protoc-gen-grpc-java版本,见 protoc-gen-grpc-java crashed on MaxOS grpc/grpc-java#1683
  3. 解决protoc-gen-grpc-java无法通过maven
    test的问题,补上缺失的grpc-stub依赖

Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ x ] Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • [ x ] Each commit in the pull request should have a meaningful subject line and body.
  • [ x ] Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
  • [ x ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • [ x ] Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

1. 补偿方法里通过omegaContext.globalTxId()和omegaContext.localTxId()可得到当前分布式事务的全局事务ID及本地事务ID
2. 解决macOS系统下protoc-gen-grpc-java crash导致无法正常通过maven test的问题,升级依赖的protoc-gen-grpc-java版本,见grpc/grpc-java#1683
3. 解决protoc-gen-grpc-java无法通过maven
test的问题,补上缺失的grpc-stub依赖
@@ -61,7 +61,7 @@
<akka.version>2.5.6</akka.version>
<rat.version>0.12</rat.version>
<maven.failsafe.version>2.19.1</maven.failsafe.version>
<grpc.version>1.11.0</grpc.version>
<grpc.version>1.14.0</grpc.version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the code which is not related to the JIRA subject.
It's hard for us to track the change.

Copy link
Member

@WillemJiang WillemJiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current solution just leverage the OmegaContext to pass the transaction ids. But the OmegaContext is not supposed to be shared in the application layer, as the user can change the OmegaContext by accident.
I think we can inject another context parameter if the compensation method has the parameter with the context type.
@jeremyxu2010
Please ping me in the gitter, I can give you more detail explanation there.

@WillemJiang
Copy link
Member

WillemJiang commented Aug 10, 2018

@jeremyxu2010 Thanks for your PR.
There still a simple issue of grpc-stub dependency. I just applied the patch manually after fixing the dependency issue.

@jeremyxu2010 jeremyxu2010 deleted the SCB-785 branch August 18, 2018 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants