client-java icon indicating copy to clipboard operation
client-java copied to clipboard

BackOffer is a mess

Open iosmanthus opened this issue 3 years ago • 1 comments

Feature Request

Is your feature request related to a problem? Please describe:

Backoffer is an interface that controls the backoff action while a request failed. But now it is acting as a context instead of what it claims.

It contains:

  1. A slow logger. https://github.com/tikv/client-java/blob/19a9ab0ae33d82a2233f266f7d3d2abf50bbdf59/src/main/java/org/tikv/common/util/BackOffer.java#L72 which also contains a trace id.
  2. A cluster-id introduced from https://github.com/tikv/client-java/pull/558

All this stuff should be accessed by a request handler whenever it wants, as a context instead of squeezing them into BackOffer, an interface that has nothing to do with this information.

Describe the feature you'd like:

Create a context interface and attach all these info to its instance.

iosmanthus avatar Mar 24 '22 09:03 iosmanthus

This issue is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Apr 24 '22 00:04 github-actions[bot]