Skip to content

Commit fae892b

Browse files
committed
asim: panic if ticket not found in store rebalancer
This commit adds a panic assertion to ensure pending ticket exists in store rebalancer asim since asim should not delete a ticket from controller.tickets. Epic: none Relese note: none
1 parent 27c7c7c commit fae892b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kv/kvserver/asim/storerebalancer/store_rebalancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (src *storeRebalancerControl) checkPendingTicket() (done bool, _ error) {
145145
ticket := src.rebalancerState.pendingTicket
146146
op, ok := src.controller.Check(ticket)
147147
if !ok {
148-
return true, nil
148+
panic(fmt.Sprintf("operation not found for ticket %v", ticket))
149149
}
150150
done, _ = op.Done()
151151
if !done {

0 commit comments

Comments
 (0)