Skip to content

Commit

Permalink
Log raft group, including group ID, when creating new group.
Browse files Browse the repository at this point in the history
  • Loading branch information
gram-signal authored Mar 19, 2024
1 parent 35da0bf commit 7a29bae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion enclave/core/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ void LogRaftGroupConfig(const std::string& name, const enclaveconfig::RaftGroupC
<< " super_majority:" << c.super_majority()
<< " attestation_timeout:" << c.attestation_timeout()
<< " db_version:" << c.db_version()
<< " simulated:" << c.simulated();
<< " simulated:" << c.simulated()
<< " group_id:" << c.group_id();
}

bool RaftGroupConfigsEqualExceptForGroupID(const enclaveconfig::RaftGroupConfig& a, const enclaveconfig::RaftGroupConfig& b) {
Expand Down Expand Up @@ -407,6 +408,8 @@ void Core::HandleCreateNewRaftGroupRequest(context::Context* ctx, internal::Tran
cfg.set_group_id(group_id);
cfg.set_db_version(db_version_);

LogRaftGroupConfig("new", cfg);

raft_.state = svr2::RAFTSTATE_LOADED_PART_OF_GROUP;
enclaveconfig::RaftConfig raft_config = enclave_config(ctx)->raft();
raft_.loaded = {
Expand Down

0 comments on commit 7a29bae

Please sign in to comment.