[jira] [Created] (SCB-813) macOS系统下pack-contract-grpc模块mvn install失败
Jeremy Xu created SCB-813: - Summary: macOS系统下pack-contract-grpc模块mvn install失败 Key: SCB-813 URL: https://issues.apache.org/jira/browse/SCB-813 Project: Apache ServiceComb Issue Type: Improvement Components: Saga Reporter: Jeremy Xu macOS系统下pack-contract-grpc模块mvn install失败 [INFO] --- protobuf-maven-plugin:0.5.0:compile-custom (default) @ pack-contract-grpc --- [INFO] Compiling 1 proto file(s) to /Volumes/SSDHOME/dev/git/incubator-servicecomb-saga/pack-contracts/pack-contract-grpc/target/generated-sources/protobuf/grpc-java [ERROR] PROTOC FAILED: /Volumes/SSDHOME/dev/git/incubator-servicecomb-saga/pack-contracts/pack-contract-grpc/target/protoc-plugins/protoc-gen-grpc-java-1.11.0-osx-x86_64.exe: program not found or is not executable --grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1. [ERROR] /Volumes/SSDHOME/dev/git/incubator-servicecomb-saga/pack-contracts/pack-contract-grpc/src/main/proto/GrpcTxEvent.proto [0:0]: /Volumes/SSDHOME/dev/git/incubator-servicecomb-saga/pack-contracts/pack-contract-grpc/target/protoc-plugins/protoc-gen-grpc-java-1.11.0-osx-x86_64.exe: program not found or is not executable --grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-806) alpha-server的日志输出比较混乱
Jeremy Xu created SCB-806: - Summary: alpha-server的日志输出比较混乱 Key: SCB-806 URL: https://issues.apache.org/jira/browse/SCB-806 Project: Apache ServiceComb Issue Type: Improvement Components: Saga Reporter: Jeremy Xu alpha-server虽有log4j2.xml,但日志输出并没有按此配置文件输出,另外jpa相关的日志还是直接打到标准输出的。 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-805) 当alpha与omega所在节点的时间不同步时,分布式事务会被异常aborted
Jeremy Xu created SCB-805: - Summary: 当alpha与omega所在节点的时间不同步时,分布式事务会被异常aborted Key: SCB-805 URL: https://issues.apache.org/jira/browse/SCB-805 Project: Apache ServiceComb Issue Type: Improvement Components: Saga Affects Versions: saga-0.2.0 Reporter: Jeremy Xu RT, 当alpha与omega所在节点的时间不同步时,分布式事务会被异常aborted。检查代码发现alpha侧创建TxEvent时用到了omega侧传过来的时间戳。 {code:java} @Override public void onTxEvent(GrpcTxEvent message, StreamObserver responseObserver) { boolean ok = txConsistentService.handle(new TxEvent( message.getServiceName(), message.getInstanceId(), new Date(message.getTimestamp()), // 这里用到了omega侧传过来的时间戳 message.getGlobalTxId(), message.getLocalTxId(), message.getParentTxId().isEmpty() ? null : message.getParentTxId(), message.getType(), message.getCompensationMethod(), message.getTimeout(), message.getRetryMethod(), message.getRetries(), message.getPayloads().toByteArray() ));{code} 这里感觉可以直接用收到TxEvent的时间,即*new Date()*即可。 -- 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=16569451#comment-16569451 ] Jeremy Xu commented on SCB-785: --- 之前因为工程有编译问题,临时maven.skip.test,现在解决了编译问题,重新发了一个MR > 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] [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)