pingcap / pingcap/ticdc

sarama: Replace the rethrowing logic of `go-resiliency` to preserve the stack trace

Open
#1,921 0 comments 0 reactions 1 assignee View on GitHub

@wlwilliamx is already working on this.

Since Sep 30, 2025.

Dominant language
Go
Stars
56
Forks
63
Avg merge
2d 20h
Merged PRs (30d)
34

Description

Is your feature request related to a problem?

(internal reference: TCOC-4074 = ST-2129)

As explained in IBM/sarama#2681, sarama's "go-resiliency" circuit-breaker is trapping a panic value and rethrowing it later, which causes the stack trace to be lost. This is acknowledged in the source code itself.

https://github.com/eapache/go-resiliency/blob/39c0aa4a7ec871cc8e2f7be2c44db1362e0667b7/breaker/breaker.go#L87-L113

To aid debugging, we should find way to bring the original stack trace back. Since we have already forked sarama, further forking go-resiliency should be OK.

Describe the feature you'd like

Fix go-resiliency/breaker to retain the stack trace.

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.