File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,8 @@ func (ss *raftSchedulerShard) worker(
438
438
}
439
439
440
440
ss .Lock ()
441
- if ss .state [id ].flags == stateQueued {
441
+ state = ss .state [id ]
442
+ if state .flags == stateQueued {
442
443
// No further processing required by the range ID, clear it from the
443
444
// state map.
444
445
delete (ss .state , id )
@@ -469,7 +470,6 @@ func (ss *raftSchedulerShard) worker(
469
470
// can not possibly happen before the current processing is done (i.e.
470
471
// now). We do not want the scheduler latency to pick up the time spent
471
472
// handling this replica.
472
- state = ss .state [id ]
473
473
state .begin = crtime .NowMono ()
474
474
ss .state [id ] = state
475
475
ss .queue .Push (id )
Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ func TestSchedulerBuffering(t *testing.T) {
370
370
func TestSchedulerEnqueueWhileProcessing (t * testing.T ) {
371
371
defer leaktest .AfterTest (t )()
372
372
defer log .Scope (t ).Close (t )
373
- skip .UnderNonTestBuild (t ) // stateTestIntercept needs crdb test build
373
+ skip .UnderNonTestBuild (t ) // stateTestIntercept needs CrdbTestBuild
374
374
375
375
ctx , cancel := context .WithTimeout (context .Background (), 5 * time .Second )
376
376
defer cancel ()
You can’t perform that action at this time.
0 commit comments