-
Notifications
You must be signed in to change notification settings - Fork 435
0.6.0 alpha-server constantly throw NPE in "Global Tx Timeout Situation" #695
Comments
Thank you, I need some time to deal with this problem |
sincerely Thanks for the reply. |
You can try build 0.7.0-SNAPSHOT with branch master |
@coolbeevip well, I tried |
Hmm. I recently released docker https://hub.docker.com/repository/docker/coolbeevip/servicecomb-pack/tags?page=1&ordering=last_updated, can you try this again?
|
Testing scenarios
I was testing how ServiceComb behave when the global Tx is timed out.
There were 3 services:
The order service calls the account service and the storage service in turn.
The testing scenarios is as below:
Order Service set the global Tx timout to
10s
via@SagaStart(timeout = 10)
storage service will simulate a timeout of 10 seconds via
Thread.sleep()
code
order serivce
account service
storage service
Problem Description
In the above test case, when the global transaction times out, alpha-server will continuously throw NPE exceptions. The exception log is as follows:
The alpha UI show the suspended tx reaches 45.46K+...
My exploration of the Problem
I debug the alpha in my local env and make the break point according to the error stacktrace. Then I found what cause the probleam.
when alpha found the global tx is timed out, the global tx state will be set to
SUSPEND
,and will stop the sagaActor.before stopping, it will save the GlobalTransaction to the es. The NPE happens when building the subTransaction.
although the global tx is
SUSPEND
, the sub tx is still active and its endtime is null, and then cause NPE here.The text was updated successfully, but these errors were encountered: