mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: fix nil dereference in physical Compact on proposal timeout
Fixes #5292
This commit is contained in:
parent
4481016953
commit
824ffded12
@ -121,7 +121,7 @@ func isTxnSerializable(r *pb.TxnRequest) bool {
|
||||
|
||||
func (s *EtcdServer) Compact(ctx context.Context, r *pb.CompactionRequest) (*pb.CompactionResponse, error) {
|
||||
result, err := s.processInternalRaftRequest(ctx, pb.InternalRaftRequest{Compaction: r})
|
||||
if r.Physical && result.physc != nil {
|
||||
if r.Physical && result != nil && result.physc != nil {
|
||||
<-result.physc
|
||||
// The compaction is done deleting keys; the hash is now settled
|
||||
// but the data is not necessarily committed. If there's a crash,
|
||||
|
Loading…
x
Reference in New Issue
Block a user