[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-11 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-552381890
 
 
   > @whitemeng 有包含所有代码及配置文件的工程可以共享吗?这样可以方便我们在本地重现这个错误。
   
   
   alpha-server 0.6.0 非狀態機模式
   感謝 !
   [saga.zip](https://github.com/apache/servicecomb-pack/files/3830796/saga.zip)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-11 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-552356401
 
 
   測試把返回參數取消
   
![image](https://user-images.githubusercontent.com/47801046/68574991-1dd80500-04a6-11ea-811e-6a341418087e.png)
   
   serviceB 的 console log 如下,依然會重新連 alpha-server
   
   2019-11-11 17:08:32.265 DEBUG 11860 --- [nio-9001-exec-1] 
o.a.s.p.o.transaction.TransactionAspect  : Updated context 
OmegaContext{globalTxId=97425bdb-ecf1-4b92-b381-56c69a8186d4, 
localTxId=c5a38362-3c99-4982-a0d9-b81f817cb2c0, alphaFeatureAkkaEnabled=false} 
for compensable method public void 
com.example.microserviceB.service.BasicService.getNames() 
   2019-11-11 17:08:32.270 DEBUG 11860 --- [nio-9001-exec-1] 
o.a.s.p.o.transaction.DefaultRecovery: Intercepting compensable method 
public void com.example.microserviceB.service.BasicService.getNames() with 
context OmegaContext{globalTxId=97425bdb-ecf1-4b92-b381-56c69a8186d4, 
localTxId=c5a38362-3c99-4982-a0d9-b81f817cb2c0, alphaFeatureAkkaEnabled=false}
   2019-11-11 17:08:37.271  WARN 11860 --- [  probe] 
o.a.s.p.o.t.wrapper.TimeoutProb  : Thread interrupted on 5001ms timeout 
(over 5000ms)
   2019-11-11 17:08:37.280 ERROR 11860 --- [nio-9001-exec-1] 
o.a.s.p.o.c.g.c.LoadBalanceSenderAdapter : Retry sending event 
TxEndedEvent{globalTxId='97425bdb-ecf1-4b92-b381-56c69a8186d4', 
localTxId='c5a38362-3c99-4982-a0d9-b81f817cb2c0', 
parentTxId='97425bdb-ecf1-4b92-b381-56c69a8186d4', compensationMethod='public 
void com.example.microserviceB.service.BasicService.cancel()', timeout=0, 
retryMethod='', retries=0, payloads=[]} due to failure
   
   io.grpc.StatusRuntimeException: CANCELLED: Call was interrupted
at io.grpc.Status.asRuntimeException(Status.java:517) 
~[grpc-core-1.14.0.jar:1.14.0]
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:129) 
~[grpc-stub-1.14.0.jar:1.14.0]
at 
org.apache.servicecomb.pack.contract.grpc.TxEventServiceGrpc$TxEventServiceBlockingStub.onTxEvent(TxEventServiceGrpc.java:273)
 ~[pack-contract-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.GrpcSagaClientMessageSender.send(GrpcSagaClientMessageSender.java:90)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.SagaLoadBalanceSender$1.apply(SagaLoadBalanceSender.java:45)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.SagaLoadBalanceSender$1.apply(SagaLoadBalanceSender.java:42)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.core.LoadBalanceSenderAdapter.doGrpcSend(LoadBalanceSenderAdapter.java:54)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.SagaLoadBalanceSender.send(SagaLoadBalanceSender.java:42)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.CompensableInterceptor.postIntercept(CompensableInterceptor.java:40)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.DefaultRecovery.applyTo(DefaultRecovery.java:70)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.wrapper.RecoveryPolicyTimeoutWrapper.applyTo(RecoveryPolicyTimeoutWrapper.java:111)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.AbstractRecoveryPolicy.apply(AbstractRecoveryPolicy.java:38)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.TransactionAspect.advise(TransactionAspect.java:66)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[na:na]
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 ~[na:na]
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
 ~[spring-aop-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
 ~[spring-aop-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
 ~[spring-aop-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
 ~[spring-aop-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
 

[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-11 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-552347686
 
 
   > 我觉得Cancel方法返回参数应该影响。
   
   感謝各位的指導,但補償不是必須滿足幕等的條件嗎 ?
   那該怎麼設計補償呢 ?
   謝謝


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-10 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-552301181
 
 
   > > > 你的cancel方法中sleep了10秒,但是你在 @Compensable 中声明了cancel方法5秒的调用超时
   > > 
   > > 
   > > 對不起,我不太懂您的意思,能否再詳細說明一下,感謝 !
   > 
   > 我又看了一下,也不太敢确定,你可以提供一下你自己服务端更详细的错误日志吗
   
   
   serviceA 程式碼
   
![image](https://user-images.githubusercontent.com/47801046/68563180-adba8680-0487-11ea-83bb-7a7146e5865e.png)
   
   serviceB 程式碼
   
![image](https://user-images.githubusercontent.com/47801046/68563235-d2166300-0487-11ea-9f95-9233bead1372.png)
   
   測試場景: serviceB 會因為超時而執行補償呼叫 cancel()
   
   serviceB 詳細 console log 如下
   
   2019-11-11 13:29:52.861 DEBUG 9180 --- [nio-9001-exec-1] 
o.a.s.p.o.transaction.TransactionAspect  : Updated context 
OmegaContext{globalTxId=80465bee-caf7-4083-b401-2d149b0d2010, 
localTxId=af4cbf20-6b08-40d5-83ec-127fc2bcca5b, alphaFeatureAkkaEnabled=false} 
for compensable method public java.util.List 
com.example.microserviceB.service.BasicService.getNames() 
   2019-11-11 13:29:52.867 DEBUG 9180 --- [nio-9001-exec-1] 
o.a.s.p.o.transaction.DefaultRecovery: Intercepting compensable method 
public java.util.List com.example.microserviceB.service.BasicService.getNames() 
with context OmegaContext{globalTxId=80465bee-caf7-4083-b401-2d149b0d2010, 
localTxId=af4cbf20-6b08-40d5-83ec-127fc2bcca5b, alphaFeatureAkkaEnabled=false}
   2019-11-11 13:29:57.868  WARN 9180 --- [  probe] 
o.a.s.p.o.t.wrapper.TimeoutProb  : Thread interrupted on 5001ms timeout 
(over 5000ms)
   2019-11-11 13:29:57.878 ERROR 9180 --- [nio-9001-exec-1] 
o.a.s.p.o.c.g.c.LoadBalanceSenderAdapter : Retry sending event 
TxEndedEvent{globalTxId='80465bee-caf7-4083-b401-2d149b0d2010', 
localTxId='af4cbf20-6b08-40d5-83ec-127fc2bcca5b', 
parentTxId='80465bee-caf7-4083-b401-2d149b0d2010', compensationMethod='public 
java.util.List com.example.microserviceB.service.BasicService.cancel()', 
timeout=0, retryMethod='', retries=0, payloads=[]} due to failure
   
   io.grpc.StatusRuntimeException: CANCELLED: Call was interrupted
at io.grpc.Status.asRuntimeException(Status.java:517) 
~[grpc-core-1.14.0.jar:1.14.0]
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:129) 
~[grpc-stub-1.14.0.jar:1.14.0]
at 
org.apache.servicecomb.pack.contract.grpc.TxEventServiceGrpc$TxEventServiceBlockingStub.onTxEvent(TxEventServiceGrpc.java:273)
 ~[pack-contract-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.GrpcSagaClientMessageSender.send(GrpcSagaClientMessageSender.java:90)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.SagaLoadBalanceSender$1.apply(SagaLoadBalanceSender.java:45)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.SagaLoadBalanceSender$1.apply(SagaLoadBalanceSender.java:42)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.core.LoadBalanceSenderAdapter.doGrpcSend(LoadBalanceSenderAdapter.java:54)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.connector.grpc.saga.SagaLoadBalanceSender.send(SagaLoadBalanceSender.java:42)
 ~[omega-connector-grpc-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.CompensableInterceptor.postIntercept(CompensableInterceptor.java:40)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.DefaultRecovery.applyTo(DefaultRecovery.java:70)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.wrapper.RecoveryPolicyTimeoutWrapper.applyTo(RecoveryPolicyTimeoutWrapper.java:111)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.AbstractRecoveryPolicy.apply(AbstractRecoveryPolicy.java:38)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
org.apache.servicecomb.pack.omega.transaction.TransactionAspect.advise(TransactionAspect.java:66)
 ~[omega-transaction-0.5.0.jar:0.5.0]
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[na:na]
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 ~[na:na]
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
 ~[spring-aop-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
 ~[spring-aop-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at 

[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-07 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-551000434
 
 
   > 你的cancel方法中sleep了10秒,但是你在 @Compensable 中声明了cancel方法5秒的调用超时
   對不起,我不太懂您的意思,能否再詳細說明一下,感謝 !
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-06 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-550956430
 
 
   omega-spring-starter & omega-transport-resttemplate 版本皆為 0.5.0
   springboot 版本是 2.1.9.RELEASE


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services