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
server: save region to cache even when save kv failed. #825
Conversation
server/cache.go
Outdated
@@ -400,7 +400,7 @@ func (c *clusterInfo) handleRegionHeartbeat(region *core.RegionInfo) error { | |||
|
|||
if saveKV && c.kv != nil { | |||
if err := c.kv.SaveRegion(region.Region); err != nil { | |||
return errors.Trace(err) | |||
log.Errorf("[region %d] fail to save kv: %v", region.GetId(), err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fail to save region %v: err: %v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add a comment that why we can still go on even the save failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All region related logs are using the format '[region xx] xxx', which is grep friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I meant [region %d] fail to save region %v: err: %v
.
LGTM PTAL @nolouch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* server: save region to cache even when save kv failed.
No description provided.