apache / apache/incubator-seata

1.1.0版本 saga 模式下 seata_state_machine_inst 表 status 总是 RU . is_running=1

Open
#2,633 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

saga 模式下 seata_state_machine_inst 表 status 总是 RU . is_running=1

测试使用的是 local saga 模式

{
"Name": "kkk",
"Comment": "kkkk 第一个例子",
"StartState": "aaa",
"Version": "0.0.1",
"States": {
"aaa": {
"Type": "ServiceTask",
"ServiceName": "aaaAction",
"IsPersist": false,
"ServiceMethod": "do1",
"Next": "ChoiceState",
"Input": [
"$.[businessKey]",
"$.[itemNo]",
"$.[demoDto]",
"$.[params]"
],
"Output": {
"aaaResult": "$.#root"
},
"Status": {
"#root == true": "SU",
"#root == false": "FA",
"$Exception{java.lang.Throwable}": "FA"
}
},
"ChoiceState":{
"Type": "Choice",
"Choices":[
{
"Expression":"[aaaResult] == true",
"Next":"bbb"
}
],
"IsPersist": false,
"Default":"Fail"
},
"bbb": {
"Type": "ServiceTask",
"ServiceName": "bbbAction",
"ServiceMethod": "do1",
"IsPersist": false,
"Input": [
"$.[businessKey]",
"$.[itemNo]",
"$.[demoDto]",
"$.[params]"
],
"Output": {
"bbbResult": "$.#root"
},
"Status": {
"#root == true": "SU",
"#root == false": "FA",
"$Exception{java.lang.Throwable}": "FA"
},
"Next": "Succeed",
"Retry": [
{
"Exceptions": ["FrontBusinessException"],
"IntervalSeconds": 0.2,
"MaxAttempts": 3,
"BackoffRate": 1
}
]
},
"Succeed": {
"Type":"Succeed"
},
"Fail": {
"Type":"Fail",
"ErrorCode": "xxx",
"Message": "操作失败"
}
}
}

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the local saga workflow described in the issue and inspect the seata_state_machine_inst row after the aaa, bbb, Succeed, or Fail states execute. Trace why status remains RU and is_running remains 1; done means completed workflows persist the appropriate terminal state and clear the running flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.