googleapis / googleapis/google-cloud-java

[java-spanner] Need a way to specify timeout and retry for transaction #2

未关闭
#12,243 5 条评论 0 个 reaction 已指派 2 人 已被 @olavloite 认领 在 GitHub 查看
api: spanner
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
154

描述

I can't reopen this one - https://github.com/googleapis/java-spanner/issues/1900 - so I create a new issue.

Suggested workaround doesn't work well in combination with Apache Beam's Spanner IO.
I've been always wondering why it never hits those aborted transaction retry loops in `SpannerIO`, the answer is clear: because it never gets thrown out.

It is very limiting in circumstances, where Spanner can't keep up with the write demand that you put on it. It just keeps aborting transactions with longer and longer delays, which eventually lead to the fact that Dataflow workers start to die out, because they never exit the loop and don't respond to status update requests or never respond with the bundle processing result.

I want to be in control of how I handle transaction aborts, but I can't. It is quite surprising that I can't just disable that and do whatever I wish to do with that. I still want to get Spanner's exceptions back to see if they're retryable, or just generally to understand what is the root cause of the issues.

Instead I get a bunch of cryptic Dataflow errors like "worker stopped responding" and only deep in a thread dumps I can see that those were just looping indefinitely in `SpannerRetryHelper.`

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。