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

vterrors: addres review comments #2593

Merged
merged 1 commit into from
Feb 24, 2017
Merged

vterrors: addres review comments #2593

merged 1 commit into from
Feb 24, 2017

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Feb 24, 2017

Addressed review comments. I've changed the error codes for
cases we've agreed on. I've left the more contentious ones
unchanged for now.

BUG=32851872

@alainjobart
Copy link
Contributor

I'll let Michael review this.

@alainjobart alainjobart removed their request for review February 24, 2017 22:25
Copy link
Contributor

@michael-berlin michael-berlin left a comment

Choose a reason for hiding this comment

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

LGTM after comments are addressed.

Thanks for following up :)

// ErrorStats shows number of critial erros happened.
ErrorStats = stats.NewCounters("Errors", "Fail", "TxPoolFull", "NotInTx", "Deadlock", "Fatal")
ErrorStats = stats.NewCounters(
"Errors",
Copy link
Contributor

Choose a reason for hiding this comment

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

What is "Errors"? A total of all values?

In general, it's not advised to have a total in your map as well. Instead, the monitoring system should figure this out for you. Maybe ask Javeen on his opinion on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NewCounters is actually a misleading constructor. Errors is the main tag, and the rest are sub-categories.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack.

ErrorStats = stats.NewCounters("Errors", "Fail", "TxPoolFull", "NotInTx", "Deadlock", "Fatal")
ErrorStats = stats.NewCounters(
"Errors",
"OK",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please use the enums here instead?

(I understand that we're probably not going to change the names. But still, this way the connection is more clear where this list comes from :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean vtrpcpb.Code_OK.String()?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep.

@@ -25,10 +25,10 @@ const (
PriorityOutOfRange
// Potentially retryable errors.
PriorityUnavailable
PriorityFailedPrecondition
PriorityResourceExhausted
Copy link
Contributor

Choose a reason for hiding this comment

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

ResourceExhausted should go into the "permanent errors" section.

Vitess also defines a VitessError error implementation, that can convert
any error and add a code to it.
Vitess also defines a standardized error implementation that allows
you to build an error with an associated cannonical code.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: canonical

Addressed review comments. I've changed the error codes for
cases we've agreed on. I've left the more contentious ones
unchanged for now.

BUG=32851872
@sougou
Copy link
Contributor Author

sougou commented Feb 24, 2017

LGTM
Last one didn't take.

Approved with PullApprove

@sougou sougou merged commit 4236de7 into vitessio:master Feb 24, 2017
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