Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Replace CHECK() with CHECK_*() so that when a check is failing, more … #2847

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion heron/common/src/cpp/basics/basics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void InitLogging() {
* Instance id of the program calling initialize
*/
static void InitHelper(const char* argv0, const char* instance, bool istest) {
CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR);
CHECK_NE(signal(SIGPIPE, SIG_IGN), SIG_ERR);

// create execution meta data object
SetMetadata(argv0, instance, istest);
Expand Down
2 changes: 1 addition & 1 deletion heron/stmgr/src/cpp/grouping/fields-grouping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void FieldsGrouping::GetListToSend(const proto::system::HeronDataTuple& _tuple,
size_t prime_num = 633910111UL;
for (auto iter = fields_grouping_indices_.begin();
iter != fields_grouping_indices_.end(); ++iter) {
CHECK(_tuple.values_size() > *iter);
CHECK_GT(_tuple.values_size(), *iter);
size_t h = str_hash_fn(_tuple.values(*iter));
task_index += (h % prime_num);
}
Expand Down
4 changes: 2 additions & 2 deletions heron/tmaster/src/cpp/manager/stateful-restorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ void StatefulRestorer::HandleStMgrRestored(const std::string& _stmgr_id,
int64_t _restore_txid,
const StMgrMap& _stmgrs) {
CHECK(in_progress_);
CHECK(_checkpoint_id == checkpoint_id_in_progress_);
CHECK(_restore_txid == restore_txid_);
CHECK_EQ(_checkpoint_id, checkpoint_id_in_progress_);
CHECK_EQ(_restore_txid, restore_txid_);
unreplied_stmgrs_.erase(_stmgr_id);
if (unreplied_stmgrs_.empty()) {
Finish2PhaseCommit(_stmgrs);
Expand Down
2 changes: 1 addition & 1 deletion heron/tmaster/src/cpp/manager/stats-interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ StatsInterface::StatsInterface(EventLoop* eventLoop, const NetworkOptions& _opti
http_server_->InstallCallBack("/stmgrsregistrationsummary",
std::move(cbHandleStmgrsRegistrationSummary));
http_server_->InstallGenericCallBack(std::move(cbHandleUnknown));
CHECK(http_server_->Start() == SP_OK);
CHECK_EQ(http_server_->Start(), SP_OK);
}

StatsInterface::~StatsInterface() { delete http_server_; }
Expand Down
2 changes: 1 addition & 1 deletion heron/tmaster/src/cpp/manager/stmgrstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ StMgrState::AddAssignment(const std::vector<pair<string, sp_int32> >& _assignmen
proto::system::Assignment* _assignment)
{
// A vector of <component_id, partition_id is given to us.
CHECK(_assignments.size() == workers_.size());
CHECK_EQ(_assignments.size(), workers_.size());

proto::system::NodeManagerAssignment* val = _assignment->add_assignments();
val->set_nodemgr_id(info_->nodemgr_id());
Expand Down