Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#客户端 saga执行事务时,demo设置了延时超过2秒之后,事务状态并没有更改为成功,反复重试 #446

Closed
lxClimb opened this issue Jul 11, 2023 · 2 comments

Comments

@lxClimb
Copy link

lxClimb commented Jul 11, 2023

我修改了demo代码增加了一个超时等待,接口返回成功,但是事务状态没有更改

[HttpPost("TransOut")]
		public async Task<IActionResult> TransOut([FromBody] TransRequest body)
		{
			await Task.Delay(20000);
			_logger.LogInformation("TransOut, QueryString={0}", Request.QueryString);
			_logger.LogInformation("用户: {0},转出 {1} 元---正向操作", body.UserId, body.Amount);
			return Ok(TransResponse.BuildSucceedResponse());
		}
@yedf2
Copy link
Contributor

yedf2 commented Jul 23, 2023

这个行为就是期待的行为,因为超时没有拿到结果,所以不断地重试

@yedf2 yedf2 closed this as completed Sep 3, 2023
@light714
Copy link

这个行为就是期待的行为,因为超时没有拿到结果,所以不断地重试

有时候确实会存在超过3秒的行为,那这种情况该如何处理呢?是否可以配置超时时长?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants