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

storage: add replica pointer tag #11683

Merged

Conversation

petermattis
Copy link
Collaborator

@petermattis petermattis commented Nov 29, 2016

Debugging aid for #11591.


This change is Reviewable

Copy link
Contributor

@a-robinson a-robinson left a comment

Choose a reason for hiding this comment

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

LGTM, although is this intended to be kept permanently?

@tamird
Copy link
Contributor

tamird commented Nov 29, 2016

:lgtm:


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


pkg/storage/replica.go, line 576 at r1 (raw file):

	r.AmbientContext.AddLogTag("r", &r.rangeStr)
	// Add replica pointer value.
	r.AmbientContext.AddLogTagStr("@", fmt.Sprintf("%x", r))

not %p?


Comments from Reviewable

@petermattis
Copy link
Collaborator Author

Review status: all files reviewed at latest revision, 1 unresolved discussion.


pkg/storage/replica.go, line 576 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

not %p?

I don't want the 0x prefix.


Comments from Reviewable

@petermattis
Copy link
Collaborator Author

although is this intended to be kept permanently?

I'm not sure. After debugging #11591, if this appears too verbose I'm not opposed to removing it.

@tamird
Copy link
Contributor

tamird commented Nov 29, 2016

Review status: all files reviewed at latest revision, 1 unresolved discussion.


pkg/storage/replica.go, line 576 at r1 (raw file):

Previously, petermattis (Peter Mattis) wrote…

I don't want the 0x prefix.

OK. https://golang.org/pkg/fmt/ doesn't seem to document the behaviour of %x wrt pointers.


Comments from Reviewable

@petermattis
Copy link
Collaborator Author

Review status: all files reviewed at latest revision, all discussions resolved.


pkg/storage/replica.go, line 576 at r1 (raw file):

Previously, tamird (Tamir Duberstein) wrote…

OK. https://golang.org/pkg/fmt/ doesn't seem to document the behaviour of %x wrt pointers.

Hmm. It definitely works (I tested it).


Comments from Reviewable

@petermattis petermattis force-pushed the pmattis/replica-pointer-tag branch from aa229e8 to a0d3054 Compare November 29, 2016 15:00
@mberhault
Copy link
Contributor

LGTM.
We can move things to vlog at some point, but let's keep it simple.

@petermattis petermattis merged commit 459d9c1 into cockroachdb:master Nov 29, 2016
@petermattis petermattis deleted the pmattis/replica-pointer-tag branch November 29, 2016 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants