[jira] [Created] (SCB-784) SagaStart annontated
Willem Jiang created SCB-784: Summary: SagaStart annontated Key: SCB-784 URL: https://issues.apache.org/jira/browse/SCB-784 Project: Apache ServiceComb Issue Type: Task Components: Saga Reporter: Willem Jiang -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-784) SagaStart annotated method should abort the saga transaction once the exception is thrown
[ https://issues.apache.org/jira/browse/SCB-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-784: - Summary: SagaStart annotated method should abort the saga transaction once the exception is thrown (was: SagaStart annontated) > SagaStart annotated method should abort the saga transaction once the > exception is thrown > - > > Key: SCB-784 > URL: https://issues.apache.org/jira/browse/SCB-784 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-784) SagaStart annotated method should abort the saga transaction once the exception is thrown
[ https://issues.apache.org/jira/browse/SCB-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-784: Assignee: Willem Jiang > SagaStart annotated method should abort the saga transaction once the > exception is thrown > - > > Key: SCB-784 > URL: https://issues.apache.org/jira/browse/SCB-784 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Assignee: Willem Jiang >Priority: Major > Fix For: saga-0.3.0 > > > The below transaction should be aborted, now the Omega should send the abort > message back to the alpha. > {code} > @SagaStart > service() { > transaction1; > exception; > transaction2; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-784) SagaStart annotated method should abort the saga transaction once the exception is thrown
[ https://issues.apache.org/jira/browse/SCB-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-784: - Description: The below transaction should be aborted, now the Omega should send the abort message back to the alpha. {code} @SagaStart service() { transaction1; exception; transaction2; } {code} was: The below transaction should be aborted, now the Omega should send the abort message back to the alpha. {code} SagaStart service() { transaction1; exception; transaction2; } {code} > SagaStart annotated method should abort the saga transaction once the > exception is thrown > - > > Key: SCB-784 > URL: https://issues.apache.org/jira/browse/SCB-784 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Priority: Major > Fix For: saga-0.3.0 > > > The below transaction should be aborted, now the Omega should send the abort > message back to the alpha. > {code} > @SagaStart > service() { > transaction1; > exception; > transaction2; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-784) SagaStart annotated method should abort the saga transaction once the exception is thrown
[ https://issues.apache.org/jira/browse/SCB-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-784: - Description: The below transaction should be aborted, now the Omega should send the abort message back to the alpha. {code} SagaStart service() { transaction1; exception; transaction2; } {code} > SagaStart annotated method should abort the saga transaction once the > exception is thrown > - > > Key: SCB-784 > URL: https://issues.apache.org/jira/browse/SCB-784 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Priority: Major > Fix For: saga-0.3.0 > > > The below transaction should be aborted, now the Omega should send the abort > message back to the alpha. > {code} > SagaStart > service() { > transaction1; > exception; > transaction2; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-784) SagaStart annotated method should abort the saga transaction once the exception is thrown
[ https://issues.apache.org/jira/browse/SCB-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-784: - Fix Version/s: saga-0.3.0 > SagaStart annotated method should abort the saga transaction once the > exception is thrown > - > > Key: SCB-784 > URL: https://issues.apache.org/jira/browse/SCB-784 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Assignee: Willem Jiang >Priority: Major > Fix For: saga-0.3.0 > > > The below transaction should be aborted, now the Omega should send the abort > message back to the alpha. > {code} > @SagaStart > service() { > transaction1; > exception; > transaction2; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-777) Support @BeanParam annotation in JAX-RS developing style
[ https://issues.apache.org/jira/browse/SCB-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561113#comment-16561113 ] ASF GitHub Bot commented on SCB-777: yhs0092 opened a new pull request #843: [SCB-777] Support JAX-RS @BeanParam annotation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/843 Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) 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. - [x] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- See details in [SCB-777](https://issues.apache.org/jira/browse/SCB-777) 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: us...@infra.apache.org > Support @BeanParam annotation in JAX-RS developing style > > > Key: SCB-777 > URL: https://issues.apache.org/jira/browse/SCB-777 > Project: Apache ServiceComb > Issue Type: New Feature >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Minor > Fix For: java-chassis-1.1.0 > > > @BeanParam usage reference: > https://docs.oracle.com/javaee/7/api/javax/ws/rs/BeanParam.html > We need to support such kind of param annotation. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-777) Support @BeanParam annotation in JAX-RS developing style
[ https://issues.apache.org/jira/browse/SCB-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561131#comment-16561131 ] ASF GitHub Bot commented on SCB-777: coveralls commented on issue #843: [SCB-777] Support JAX-RS @BeanParam annotation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/843#issuecomment-408684677 [![Coverage Status](https://coveralls.io/builds/18216944/badge)](https://coveralls.io/builds/18216944) Coverage decreased (-0.06%) to 86.667% when pulling **d7f5caeb7ae48ac95cfa9533f9b25215188a9e72 on yhs0092:support_JAX-RS_BeanParam_annotation** into **e4b74c9745d40360d58a7600b50ce705be0bf0dc on apache:master**. 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: us...@infra.apache.org > Support @BeanParam annotation in JAX-RS developing style > > > Key: SCB-777 > URL: https://issues.apache.org/jira/browse/SCB-777 > Project: Apache ServiceComb > Issue Type: New Feature >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Minor > Fix For: java-chassis-1.1.0 > > > @BeanParam usage reference: > https://docs.oracle.com/javaee/7/api/javax/ws/rs/BeanParam.html > We need to support such kind of param annotation. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-785) 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID
Jeremy Xu created SCB-785: - Summary: 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID Key: SCB-785 URL: https://issues.apache.org/jira/browse/SCB-785 Project: Apache ServiceComb Issue Type: Improvement Components: Saga Affects Versions: saga-0.2.0 Reporter: Jeremy Xu 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: {code:java} @Autowired OmegaContext omegaContext; @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount) { // 这里可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount) { // 这里不可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.addBalanceByUsername(from, amount); } {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-785) 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561144#comment-16561144 ] ASF GitHub Bot commented on SCB-785: jeremyxu2010 opened a new pull request #232: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/232 Improve 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID 1. 补偿方法里通过omegaContext.globalTxId()和omegaContext.localTxId()可得到当前分布式事务的全局事务ID及本地 事务ID Follow this checklist to help us incorporate your contribution quickly and easily: - [ x ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) 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](https://www.apache.org/licenses/icla.pdf). --- 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: us...@infra.apache.org > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-735) Add admin dump api
[ https://issues.apache.org/jira/browse/SCB-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561324#comment-16561324 ] ASF GitHub Bot commented on SCB-735: codecov-io edited a comment on issue #396: SCB-735 Add admin dump api URL: https://github.com/apache/incubator-servicecomb-service-center/pull/396#issuecomment-406771272 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=h1) Report > Merging [#396](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/fc38b272a288cf322fa309402a98a89dc6b591f4?src=pr&el=desc) will **increase** coverage by `1.09%`. > The diff coverage is `77.41%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/graphs/tree.svg?width=650&token=GAaF7zrg8R&height=150&src=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=tree) ```diff @@Coverage Diff @@ ## master #396 +/- ## == + Coverage 71.71% 72.81% +1.09% == Files 39 118 +79 Lines4130 9742+5612 == + Hits 2962 7094+4132 - Misses 1001 2173+1172 - Partials 167 475 +308 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [pkg/chain/invocation.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-cGtnL2NoYWluL2ludm9jYXRpb24uZ28=) | `89.47% <ø> (ø)` | | | [server/core/backend/extend.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-c2VydmVyL2NvcmUvYmFja2VuZC9leHRlbmQuZ28=) | `75% <ø> (ø)` | | | [server/service/notification/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-c2VydmVyL3NlcnZpY2Uvbm90aWZpY2F0aW9uL2NvbW1vbi5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [pkg/task/executor.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-cGtnL3Rhc2svZXhlY3V0b3IuZ28=) | `76% <ø> (ø)` | | | [server/error/error.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-c2VydmVyL2Vycm9yL2Vycm9yLmdv) | `100% <ø> (ø)` | | | [server/govern/controller\_v4.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-c2VydmVyL2dvdmVybi9jb250cm9sbGVyX3Y0Lmdv) | `73.49% <ø> (ø)` | | | [server/core/backend/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-c2VydmVyL2NvcmUvYmFja2VuZC9jb21tb24uZ28=) | `75% <0%> (ø)` | | | [pkg/validate/url.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-cGtnL3ZhbGlkYXRlL3VybC5nbw==) | `0% <0%> (ø)` | | | [pkg/task/service.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-cGtnL3Rhc2svc2VydmljZS5nbw==) | `40% <0%> (ø)` | | | [server/service/watch.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree#diff-c2VydmVyL3NlcnZpY2Uvd2F0Y2guZ28=) | `70.96% <100%> (ø)` | :arrow_up: | | ... and [127 more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396/diff?src=pr&el=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=footer). Last update [fc38b27...da3d15a](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/396?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). 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: us...@infra.apache.org > Add admin dump api > -- > > Key: SCB-735 > URL: https://issues.apache
[jira] [Commented] (SCB-735) Add admin dump api
[ https://issues.apache.org/jira/browse/SCB-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561325#comment-16561325 ] ASF GitHub Bot commented on SCB-735: coveralls edited a comment on issue #396: SCB-735 Add admin dump api URL: https://github.com/apache/incubator-servicecomb-service-center/pull/396#issuecomment-406771280 [![Coverage Status](https://coveralls.io/builds/18220062/badge)](https://coveralls.io/builds/18220062) Coverage increased (+2.0%) to 76.352% when pulling **da3d15a7ba623124580a76c6f0d663a1a91c1872 on little-cui:admin** into **fc38b272a288cf322fa309402a98a89dc6b591f4 on apache:master**. 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: us...@infra.apache.org > Add admin dump api > -- > > Key: SCB-735 > URL: https://issues.apache.org/jira/browse/SCB-735 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-785) 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561328#comment-16561328 ] ASF GitHub Bot commented on SCB-785: WillemJiang commented on a change in pull request #232: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/232#discussion_r205996006 ## File path: omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java ## @@ -39,14 +44,21 @@ public void addCompensationContext(Method compensationMethod, Object target) { public void apply(String globalTxId, String localTxId, String compensationMethod, Object... payloads) { CompensationContextInternal contextInternal = contexts.get(compensationMethod); +String oldGlobalTxId = omegaContext.globalTxId(); +String oldLocalTxId= omegaContext.localTxId(); try { + omegaContext.setGlobalTxId(globalTxId); Review comment: Current solution is not good enough to be merged. OmegaContext is not static, the internal method could not use it directly. I think we could add annotation to help the user inject the context into the method. 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: us...@infra.apache.org > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-785: - Summary: Cannot get the GlobalTxId and LocalTxId in the compensation method (was: 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID) > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-785: - Description: 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: {code:java} @Autowired OmegaContext omegaContext; @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount) { // 这里可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount) { // 这里不可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.addBalanceByUsername(from, amount); } {code} was: 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: {code:java} @Autowired OmegaContext omegaContext; @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount) { // 这里可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount) { // 这里不可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.addBalanceByUsername(from, amount); } {code} > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561332#comment-16561332 ] Willem Jiang commented on SCB-785: -- I think we could introduce an transaction context to let the user leverage the internal Saga implementation, just like this {code:java} @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount, @TransactionContext context) { // 这里可以获得 System.out.println(context.globalTxId()); System.out.println(context.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount, @TransactionContext context) { // 这里不可以获得 System.out.println(context.globalTxId()); System.out.println(context.localTxId()); repo.addBalanceByUsername(from, amount); } {code} In this way we don't need to override the OmegaContext. > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561332#comment-16561332 ] Willem Jiang edited comment on SCB-785 at 7/30/18 2:24 AM: --- I think we could introduce an transaction context to let the user leverage the internal Saga implementation, just like this {code:java} @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount, @TransactionContext context) { //access the transaction related attribute from the TransactionContext System.out.println(context.globalTxId()); System.out.println(context.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount, @TransactionContext context) { //access the transaction related attribute from the TransactionContext System.out.println(context.globalTxId()); System.out.println(context.localTxId()); repo.addBalanceByUsername(from, amount); } {code} In this way we don't need to override the OmegaContext. was (Author: njiang): I think we could introduce an transaction context to let the user leverage the internal Saga implementation, just like this {code:java} @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount, @TransactionContext context) { // 这里可以获得 System.out.println(context.globalTxId()); System.out.println(context.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount, @TransactionContext context) { // 这里不可以获得 System.out.println(context.globalTxId()); System.out.println(context.localTxId()); repo.addBalanceByUsername(from, amount); } {code} In this way we don't need to override the OmegaContext. > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-785: - Description: 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。 Customer may want to access the globalTxId and LocalTxId in application to store these information into DB for the recovery. 示例代码如下: {code:java} @Autowired OmegaContext omegaContext; @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount) { // 这里可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount) { // 这里不可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.addBalanceByUsername(from, amount); } {code} was: 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。示例代码如下: {code:java} @Autowired OmegaContext omegaContext; @Compensable(timeout=5, compensationMethod="cancel") public boolean transferOut(String from, int amount) { // 这里可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.reduceBalanceByUsername(from, amount); } public boolean cancel(String from, int amount) { // 这里不可以获得 System.out.println(omegaContext.globalTxId()); System.out.println(omegaContext.localTxId()); repo.addBalanceByUsername(from, amount); } {code} > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。 > Customer may want to access the globalTxId and LocalTxId in application to > store these information into DB for the recovery. > 示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-785: - Fix Version/s: saga-0.3.0 > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > Fix For: saga-0.3.0 > > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。 > Customer may want to access the globalTxId and LocalTxId in application to > store these information into DB for the recovery. > 示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561371#comment-16561371 ] ASF GitHub Bot commented on SCB-785: WillemJiang commented on issue #232: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/232#issuecomment-408732047 @jeremyxu2010 You can ping me at https://gitter.im/ServiceCombUsers/Saga if you have any other question want to ask. 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: us...@infra.apache.org > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > Fix For: saga-0.3.0 > > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。 > Customer may want to access the globalTxId and LocalTxId in application to > store these information into DB for the recovery. > 示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-739) It is useless for @SagaStart timeout,and it could not be compensated under @SagaStart
[ https://issues.apache.org/jira/browse/SCB-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-739: - Affects Version/s: (was: saga-0.3.0) > It is useless for @SagaStart timeout,and it could not be compensated under > @SagaStart > - > > Key: SCB-739 > URL: https://issues.apache.org/jira/browse/SCB-739 > Project: Apache ServiceComb > Issue Type: Bug > Components: Saga > Environment: saga-spring-cloud-demo,Java8,Mac,Intellj Idea >Reporter: justdebugit >Assignee: Willem Jiang >Priority: Major > Fix For: saga-0.3.0 > > > I don't know what SagaStart annotation timeout use, because the timeout is > not work. > In the spring cloud demo,if hotel set a wrong address or port,the car service > may not be compensated > {code:java} > @SagaStart(timeout = 6) //timeout no use,can not affect compensate > @PostMapping("/booking/{name}/{rooms}/{cars}") > public String order(@PathVariable String name, @PathVariable Integer > rooms, @PathVariable Integer cars) { > template.postForEntity( > carServiceUrl + "/order/{name}/{cars}", > null, String.class, name, cars); >//if set a wrong hotel address,car service compensated method not be > triggered > template.postForEntity( > hotelServiceUrl + "/order/{name}/{rooms}", > null, String.class, name, rooms); > > postBooking(); > return name + " booking " + rooms + " rooms and " + cars + " cars OK"; > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-741) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'payloads' at row 1
[ https://issues.apache.org/jira/browse/SCB-741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-741: - Fix Version/s: saga-0.3.0 > Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long > for column 'payloads' at row 1 > > > Key: SCB-741 > URL: https://issues.apache.org/jira/browse/SCB-741 > Project: Apache ServiceComb > Issue Type: Bug > Components: Saga > Environment: Mac,Intellij Idea >Reporter: justdebugit >Assignee: Gao Xin >Priority: Major > Fix For: saga-0.3.0 > > > I encounter an Exception at Alpha Server > {code:java} > Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long > for column 'payloads' at row 1 > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3974) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source) ~[na:na] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[na:1.8.0_102] > at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102] > at > org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) > ~[tomcat-jdbc-8.5.31.jar:na] > at com.sun.proxy.$Proxy106.executeUpdate(Unknown Source) ~[na:na] > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:895) > ~[org.eclipse.persistence.core-2.7.1.jar:na] > ... 60 common frames omitted > {code} > I find it's because payload bytes is more than 10240 > {code:java} > public class TxAbortedEvent extends TxEvent { > public TxAbortedEvent(String globalTxId, String localTxId, String > parentTxId, String compensationMethod, Throwable throwable) { > super(EventType.TxAbortedEvent, globalTxId, localTxId, parentTxId, > compensationMethod, 0, "", 0, > stackTrace(throwable)); > } > private static String stackTrace(Throwable e) { > StringWriter writer = new StringWriter(); > e.printStackTrace(new PrintWriter(writer)); > return writer.toString(); > } > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-741) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'payloads' at row 1
[ https://issues.apache.org/jira/browse/SCB-741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved SCB-741. -- Resolution: Fixed The patch was merged into master branch. > Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long > for column 'payloads' at row 1 > > > Key: SCB-741 > URL: https://issues.apache.org/jira/browse/SCB-741 > Project: Apache ServiceComb > Issue Type: Bug > Components: Saga > Environment: Mac,Intellij Idea >Reporter: justdebugit >Assignee: Gao Xin >Priority: Major > Fix For: saga-0.3.0 > > > I encounter an Exception at Alpha Server > {code:java} > Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long > for column 'payloads' at row 1 > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3974) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source) ~[na:na] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[na:1.8.0_102] > at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102] > at > org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) > ~[tomcat-jdbc-8.5.31.jar:na] > at com.sun.proxy.$Proxy106.executeUpdate(Unknown Source) ~[na:na] > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:895) > ~[org.eclipse.persistence.core-2.7.1.jar:na] > ... 60 common frames omitted > {code} > I find it's because payload bytes is more than 10240 > {code:java} > public class TxAbortedEvent extends TxEvent { > public TxAbortedEvent(String globalTxId, String localTxId, String > parentTxId, String compensationMethod, Throwable throwable) { > super(EventType.TxAbortedEvent, globalTxId, localTxId, parentTxId, > compensationMethod, 0, "", 0, > stackTrace(throwable)); > } > private static String stackTrace(Throwable e) { > StringWriter writer = new StringWriter(); > e.printStackTrace(new PrintWriter(writer)); > return writer.toString(); > } > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-741) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'payloads' at row 1
[ https://issues.apache.org/jira/browse/SCB-741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-741: - Affects Version/s: (was: saga-0.3.0) > Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long > for column 'payloads' at row 1 > > > Key: SCB-741 > URL: https://issues.apache.org/jira/browse/SCB-741 > Project: Apache ServiceComb > Issue Type: Bug > Components: Saga > Environment: Mac,Intellij Idea >Reporter: justdebugit >Assignee: Gao Xin >Priority: Major > Fix For: saga-0.3.0 > > > I encounter an Exception at Alpha Server > {code:java} > Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long > for column 'payloads' at row 1 > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3974) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998) > ~[mysql-connector-java-5.1.46.jar:5.1.46] > at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source) ~[na:na] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[na:1.8.0_102] > at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102] > at > org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) > ~[tomcat-jdbc-8.5.31.jar:na] > at com.sun.proxy.$Proxy106.executeUpdate(Unknown Source) ~[na:na] > at > org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:895) > ~[org.eclipse.persistence.core-2.7.1.jar:na] > ... 60 common frames omitted > {code} > I find it's because payload bytes is more than 10240 > {code:java} > public class TxAbortedEvent extends TxEvent { > public TxAbortedEvent(String globalTxId, String localTxId, String > parentTxId, String compensationMethod, Throwable throwable) { > super(EventType.TxAbortedEvent, globalTxId, localTxId, parentTxId, > compensationMethod, 0, "", 0, > stackTrace(throwable)); > } > private static String stackTrace(Throwable e) { > StringWriter writer = new StringWriter(); > e.printStackTrace(new PrintWriter(writer)); > return writer.toString(); > } > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-774) Unexpected warn log is printed while the service is exiting if there are reactive operations
[ https://issues.apache.org/jira/browse/SCB-774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] YaoHaishi resolved SCB-774. --- Resolution: Fixed PR has been merged > Unexpected warn log is printed while the service is exiting if there are > reactive operations > > > Key: SCB-774 > URL: https://issues.apache.org/jira/browse/SCB-774 > Project: Apache ServiceComb > Issue Type: Bug >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Major > Fix For: java-chassis-1.1.0 > > > In reactive mode, the ReactiveExecutor is used as executor by default. And > the ReactiveExecutor is not a subclass of ExecutorService or Closeable, which > cause the ProducerProviderManager treats the ReactiveExecutor as a kind of > unclosable executor and prints the warn log. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-786) when instances cache is not sync to SC caused by bug, auto fix it.
wujimin created SCB-786: --- Summary: when instances cache is not sync to SC caused by bug, auto fix it. Key: SCB-786 URL: https://issues.apache.org/jira/browse/SCB-786 Project: Apache ServiceComb Issue Type: New Feature Components: Java-Chassis Reporter: wujimin Assignee: wujimin Fix For: java-chassis-1.1.0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-786) when instances cache is not sync to SC caused by bug, auto fix it.
[ https://issues.apache.org/jira/browse/SCB-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561396#comment-16561396 ] ASF GitHub Bot commented on SCB-786: wujimin opened a new pull request #844: [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/844 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: us...@infra.apache.org > when instances cache is not sync to SC caused by bug, auto fix it. > -- > > Key: SCB-786 > URL: https://issues.apache.org/jira/browse/SCB-786 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-751) The load balancer of Saga may be faced with peak problem.
[ https://issues.apache.org/jira/browse/SCB-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-751: Assignee: Willem Jiang > The load balancer of Saga may be faced with peak problem. > - > > Key: SCB-751 > URL: https://issues.apache.org/jira/browse/SCB-751 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 > Environment: project: incubator-servicecomb-saga-0.2.0 >Reporter: Gannalyo >Assignee: Willem Jiang >Priority: Major > Labels: load-balancer, saga > Fix For: saga-0.3.0 > > Original Estimate: 48h > Remaining Estimate: 48h > > Currently, Saga's load balancer will *select a fastest 'MessageSender'* to > send msg from pool. > My problem: > At some point, if every Alpha node need take 10 minutes to handle business > for some reasons(e.g. network), that means, Saga will handle all following > requests by the fastest 'MessageSender' within 10 minutes. > So, I think that the performance for Saga's load balancer will get a discount. > Of course, I believe one alpha node can handle many many requests. Just for > improving Saga. > Part of code from LoadBalancedClusterMessageSender.java > {code:java} > ... > MessageSender messageSender = fastestSender(); > try { > long startTime = System.nanoTime(); > AlphaResponse response = messageSender.send(event); > senders.put(messageSender, System.nanoTime() - startTime); > return response; > } catch (OmegaException e) { > throw e; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-751) The load balancer of Saga may be faced with peak problem.
[ https://issues.apache.org/jira/browse/SCB-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-751: - Description: Currently, Saga's load balancer will *select a fastest 'MessageSender'* to send msg from pool. My problem: At some point, if every Alpha node need take 10 minutes to handle business for some reasons(e.g. network), that means, Saga will handle all following requests by the fastest 'MessageSender' within 10 minutes. So, I think that the performance for Saga's load balancer will get a discount. Of course, I believe one alpha node can handle many many requests. Just for improving Saga. Part of code from LoadBalancedClusterMessageSender.java {code:java} ... MessageSender messageSender = fastestSender(); try { long startTime = System.nanoTime(); AlphaResponse response = messageSender.send(event); senders.put(messageSender, System.nanoTime() - startTime); return response; } catch (OmegaException e) { throw e; } {code} was: Currently, Saga's load balancer will *select a fastest 'MessageSender'* to send msg from pool. My problem: At some point, if every Alpha node need take 10 minutes to handle business for some reasons(e.g. network), that means, Saga will handle all following requests by the fastest 'MessageSender' within 10 minutes. So, I think that the performance for Saga's load balancer will get a discount. Of course, I believe one alpha node can handle many many requests. Just for improving Saga. {code:java} //代码占位符 {code} Part of code from LoadBalancedClusterMessageSender.java MessageSender messageSender = fastestSender(); try \{ long startTime = System.nanoTime(); AlphaResponse response = messageSender.send(event); senders.put(messageSender, System.nanoTime() - startTime); return response; } catch (OmegaException e) \{ throw e; } {code:java} //代码占位符 {code} > The load balancer of Saga may be faced with peak problem. > - > > Key: SCB-751 > URL: https://issues.apache.org/jira/browse/SCB-751 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 > Environment: project: incubator-servicecomb-saga-0.2.0 >Reporter: Gannalyo >Priority: Major > Labels: load-balancer, saga > Fix For: saga-0.3.0 > > Original Estimate: 48h > Remaining Estimate: 48h > > Currently, Saga's load balancer will *select a fastest 'MessageSender'* to > send msg from pool. > My problem: > At some point, if every Alpha node need take 10 minutes to handle business > for some reasons(e.g. network), that means, Saga will handle all following > requests by the fastest 'MessageSender' within 10 minutes. > So, I think that the performance for Saga's load balancer will get a discount. > Of course, I believe one alpha node can handle many many requests. Just for > improving Saga. > Part of code from LoadBalancedClusterMessageSender.java > {code:java} > ... > MessageSender messageSender = fastestSender(); > try { > long startTime = System.nanoTime(); > AlphaResponse response = messageSender.send(event); > senders.put(messageSender, System.nanoTime() - startTime); > return response; > } catch (OmegaException e) { > throw e; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-751) The load balancer of Saga may be faced with peak problem.
[ https://issues.apache.org/jira/browse/SCB-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-751: - Fix Version/s: saga-0.3.0 > The load balancer of Saga may be faced with peak problem. > - > > Key: SCB-751 > URL: https://issues.apache.org/jira/browse/SCB-751 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 > Environment: project: incubator-servicecomb-saga-0.2.0 >Reporter: Gannalyo >Assignee: Willem Jiang >Priority: Major > Labels: load-balancer, saga > Fix For: saga-0.3.0 > > Original Estimate: 48h > Remaining Estimate: 48h > > Currently, Saga's load balancer will *select a fastest 'MessageSender'* to > send msg from pool. > My problem: > At some point, if every Alpha node need take 10 minutes to handle business > for some reasons(e.g. network), that means, Saga will handle all following > requests by the fastest 'MessageSender' within 10 minutes. > So, I think that the performance for Saga's load balancer will get a discount. > Of course, I believe one alpha node can handle many many requests. Just for > improving Saga. > Part of code from LoadBalancedClusterMessageSender.java > {code:java} > ... > MessageSender messageSender = fastestSender(); > try { > long startTime = System.nanoTime(); > AlphaResponse response = messageSender.send(event); > senders.put(messageSender, System.nanoTime() - startTime); > return response; > } catch (OmegaException e) { > throw e; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-247) [pack] integrate with orchestration framework
[ https://issues.apache.org/jira/browse/SCB-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-247: - Fix Version/s: (was: saga-0.3.0) > [pack] integrate with orchestration framework > - > > Key: SCB-247 > URL: https://issues.apache.org/jira/browse/SCB-247 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.3.0 >Reporter: Eric Lee >Priority: Minor > > Currently, pack needs user to provide a starting point for a transaction > which acts as an aggregator. Introducing orchestration framework can greatly > reduce these kind of work by using DSL and supports more EIP. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-558) Introduce Retry event to simplify the Scanner work
[ https://issues.apache.org/jira/browse/SCB-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-558: Assignee: Willem Jiang (was: Yang Bo) > Introduce Retry event to simplify the Scanner work > -- > > Key: SCB-558 > URL: https://issues.apache.org/jira/browse/SCB-558 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Willem Jiang >Assignee: Willem Jiang >Priority: Major > Fix For: saga-0.3.0 > > > Current Alpha need spent lots of effort to find out the transaction which is > aborted when we introduce the retry. It could be more easy for us to verify > it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-163) [pack] async transaction support with bytecode instrumentation
[ https://issues.apache.org/jira/browse/SCB-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-163: - Fix Version/s: (was: saga-0.3.0) > [pack] async transaction support with bytecode instrumentation > -- > > Key: SCB-163 > URL: https://issues.apache.org/jira/browse/SCB-163 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Yin Xiang >Priority: Major > > to support more async framework, bytecode instrumentation is probably better > to avoid invasive code changes on user side -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-300) [pack] acceptance tests of transaction timeout and retry
[ https://issues.apache.org/jira/browse/SCB-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-300: - Fix Version/s: (was: saga-0.3.0) saga-0.2.0 > [pack] acceptance tests of transaction timeout and retry > > > Key: SCB-300 > URL: https://issues.apache.org/jira/browse/SCB-300 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Saga >Reporter: Yin Xiang >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.2.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-300) [pack] acceptance tests of transaction timeout and retry
[ https://issues.apache.org/jira/browse/SCB-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved SCB-300. -- Resolution: Fixed > [pack] acceptance tests of transaction timeout and retry > > > Key: SCB-300 > URL: https://issues.apache.org/jira/browse/SCB-300 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Saga >Reporter: Yin Xiang >Assignee: Zheng Feng >Priority: Major > Fix For: saga-0.2.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-786) when instances cache is not sync to SC caused by bug, auto fix it.
[ https://issues.apache.org/jira/browse/SCB-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561412#comment-16561412 ] ASF GitHub Bot commented on SCB-786: coveralls commented on issue #844: [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/844#issuecomment-408742250 [![Coverage Status](https://coveralls.io/builds/18221058/badge)](https://coveralls.io/builds/18221058) Coverage increased (+0.007%) to 86.734% when pulling **bd4730e3dd7109249d03d1e5f065bdafaa6efba2 on wujimin:auto-fix-instances-cache-not-sync** into **e4b74c9745d40360d58a7600b50ce705be0bf0dc on apache:master**. 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: us...@infra.apache.org > when instances cache is not sync to SC caused by bug, auto fix it. > -- > > Key: SCB-786 > URL: https://issues.apache.org/jira/browse/SCB-786 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561456#comment-16561456 ] ASF GitHub Bot commented on SCB-779: asifdxtreme commented on issue #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402#issuecomment-408756701 hold this merge till 1.0.0 is released as this change will make the [Make Build from source guide](https://github.com/apache/incubator-servicecomb-service-center/tree/master/scripts/release) invalid for 1.0.0 release. 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: us...@infra.apache.org > Add docker builder pattern scripts > -- > > Key: SCB-779 > URL: https://issues.apache.org/jira/browse/SCB-779 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-786) when instances cache is not sync to SC caused by bug, auto fix it.
[ https://issues.apache.org/jira/browse/SCB-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561458#comment-16561458 ] ASF GitHub Bot commented on SCB-786: wujimin closed pull request #844: [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/844 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java index f867f6ae7..ab4f479d0 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java @@ -113,6 +113,10 @@ public String getRevision() { return revision; } + public void setRevision(String revision) { +this.revision = revision; + } + public List getPulledInstances() { return pulledInstances; } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java index 8e0e1d7a7..28fb4b662 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java @@ -125,6 +125,10 @@ protected InstanceCacheResult check(MicroserviceVersions microserviceVersions) { remote); instanceCacheResult.setStatus(Status.ABNORMAL); instanceCacheResult.setDetail("instance cache not match"); + +// auto fix, will do a full pull request when invoke MicroserviceVersions.pullInstances +microserviceVersions.setRevision(null); + return instanceCacheResult; } diff --git a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java index b932070b2..c84cc3e6b 100644 --- a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java +++ b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java @@ -26,6 +26,7 @@ import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance; import org.apache.servicecomb.serviceregistry.api.response.FindInstancesResponse; import org.apache.servicecomb.serviceregistry.client.http.MicroserviceInstances; +import org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions; import org.apache.servicecomb.serviceregistry.definition.DefinitionConst; import org.apache.servicecomb.serviceregistry.diagnosis.Status; import org.apache.servicecomb.serviceregistry.registry.ServiceRegistryFactory; @@ -216,8 +217,10 @@ MicroserviceInstances findServiceInstances(String appId, String serviceName, registerMicroservice(appId, microserviceName); -serviceRegistry.getAppManager() -.getOrCreateMicroserviceVersionRule(appId, microserviceName, DefinitionConst.VERSION_RULE_ALL); +MicroserviceVersions microserviceVersions = serviceRegistry.getAppManager() +.getOrCreateMicroserviceVersions(appId, microserviceName); +microserviceVersions.setRevision("first"); + microserviceVersions.getOrCreateMicroserviceVersionRule(DefinitionConst.VERSION_RULE_ALL); Holder newFindHolder = createFindServiceInstancesResult(); newFindHolder.value.getInstancesResponse().getInstances().add(new MicroserviceInstance()); @@ -234,5 +237,6 @@ MicroserviceInstances findServiceInstances(String appId, String serviceName, expectedSummary.setStatus(Status.ABNORMAL); Assert.assertEquals(Json.encode(expectedSummary), Json.encode(instanceCacheSummary)); +Assert.assertNull(microserviceVersions.getRevision()); } } 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: us...@infra.apache.org > when instances cache is not sync to SC caused by bug, auto fix it. > -
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561459#comment-16561459 ] ASF GitHub Bot commented on SCB-782: liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206022756 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ Review comment: Please use $HOME/etc/**.xml file to format code 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: us...@infra.apache.org > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561460#comment-16561460 ] ASF GitHub Bot commented on SCB-782: liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206023617 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ +latch.countDown(); + }else { rsp.bodyHandler(buf -> { LOGGER.error("Server error message is [{}].", buf); latch.countDown(); }); EventManager.post(new ConnFailEvent("fetch config fail")); LOGGER.error("Config refresh from {} failed.", configcenter); } -}); +}).setTimeout((BOOTUP_WAIT_TIME -1 )* 1000); Review comment: Thread control based on timeout may not be accurate. The pulling operation can be changed to blocking, but this code can not guarantee each pull run sequencially. 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: us...@infra.apache.org > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561461#comment-16561461 ] ASF GitHub Bot commented on SCB-776: little-cui commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206023674 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) return &pb.RegisterInstanceResponse{ Response: pb.CreateResponse(scerr.ErrInvalidParams, err.Error()), }, nil } instance := in.GetInstance() - instanceFlag := util.StringJoin([]string{instance.ServiceId, instance.HostName}, "/") //允许自定义id //如果没填写 并且endpoints沒重復,則产生新的全局instance id oldInstanceId, checkErr := serviceUtil.InstanceExist(ctx, in.Instance) if checkErr != nil { - util.Logger().Errorf(checkErr, "instance existence check failed, service %s, operator %s.", - instanceFlag, remoteIP) + util.Logger().Errorf(checkErr, "instance existence check failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) resp := pb.CreateResponseWithSCErr(checkErr) if checkErr.InternalError() { return &pb.RegisterInstanceResponse{Response: resp}, checkErr } return &pb.RegisterInstanceResponse{Response: resp}, nil } if len(oldInstanceId) > 0 { - util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s.", + util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s", instance.ServiceId, oldInstanceId, remoteIP) return &pb.RegisterInstanceResponse{ - Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist."), + Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist"), InstanceId: oldInstanceId, }, nil } if err := s.preProcessRegisterInstance(ctx, instance); err != nil { - util.Logger().Errorf(err, "register instance failed, service %s, operator %s.", instanceFlag, remoteIP) + util.Logger().Errorf(err, "register instance failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) Review comment: we get the message like "[rest://127.0.0.1:8080]" 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: us...@infra.apache.org > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561462#comment-16561462 ] ASF GitHub Bot commented on SCB-776: little-cui commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206023762 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) Review comment: the err object will print the details 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: us...@infra.apache.org > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561463#comment-16561463 ] ASF GitHub Bot commented on SCB-782: liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206023906 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ParseConfigUtils.java ## @@ -40,13 +40,20 @@ public static final Map flatItems = new HashMap<>(); + public static String CURRENT_VERSION_INFO = "default"; + private UpdateHandler updateHandler; public ParseConfigUtils(UpdateHandler updateHandler) { this.updateHandler = updateHandler; } public void refreshConfigItems(Map> remoteItems) { + +CURRENT_VERSION_INFO = remoteItems.getOrDefault("revision",new HashMap<>()).getOrDefault("version","default").toString(); +//make sure the CURRENT_VERSION_INFO != "" +CURRENT_VERSION_INFO = CURRENT_VERSION_INFO.equals("") ? "default" : CURRENT_VERSION_INFO; +remoteItems.remove("revision");//the key revision is not the config setting Review comment: How about users have a key named revision? 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: us...@infra.apache.org > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561464#comment-16561464 ] ASF GitHub Bot commented on SCB-776: tianxiaoliang commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206024447 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) return &pb.RegisterInstanceResponse{ Response: pb.CreateResponse(scerr.ErrInvalidParams, err.Error()), }, nil } instance := in.GetInstance() - instanceFlag := util.StringJoin([]string{instance.ServiceId, instance.HostName}, "/") //允许自定义id //如果没填写 并且endpoints沒重復,則产生新的全局instance id oldInstanceId, checkErr := serviceUtil.InstanceExist(ctx, in.Instance) if checkErr != nil { - util.Logger().Errorf(checkErr, "instance existence check failed, service %s, operator %s.", - instanceFlag, remoteIP) + util.Logger().Errorf(checkErr, "instance existence check failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) resp := pb.CreateResponseWithSCErr(checkErr) if checkErr.InternalError() { return &pb.RegisterInstanceResponse{Response: resp}, checkErr } return &pb.RegisterInstanceResponse{Response: resp}, nil } if len(oldInstanceId) > 0 { - util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s.", + util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s", instance.ServiceId, oldInstanceId, remoteIP) return &pb.RegisterInstanceResponse{ - Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist."), + Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist"), InstanceId: oldInstanceId, }, nil } if err := s.preProcessRegisterInstance(ctx, instance); err != nil { - util.Logger().Errorf(err, "register instance failed, service %s, operator %s.", instanceFlag, remoteIP) + util.Logger().Errorf(err, "register instance failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) return &pb.RegisterInstanceResponse{ Response: pb.CreateResponseWithSCErr(err), }, nil } + ttl := int64(instance.HealthCheck.Interval * (instance.HealthCheck.Times + 1)) Review comment: just for log, it need to consume CPU, is it necessary? 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: us...@infra.apache.org > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-648) Omega support JDK7
[ https://issues.apache.org/jira/browse/SCB-648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-648: Assignee: Willem Jiang (was: Zhang Yonglun) > Omega support JDK7 > -- > > Key: SCB-648 > URL: https://issues.apache.org/jira/browse/SCB-648 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Assignee: Willem Jiang >Priority: Major > Labels: newbie > Fix For: saga-0.3.0 > > > Omega should support JDK 7 for more wild users, I just checked the GRPC, it > supports JDK7. > Current we just need to avoid the lamda function in Omega modules. > Steps > * Change the code compile support to java 7 > * Fix the find related issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561472#comment-16561472 ] ASF GitHub Bot commented on SCB-776: little-cui commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206027208 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) return &pb.RegisterInstanceResponse{ Response: pb.CreateResponse(scerr.ErrInvalidParams, err.Error()), }, nil } instance := in.GetInstance() - instanceFlag := util.StringJoin([]string{instance.ServiceId, instance.HostName}, "/") //允许自定义id //如果没填写 并且endpoints沒重復,則产生新的全局instance id oldInstanceId, checkErr := serviceUtil.InstanceExist(ctx, in.Instance) if checkErr != nil { - util.Logger().Errorf(checkErr, "instance existence check failed, service %s, operator %s.", - instanceFlag, remoteIP) + util.Logger().Errorf(checkErr, "instance existence check failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) resp := pb.CreateResponseWithSCErr(checkErr) if checkErr.InternalError() { return &pb.RegisterInstanceResponse{Response: resp}, checkErr } return &pb.RegisterInstanceResponse{Response: resp}, nil } if len(oldInstanceId) > 0 { - util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s.", + util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s", instance.ServiceId, oldInstanceId, remoteIP) return &pb.RegisterInstanceResponse{ - Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist."), + Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist"), InstanceId: oldInstanceId, }, nil } if err := s.preProcessRegisterInstance(ctx, instance); err != nil { - util.Logger().Errorf(err, "register instance failed, service %s, operator %s.", instanceFlag, remoteIP) + util.Logger().Errorf(err, "register instance failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) return &pb.RegisterInstanceResponse{ Response: pb.CreateResponseWithSCErr(err), }, nil } + ttl := int64(instance.HealthCheck.Interval * (instance.HealthCheck.Times + 1)) Review comment: not only for log, it is also used to grant a lease fo instance from etcd 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: us...@infra.apache.org > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561474#comment-16561474 ] ASF GitHub Bot commented on SCB-779: asifdxtreme commented on a change in pull request #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402#discussion_r206027015 ## File path: Dockerfile.build ## @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM golang:1.8.3 + +WORKDIR /go/src/github.com/apache/incubator-servicecomb-service-center + +COPY . . + +RUN bash -x scripts/build/local.sh linux 1.0.0 latest Review comment: This will increase the size of the docker image to be more than 50MB, please cleanup and just copy the release binary in alpine image 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: us...@infra.apache.org > Add docker builder pattern scripts > -- > > Key: SCB-779 > URL: https://issues.apache.org/jira/browse/SCB-779 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561473#comment-16561473 ] ASF GitHub Bot commented on SCB-779: asifdxtreme commented on a change in pull request #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402#discussion_r206027326 ## File path: scripts/docker/build-frontend-image/build.sh ## @@ -20,37 +20,45 @@ set -e umask 027 SCRIPT_DIR=$(cd $(dirname $0); pwd) -BASE_DIR=${SCRIPT_DIR}/../../.. -mkdir -p $SCRIPT_DIR/frontend - -cd $BASE_DIR/frontend +BASE_DIR=${SCRIPT_DIR}/../../../ -# make CGO_ENABLED=0 since busybox will not execute if it is dynamically linked -export CGO_ENABLED=0 -export GOOS="linux" -export GOARCH="amd64" +# build all +PACKAGE=${1:-"latest"} -# buils scfrontend -go build -o $SCRIPT_DIR/frontend/scfrontend +PACKAGE_PREFIX=apache-servicecomb-incubating-service-center -#go to the script directory -#cd $SCRIPT_DIR +PACKAGE_DIR=$SCRIPT_DIR/../$PACKAGE_PREFIX-$PACKAGE-linux-amd64 -# copy the app conf folders to build-frontend-image/frontend -cp -r app conf $BASE_DIR/scripts/frontend/start_linux.sh $SCRIPT_DIR/frontend +source ${SCRIPT_DIR}/../../build/tools.sh -chmod 755 $SCRIPT_DIR/frontend/start_linux.sh $SCRIPT_DIR/frontend/scfrontend +if [ ! -d $PACKAGE_DIR ]; then +docker_builder_pattern $BASE_DIR $SCRIPT_DIR/../ +fi -sed -i "s|frontend_host_ip=127.0.0.1|frontend_host_ip=0.0.0.0|g" $SCRIPT_DIR/frontend/conf/app.conf +# create image base dir +mkdir -p $SCRIPT_DIR/frontend -#go to the script directory +# go to the script directory cd $SCRIPT_DIR -tar cf frontend.tar.gz frontend + +# copy the conf folder to build-frontend-image/frontend +cp -rp $PACKAGE_DIR/app $PACKAGE_DIR/conf $PACKAGE_DIR/frontend start.sh frontend + +chmod 500 frontend/start.sh frontend/frontend + +# store the base image name and version +BASE_IMAGE=${BASE_IMAGE:-"ubuntu"} + +BASE_IMAGE_VERSION=${BASE_IMAGE_VERSION:-"latest"} + cp Dockerfile.tmpl Dockerfile -docker build -t servicecomb/scfrontend . -docker save servicecomb/scfrontend:latest |gzip >scfrontend-dev.tgz +sed -i "s|{{.BASE_IMAGE}}|${BASE_IMAGE}|g" Dockerfile +sed -i "s|{{.BASE_IMAGE_VERSION}}|${BASE_IMAGE_VERSION}|g" Dockerfile + +docker build --no-cache -t servicecomb/scfrontend:$PACKAGE . +docker save servicecomb/scfrontend:$PACKAGE |gzip >scfrontend-dev.tgz Review comment: can we put the frontend and service-center in the same image instead of having 2 images If both are in same image then it will be easy to communicate between both 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: us...@infra.apache.org > Add docker builder pattern scripts > -- > > Key: SCB-779 > URL: https://issues.apache.org/jira/browse/SCB-779 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561535#comment-16561535 ] ASF GitHub Bot commented on SCB-782: heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206028000 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ +latch.countDown(); + }else { rsp.bodyHandler(buf -> { LOGGER.error("Server error message is [{}].", buf); latch.countDown(); }); EventManager.post(new ConnFailEvent("fetch config fail")); LOGGER.error("Config refresh from {} failed.", configcenter); } -}); +}).setTimeout((BOOTUP_WAIT_TIME -1 )* 1000); Review comment: I do not think so, I set the the time out of the sub thread to pull the setting from config-center is less than the main thread to wait . hence , the main thread will wait until sub thread finish pull or throw a time out exception. of course, it can gurantee each pull run sequentially 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: us...@infra.apache.org > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561542#comment-16561542 ] ASF GitHub Bot commented on SCB-785: WillemJiang commented on issue #232: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/232#issuecomment-408765235 There is a compile error from CI. COMPILATION ERROR : - /home/travis/build/apache/incubator-servicecomb-saga/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java:[365,14] constructor CompensationContext in class org.apache.servicecomb.saga.omega.context.CompensationContext cannot be applied to given types; required: org.apache.servicecomb.saga.omega.context.OmegaContext found: no arguments reason: actual and formal argument lists differ in length 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: us...@infra.apache.org > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > Fix For: saga-0.3.0 > > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。 > Customer may want to access the globalTxId and LocalTxId in application to > store these information into DB for the recovery. > 示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)