Skip to content

Commit

Permalink
apply clang
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxi Chen <[email protected]>
  • Loading branch information
xiaoxichen committed Jan 31, 2024
1 parent 17c3b90 commit 7dfceae
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/include/homestore/replication/repl_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class ReplDev {

/// @brief get replication status. If called on follower member
/// this API can return empty result.
virtual std::vector<peer_info> get_replication_status() const = 0;
virtual std::vector< peer_info > get_replication_status() const = 0;

/// @brief Gets the group_id this repldev is working for
/// @return group_id
Expand Down
1 change: 0 additions & 1 deletion src/include/homestore/replication_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ VENUM(repl_impl_type, uint8_t,
solo // For single node - no replication
);


class ReplApplication;

class ReplicationService {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/replication/repl_dev/raft_repl_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class RaftReplDev : public ReplDev,
AsyncReplResult<> become_leader() override;
bool is_leader() const override;
const replica_id_t get_leader_id() const override;
std::vector<peer_info> get_replication_status() const override;
std::vector< peer_info > get_replication_status() const override;
group_id_t group_id() const override { return m_group_id; }
std::string group_id_str() const { return boost::uuids::to_string(m_group_id); }
std::string rdev_name() const { return m_rdev_name; }
Expand Down
6 changes: 2 additions & 4 deletions src/lib/replication/repl_dev/solo_repl_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,17 @@ class SoloReplDev : public ReplDev {
AsyncReplResult<> become_leader() override { return make_async_error(ReplServiceError::OK); }
bool is_leader() const override { return true; }
const replica_id_t get_leader_id() const override { return m_group_id; }
std::vector<peer_info> get_replication_status() const override {
return std::vector<peer_info>{peer_info {.id_ = m_group_id, .replication_idx_ = 0, .last_succ_resp_us_ = 0}};
std::vector< peer_info > get_replication_status() const override {
return std::vector< peer_info >{peer_info{.id_ = m_group_id, .replication_idx_ = 0, .last_succ_resp_us_ = 0}};
}


uuid_t group_id() const override { return m_group_id; }

uint32_t get_blk_size() const override;

void cp_flush(CP* cp);
void cp_cleanup(CP* cp);


private:
void write_journal(repl_req_ptr_t rreq);
void on_log_found(logstore_seq_num_t lsn, log_buffer buf, void* ctx);
Expand Down
2 changes: 0 additions & 2 deletions src/lib/replication/service/raft_repl_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ AsyncReplResult<> RaftReplService::replace_member(group_id_t group_id, replica_i
return make_async_error<>(ReplServiceError::NOT_IMPLEMENTED);
}



///////////////////// RaftReplService CP Callbacks /////////////////////////////
std::unique_ptr< CPContext > RaftReplServiceCPHandler::on_switchover_cp(CP* cur_cp, CP* new_cp) { return nullptr; }

Expand Down
1 change: 0 additions & 1 deletion src/tests/test_raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ TEST_F(RaftReplDevTest, All_Append_Restart_Append) {
g_helper->sync_for_cleanup_start();
}


TEST_F(RaftReplDevTest, All_ReplService) {
LOGINFO("Homestore replica={} setup completed", g_helper->replica_num());
g_helper->sync_for_test_start();
Expand Down

0 comments on commit 7dfceae

Please sign in to comment.