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_r234427219
##########
File path: be/src/agent/heartbeat_server.cpp
##########
@@ -132,6 +141,12 @@ Status HeartbeatServer::_heartbeat(
}
}
+ if (need_report) {
+ LOG(INFO) << "Master FE is changed or restarted. report tablet and
disk info immediately";
+ std::unique_lock<std::mutex>
lk(OLAPEngine::get_instance()->report_mtx);
+ OLAPEngine::get_instance()->report_cv.notify_all();
+ }
Review comment:
1. `notify_all` needn't to hold mutex first.
2. `report_cv.notify_all()` should encapsulate in a function
3. you can use `_olap_engine` instead of `OLAPEngine::get_instance()`
----------------------------------------------------------------
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]