Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush log store meta when compacting log #633

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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 conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class HomestoreConan(ConanFile):
name = "homestore"
version = "6.6.13"
version = "6.6.14"

homepage = "https://github.com/eBay/Homestore"
description = "HomeStore Storage Engine"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/replication/log_store/home_raft_log_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ bool HomeRaftLogStore::compact(ulong compact_lsn) {
// we directly compact and truncate up to compact_lsn assuming there are dummy logs.
REPL_STORE_LOG(DEBUG, "Compact with log holes from {} to={}", cur_max_lsn + 1, to_store_lsn(compact_lsn));
}
m_log_store->truncate(to_store_lsn(compact_lsn));
m_log_store->truncate(to_store_lsn(compact_lsn), false);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/replication/repl_dev/raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ void RaftReplDev::create_snp_resync_data(raft_buf_ptr_t& data_out) {
std::memcpy(data_out->data_begin(), &msg, msg_size);
}

bool RaftReplDev::apply_snp_resync_data(nuraft::buffer& data) {
bool RaftReplDev::save_snp_resync_data(nuraft::buffer& data) {
auto msg = r_cast< snp_repl_dev_data* >(data.data_begin());
if (msg->magic_num != HOMESTORE_RESYNC_DATA_MAGIC ||
msg->protocol_version != HOMESTORE_RESYNC_DATA_PROTOCOL_VERSION_V1) {
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 @@ -324,7 +324,7 @@ class RaftReplDev : public ReplDev,
void replace_member(repl_req_ptr_t rreq);
void reset_quorum_size(uint32_t commit_quorum);
void create_snp_resync_data(raft_buf_ptr_t& data_out);
bool apply_snp_resync_data(nuraft::buffer& data);
bool save_snp_resync_data(nuraft::buffer& data);
};

} // namespace homestore
4 changes: 2 additions & 2 deletions src/lib/replication/repl_dev/raft_state_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ void RaftStateMachine::save_logical_snp_obj(nuraft::snapshot& s, ulong& obj_id,
bool is_last_obj) {
if (is_hs_snp_obj(obj_id)) {
// Homestore preserved msg
if (m_rd.apply_snp_resync_data(data)) {
if (m_rd.save_snp_resync_data(data)) {
obj_id = snp_obj_id_type_app;
LOGDEBUG("apply_snp_resync_data success, next obj_id={}", obj_id);
LOGDEBUG("save_snp_resync_data success, next obj_id={}", obj_id);
}
return;
}
Expand Down
Loading