Skip to content

Commit

Permalink
use last_data_committed_lsn
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed Sep 10, 2024
1 parent c9ada64 commit f6108de
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tests/test_raft_repl_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ class TestReplicatedDB : public homestore::ReplDevListener {
void write_snapshot_data(shared< snapshot_context > context, shared< snapshot_data > snp_data) override {
auto s = std::dynamic_pointer_cast< nuraft_snapshot_context >(context)->nuraft_snapshot();
if (snp_data->offset == 0) {
auto last_committed_idx =
std::dynamic_pointer_cast< RaftReplDev >(repl_dev())->raft_server()->get_committed_log_idx();
snp_data->offset = last_committed_idx + 1;
snp_data->offset = last_data_committed_lsn + 1;
LOGINFOMOD(replication, "[Replica={}] Save logical snapshot callback return obj_id={}",
g_helper->replica_num(), snp_data->offset);
return;
Expand Down

0 comments on commit f6108de

Please sign in to comment.