diff --git a/src/Service/NuRaftLogSnapshot.cpp b/src/Service/NuRaftLogSnapshot.cpp index 542ddf98ea..e7754568cb 100644 --- a/src/Service/NuRaftLogSnapshot.cpp +++ b/src/Service/NuRaftLogSnapshot.cpp @@ -895,9 +895,9 @@ size_t KeeperSnapshotManager::loadSnapshotMetas() ptr snap_store = cs_new(snap_dir, meta, object_node_size); snap_store->init(s_obj.time_str); snapshots[key] = snap_store; - LOG_INFO(log, "Load filename {}, term {}, index {}, object id {}", file, s_obj.log_last_term, s_obj.log_last_index, s_obj.object_id); } String full_path = snap_dir + "/" + file; + LOG_INFO(log, "Load filename {}, term {}, index {}, object id {}", file, s_obj.log_last_term, s_obj.log_last_index, s_obj.object_id); snapshots[key]->addObjectPath(s_obj.object_id, full_path); } LOG_INFO(log, "Load snapshot metas {} from snapshot directory {}", snapshots.size(), snap_dir); diff --git a/src/Service/NuRaftLogSnapshot.h b/src/Service/NuRaftLogSnapshot.h index 77bcc31829..eab68f199b 100644 --- a/src/Service/NuRaftLogSnapshot.h +++ b/src/Service/NuRaftLogSnapshot.h @@ -100,7 +100,7 @@ struct SnapObject if (!tryReadUint64Text(tokens[3], log_last_index)) return false; - if (!tryReadUint64Text(tokens[2], object_id)) + if (!tryReadUint64Text(tokens[4], object_id)) return false; } else