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

spanset: print stack with assertion error #48161

Merged
merged 1 commit into from
Apr 29, 2020
Merged

Conversation

tbg
Copy link
Member

@tbg tbg commented Apr 29, 2020

It's going to be much easier figuring out what happened when the stack
is included.

See #48147.

Release note: None

It's going to be much easier figuring out what happened when the stack
is included.

See cockroachdb#48147.

Release note: None
@tbg tbg requested a review from petermattis April 29, 2020 15:16
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @petermattis and @tbg)


pkg/kv/kvserver/spanset/spanset.go, line 293 at r1 (raw file):

	}

	return errors.Errorf("cannot %s undeclared span %s\ndeclared:\n%s\nstack:\n%s", access, span, s, debug.Stack())

I thought the cockroachdb/errors package grabbed stacks. Oh, this is the pkg/errors package. Hrmm.

@tbg
Copy link
Member Author

tbg commented Apr 29, 2020

@petermattis the stack is there, but you have to print with %+v. For this one I just want the stack to be part of the message for simplicity.

bors r=petermattis,nvanbenschoten

@craig
Copy link
Contributor

craig bot commented Apr 29, 2020

Build succeeded

@craig craig bot merged commit e29c94f into cockroachdb:master Apr 29, 2020
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