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

txnwait: do not require vmodule to log deadlocks in a workload #99315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arulajmani
Copy link
Collaborator

Deadlocks in a workload are rare (and bad) enough that they should be logged at the level of Info, instead of under vmodule.

Epic: none

Release note: None

Deadlocks in a workload are rare (and bad) enough that they should be
logged at the level of Info, instead of under vmodule.

Epic: none

Release note: None
@arulajmani arulajmani requested a review from a team as a code owner March 22, 2023 22:58
@blathers-crl
Copy link

blathers-crl bot commented Mar 22, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@arulajmani arulajmani added backport-22.1.x 22.1 is EOL backport-22.2.x Flags PRs that need to be backported to 22.2. backport-23.1.x Flags PRs that need to be backported to 23.1 labels Mar 22, 2023
Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @arulajmani)


pkg/kv/kvserver/txnwait/queue.go line 722 at r1 (raw file):

				p1, p2 := pusheePriority, pusherPriority
				if p1 < p2 || (p1 == p2 && bytes.Compare(req.PusheeTxn.ID.GetBytes(), req.PusherTxn.ID.GetBytes()) < 0) {
					log.Infof(

Do you think we should wrap this in an EveryN? Maybe only log it once a second, and otherwise retain the log.VEventf? I think you can continue to use log.VEventf and then use level=0 for the analogous call to log.Infof, but please double-check if you decide to write this like that.

@nvanbenschoten
Copy link
Member

This still seems like a good idea. I imagine we'll thank ourselves for adding in this logging at some point in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-22.1.x 22.1 is EOL backport-22.2.x Flags PRs that need to be backported to 22.2. backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants