refactor(raft_storage): remove dead code (#351)

This commit is contained in:
Jiarui Li 2021-12-20 09:17:36 -05:00 committed by GitHub
parent 90e2dfaffa
commit c82fd58ed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,9 +146,6 @@ func (rs *RaftStorage) Reader(ctx *kvrpcpb.Context) (storage.StorageReader, erro
if cb.Txn == nil { if cb.Txn == nil {
panic("can not found region snap") panic("can not found region snap")
} }
if len(resp.Responses) != 1 {
panic("wrong response count for snap cmd")
}
return NewRegionReader(cb.Txn, *resp.Responses[0].GetSnap().Region), nil return NewRegionReader(cb.Txn, *resp.Responses[0].GetSnap().Region), nil
} }