Skip to content

Conversation

@ekexium
Copy link
Contributor

@ekexium ekexium commented Feb 19, 2025

Part of pingcap/tidb#58838

Some changes that I'm not sure about:

  1. Test TestMinSafeTsFromMixed1 and TestMinSafeTsFromMixed2
  2. updateGlobalTxnScopeTSFromPD

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the dco. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 19, 2025
@ekexium ekexium force-pushed the remove-txn-scope-code branch from 72d2742 to cf6688e Compare February 26, 2025 11:50
Signed-off-by: ekexium <[email protected]>
@ekexium ekexium force-pushed the remove-txn-scope-code branch from cf6688e to 13eacc3 Compare February 26, 2025 11:53
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 26, 2025
Signed-off-by: ekexium <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 26, 2025
Signed-off-by: ekexium <[email protected]>
@ekexium ekexium force-pushed the remove-txn-scope-code branch from ebcff5c to 53fe1c7 Compare February 27, 2025 13:21
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 27, 2025
@ekexium ekexium force-pushed the remove-txn-scope-code branch from 53fe1c7 to 4ab4b5f Compare February 27, 2025 13:30
@ekexium ekexium marked this pull request as ready for review February 27, 2025 13:45
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 27, 2025
@cfzjywxk
Copy link
Contributor

@JmPotato PTAL

config/config.go Outdated
TxnScope string
EnableAsyncCommit bool
Enable1PC bool
// FIXME: rename
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide more explanation about this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment on lines 43 to 46
// Option represents available options for the oracle.Oracle.
// TODO: remove this struct
type Option struct {
TxnScope string
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just remove it in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To minimize the change.. It has hundreds of usages. I prefer keeping this PR (relatively) small

Copy link
Contributor

@zyguan zyguan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ekexium
Copy link
Contributor Author

ekexium commented Mar 6, 2025

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Mar 6, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Mar 14, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 14, 2025

[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

Details Needs approval from an approver in each of these files:

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 ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 14, 2025
@cfzjywxk cfzjywxk requested a review from JmPotato March 14, 2025 09:38
@ti-chi-bot ti-chi-bot bot removed the lgtm label Sep 10, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 10, 2025

[LGTM Timeline notifier]

Timeline:

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

@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 10, 2025

New changes are detected. LGTM label has been removed.

@ekexium ekexium force-pushed the remove-txn-scope-code branch from 7a0b904 to 2b44a8a Compare September 10, 2025 08:30
Signed-off-by: ekexium <[email protected]>
@ekexium ekexium force-pushed the remove-txn-scope-code branch from 2b44a8a to 1cee44c Compare September 10, 2025 15:10
@you06
Copy link
Contributor

you06 commented Sep 11, 2025

You can ignore the leak goroutine to fix the test.

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"),
}

	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"),
	}

Signed-off-by: ekexium <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants