imay commented on a change in pull request #327: Add path info of replica in
catalog
URL: https://github.com/apache/incubator-doris/pull/327#discussion_r234427289
##########
File path: be/src/agent/heartbeat_server.cpp
##########
@@ -119,6 +121,13 @@ Status HeartbeatServer::_heartbeat(
<< " local epoch: " << _epoch << " received epoch: "
<< master_info.epoch;
return Status("epoch is not greater than local. ignore
heartbeat.");
}
+ } else {
+ // when Master FE restarted, host and port remains the same, but epoch
will be increased.
+ if (master_info.epoch > _epoch) {
+ _epoch = master_info.epoch;
Review comment:
this function may be called concurrently. and changing `_epoch` and testing
`_epoch` without any protect would lead to strange result
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]