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

Delete txn scope code

Open ekexium opened this issue 9 months ago • 4 comments

Part of pingcap/tidb#58838

Some changes that I'm not sure about:

  1. Test TestMinSafeTsFromMixed1 and TestMinSafeTsFromMixed2
  2. updateGlobalTxnScopeTSFromPD

ekexium avatar Feb 19 '25 13:02 ekexium

@JmPotato PTAL

cfzjywxk avatar Feb 28 '25 09:02 cfzjywxk

any plan to deprecate (or rename) oracle.GlobalTxnScope?

Yes, I think it's the last step. After we deprecated txn-scope related code, we can rename those left to names like ReadReplicaScope

ekexium avatar Mar 06 '25 07:03 ekexium

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, zyguan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [cfzjywxk,zyguan]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

ti-chi-bot[bot] avatar Mar 14 '25 09:03 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2025-03-06 07:36:42.769818444 +0000 UTC m=+513515.898738189: :ballot_box_with_check: agreed by zyguan.
  • 2025-03-14 09:38:26.942358331 +0000 UTC m=+2800.626594429: :ballot_box_with_check: agreed by cfzjywxk.
  • 2025-09-10 07:55:44.718158456 +0000 UTC m=+434411.278039963: :heavy_multiplication_x::repeat: reset by ekexium.

ti-chi-bot[bot] avatar Sep 10 '25 07:09 ti-chi-bot[bot]

New changes are detected. LGTM label has been removed.

ti-chi-bot[bot] avatar Sep 10 '25 07:09 ti-chi-bot[bot]

You can ignore the leak goroutine to fix the test.

https://github.com/tikv/client-go/blob/469a7adf7ae88ce8ac69f49473f0b82324030f0b/integration_tests/main_test.go#L27-L31

	opts := []goleak.Option{
		goleak.IgnoreTopFunction("github.com/pingcap/goleveldb/leveldb.(*DB).mpoolDrain"),
		goleak.IgnoreTopFunction("github.com/tikv/client-go/v2/txnkv/transaction.keepAlive"), // TODO: fix ttlManager goroutine leak
		goleak.IgnoreTopFunction("github.com/tikv/client-go/v2/config/retry.(*Config).createBackoffFn.newBackoffFn.func2"),
+		goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"),
	}

you06 avatar Sep 11 '25 01:09 you06