Skip to content

Commit 3abfe27

Browse files
committed
kvserver: inline the static opts in RemoveReplica
Epic: none Release note: none
1 parent e1c7c3d commit 3abfe27

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pkg/kv/kvserver/store_remove_replica.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ type RemoveOptions struct {
3737
func (s *Store) RemoveReplica(
3838
ctx context.Context, rep *Replica, nextReplicaID roachpb.ReplicaID, reason redact.SafeString,
3939
) error {
40-
opts := RemoveOptions{DestroyData: true}
4140
rep.raftMu.Lock()
4241
defer rep.raftMu.Unlock()
43-
if opts.InsertPlaceholder {
44-
return errors.Errorf("InsertPlaceholder not supported in RemoveReplica")
45-
}
46-
_, err := s.removeInitializedReplicaRaftMuLocked(ctx, rep, nextReplicaID, reason, opts)
42+
_, err := s.removeInitializedReplicaRaftMuLocked(ctx, rep, nextReplicaID, reason, RemoveOptions{
43+
DestroyData: true,
44+
})
4745
return err
4846
}
4947

0 commit comments

Comments
 (0)