File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -231,29 +231,6 @@ butil::Status RaftSnapshot::HandleRaftSnapshotRegionMeta(braft::SnapshotReader*
231231 }
232232 }
233233
234- // update store_state_machine's applied_index from snapshot meta.
235- auto raft_store_engine = Server::GetInstance ().GetRaftStoreEngine ();
236- if (raft_store_engine == nullptr ) {
237- DINGO_LOG (ERROR) << fmt::format (" [raft.snapshot][region({})] raft store engine is null" , region->Id ());
238- return butil::Status (pb::error::EINTERNAL, " raft store engine is null" );
239- }
240- auto raft_node = raft_store_engine->GetNode (region->Id ());
241- if (raft_node == nullptr ) {
242- DINGO_LOG (ERROR) << fmt::format (" [raft.snapshot][region({})] raft node is null" , region->Id ());
243- return butil::Status (pb::error::EINTERNAL, " raft node is null" );
244- }
245- auto fsm = raft_node->GetStateMachine ();
246- if (fsm == nullptr ) {
247- DINGO_LOG (ERROR) << fmt::format (" [raft.snapshot][region({})] raft node's fsm is null" , region->Id ());
248- return butil::Status (pb::error::EINTERNAL, " raft node's fsm is null" );
249- }
250- auto store_state_machine = std::dynamic_pointer_cast<StoreStateMachine>(fsm);
251- auto old_index = store_state_machine->GetAppliedIndex ();
252- store_state_machine->UpdateAppliedIndex (meta.log_index ());
253-
254- DINGO_LOG (INFO) << fmt::format (" [raft.snapshot][region({})] update applied index from snapshot meta, from: {} to: {}" ,
255- region->Id (), old_index, meta.log_index ());
256-
257234 return butil::Status ();
258235}
259236
You can’t perform that action at this time.
0 commit comments