Repository navigation
Conversation
Signed-off-by: idy <idy0013@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @idy. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @idy! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
locate: preserve connector TLS for store liveness probes
Signed-off-by: idy <idy0013@gmail.com>
locate: use test context for TLS listener creation
Transactional RPC clients can use connector-specific TLS via
tikv.WithSecurity, but store recovery health checks construct a new gRPC client usingconfig.GetGlobalConfig().Security. When the connector uses mTLS and global security is empty, normal reads and writes succeed until a transient transport failure starts liveness checking. The health connection then uses plaintext, fails with EOF, and the store remains unreachable even after its transport recovers.This adds optional
tikv.WithStoreLivenessSecurity(security)fortikv.NewKVStore, allowing recovery probes to use the connector's CA and client identity without mutating global configuration. Omitting the option retains the existing global-security default; an explicitly empty policy selects plaintext. Each store cache/security policy owns its singleflight group, so connectors with different credentials cannot share an authenticated health result for the same address.To reproduce the original problem:
Validation passed for the TLS fix on merged master
138b7bc; the subsequent test-only listener-context correction also passed its focused race and full lint checks:go test -tags=intest ./...go test -race -tags=intest ./internal/locate ./tikvgo test -race -tags=intest ./internal/locate -run '^TestStoreLiveness' -count=1after the test-listener correctiongolangci-lintv2.8.0 with the repository configuration: 0 issuesgit diff --checkNew loopback gRPC mTLS regressions cover independent CAs, wrong CA and missing client certificate rejection, explicit plaintext versus the legacy global default, concurrent same-address credential isolation, changing credentials while a probe is in flight, and background NOT_SERVING-to-SERVING recovery.
A downstream real PD/TiKV 8.5.6 test with two independent CAs also passed: after an injected transport interruption, the original client recovered, the other connector remained available, no plaintext connections were observed, and SDK global security stayed unchanged. That fixture is downstream validation and is not included in this PR; the reproducible SDK-level regressions are included here.
Existing TiDB/TiCDC/BR/CSE consumers retain their current behavior unless they opt in. The patch changes neither key encoding nor transaction semantics and does not disable certificate or hostname verification.