Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desensitize logs for store/tikv #19193

Open
kolbe opened this issue Aug 13, 2020 · 0 comments
Open

Desensitize logs for store/tikv #19193

kolbe opened this issue Aug 13, 2020 · 0 comments
Labels
component/store feature/accepted This feature request is accepted by product managers type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@kolbe
Copy link
Contributor

kolbe commented Aug 13, 2020

Feature Request

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

The tidb_log_desensitization variable added in #18566 should also cause message emitted by the tikv store code in TiDB to be desensitized.

Describe the feature you'd like:

In numerous locations of store/tikv/, sensitive data could be logged. For example, store/tikv/prewrite.go:168:

		for _, keyErr := range keyErrs {
			// Check already exists error
			if alreadyExist := keyErr.GetAlreadyExist(); alreadyExist != nil {
				key := alreadyExist.GetKey()
				return c.extractKeyExistsErr(key)
			}

			// Extract lock from key error
			lock, err1 := extractLockFromKeyErr(keyErr)
			if err1 != nil {
				return errors.Trace(err1)
			}
			logutil.BgLogger().Info("prewrite encounters lock",
				zap.Uint64("conn", c.connID),
				zap.Stringer("lock", lock))
			locks = append(locks, lock)
		}

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@kolbe kolbe added the type/feature-request Categorizes issue or PR as related to a new feature. label Aug 13, 2020
@ghost ghost added the component/store label Aug 14, 2020
@zz-jason zz-jason added the feature/accepted This feature request is accepted by product managers label Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/store feature/accepted This feature request is accepted by product managers type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants