@@ -8,7 +8,6 @@ package plan
8
8
import (
9
9
"github.com/cockroachdb/cockroach/pkg/kv/kvpb"
10
10
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/allocator"
11
- "github.com/cockroachdb/cockroach/pkg/kv/kvserver/allocator/storepool"
12
11
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
13
12
"github.com/cockroachdb/cockroach/pkg/roachpb"
14
13
)
@@ -18,9 +17,6 @@ import (
18
17
//
19
18
// TODO(kvoli): Add AllocationRelocateRangeOp.
20
19
type AllocationOp interface {
21
- // ApplyImpact updates the given storepool to reflect the result of
22
- // applying this operation.
23
- ApplyImpact (storepool storepool.AllocatorStorePool )
24
20
// LHBeingRemoved returns true when the leaseholder is will be removed if
25
21
// this operation succeeds, otherwise false.
26
22
LHBeingRemoved () bool
@@ -43,12 +39,6 @@ func (o AllocationTransferLeaseOp) LHBeingRemoved() bool {
43
39
return true
44
40
}
45
41
46
- func (o AllocationTransferLeaseOp ) ApplyImpact (storepool storepool.AllocatorStorePool ) {
47
- // TODO(kvoli): Currently the local storepool is updated directly in the
48
- // lease transfer call, rather than in this function. Move the storepool
49
- // tracking from rq.TransferLease to this function once #89771 is merged.
50
- }
51
-
52
42
// AllocationChangeReplicasOp represents an operation to execute a change
53
43
// replicas txn.
54
44
type AllocationChangeReplicasOp struct {
@@ -73,14 +63,6 @@ func (o AllocationChangeReplicasOp) LHBeingRemoved() bool {
73
63
return false
74
64
}
75
65
76
- // applyEstimatedImpact updates the given storepool to reflect the result
77
- // of applying this operation.
78
- func (o AllocationChangeReplicasOp ) ApplyImpact (storepool storepool.AllocatorStorePool ) {
79
- for _ , chg := range o .Chgs {
80
- storepool .UpdateLocalStoreAfterRebalance (chg .Target .StoreID , o .Usage , chg .ChangeType )
81
- }
82
- }
83
-
84
66
// AllocationFinalizeAtomicReplicationOp represents an operation to finalize an
85
67
// atomic change replicas operation and remove any remaining learners.
86
68
type AllocationFinalizeAtomicReplicationOp struct {}
@@ -89,13 +71,11 @@ var _ AllocationOp = &AllocationFinalizeAtomicReplicationOp{}
89
71
90
72
// TODO(kvoli): This always returns false, however it is possible that the LH
91
73
// may have been removed here.
92
- func (o AllocationFinalizeAtomicReplicationOp ) LHBeingRemoved () bool { return false }
93
- func (o AllocationFinalizeAtomicReplicationOp ) ApplyImpact (storepool storepool.AllocatorStorePool ) {}
74
+ func (o AllocationFinalizeAtomicReplicationOp ) LHBeingRemoved () bool { return false }
94
75
95
76
// AllocationNoop represents no operation.
96
77
type AllocationNoop struct {}
97
78
98
79
var _ AllocationOp = & AllocationNoop {}
99
80
100
- func (o AllocationNoop ) LHBeingRemoved () bool { return false }
101
- func (o AllocationNoop ) ApplyImpact (storepool storepool.AllocatorStorePool ) {}
81
+ func (o AllocationNoop ) LHBeingRemoved () bool { return false }
0 commit comments