Skip to content

Commit 19a8a6e

Browse files
committed
kvserver: squash RemoveOptions sanity check
Epic: none Release note: none
1 parent 325f098 commit 19a8a6e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pkg/kv/kvserver/store_remove_replica.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ func (s *Store) removeInitializedReplicaRaftMuLocked(
7575
if !rep.IsInitialized() {
7676
return nil, errors.AssertionFailedf("cannot remove uninitialized replica %s", rep)
7777
}
78-
79-
if opts.InsertPlaceholder {
80-
if opts.DestroyData {
81-
return nil, errors.AssertionFailedf("cannot specify both InsertPlaceholder and DestroyData")
82-
}
83-
78+
if opts.InsertPlaceholder && opts.DestroyData {
79+
return nil, errors.AssertionFailedf("cannot specify both InsertPlaceholder and DestroyData")
8480
}
8581

8682
// Run sanity checks and on success commit to the removal by setting the

0 commit comments

Comments
 (0)