Update logging and check macros. (#1627)

* Update logging and check macros.

* Fix linting.

* Fix RAY_DCHECK and unused variable.

* Fix linting
This commit is contained in:
Robert Nishihara
2018-02-28 15:13:00 -08:00
committed by Philipp Moritz
parent e7df293946
commit 0fcceef772
29 changed files with 721 additions and 774 deletions
+5 -6
View File
@@ -44,16 +44,15 @@ const std::vector<std::string> db_client_table_get_ip_addresses(
for (auto const &manager_id : manager_ids) {
DBClient client = redis_cache_get_db_client(db_handle, manager_id);
CHECK(!client.manager_address.empty());
RAY_CHECK(!client.manager_address.empty());
manager_vector.push_back(client.manager_address);
}
int64_t end_time = current_time_ms();
if (end_time - start_time > RayConfig::instance().max_time_for_loop()) {
LOG_WARN(
"calling redis_get_cached_db_client in a loop in with %zu manager IDs "
"took %" PRId64 " milliseconds.",
manager_ids.size(), end_time - start_time);
RAY_LOG(WARNING) << "calling redis_get_cached_db_client in a loop in with "
<< manager_ids.size() << " manager IDs took "
<< end_time - start_time << " milliseconds.";
}
return manager_vector;
@@ -71,7 +70,7 @@ void db_client_table_cache_init(DBHandle *db_handle) {
}
DBClient db_client_table_cache_get(DBHandle *db_handle, DBClientID client_id) {
CHECK(!client_id.is_nil());
RAY_CHECK(!client_id.is_nil());
return redis_cache_get_db_client(db_handle, client_id);
}