Skip to content

Commit

Permalink
Fix error object_id parse
Browse files Browse the repository at this point in the history
  • Loading branch information
lzydmxy authored and JackyWoo committed Jun 5, 2024
1 parent 87c638d commit 3543aba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Service/NuRaftLogSnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,9 @@ size_t KeeperSnapshotManager::loadSnapshotMetas()
ptr<KeeperSnapshotStore> snap_store = cs_new<KeeperSnapshotStore>(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);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/NuRaftLogSnapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3543aba

Please sign in to comment.