@@ -430,8 +430,12 @@ func testRaftSnapshotsToNonVoters(t *testing.T, drainReceivingNode bool) {
430430 // Manually enqueue the leaseholder replica into its store's raft snapshot
431431 // queue. We expect it to pick up on the fact that the non-voter on its range
432432 // needs a snapshot.
433- recording , pErr , err := leaseholderStore .ManuallyEnqueue (
434- ctx , "raftsnapshot" , leaseholderRepl , false , /* skipShouldQueue */
433+ recording , pErr , err := leaseholderStore .Enqueue (
434+ ctx ,
435+ "raftsnapshot" ,
436+ leaseholderRepl ,
437+ false , /* skipShouldQueue */
438+ false , /* async */
435439 )
436440 if pErr != nil {
437441 return pErr
@@ -582,7 +586,9 @@ func TestReplicateQueueSeesLearnerOrJointConfig(t *testing.T) {
582586 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
583587 {
584588 require .Equal (t , int64 (0 ), getFirstStoreMetric (t , tc .Server (0 ), `queue.replicate.removelearnerreplica` ))
585- _ , processErr , err := store .ManuallyEnqueue (ctx , "replicate" , repl , true /* skipShouldQueue */ )
589+ _ , processErr , err := store .Enqueue (
590+ ctx , "replicate" , repl , true /* skipShouldQueue */ , false , /* async */
591+ )
586592 require .NoError (t , err )
587593 require .NoError (t , processErr )
588594 require .Equal (t , int64 (1 ), getFirstStoreMetric (t , tc .Server (0 ), `queue.replicate.removelearnerreplica` ))
@@ -600,7 +606,9 @@ func TestReplicateQueueSeesLearnerOrJointConfig(t *testing.T) {
600606 ltk .withStopAfterJointConfig (func () {
601607 desc := tc .RemoveVotersOrFatal (t , scratchStartKey , tc .Target (2 ))
602608 require .True (t , desc .Replicas ().InAtomicReplicationChange (), desc )
603- trace , processErr , err := store .ManuallyEnqueue (ctx , "replicate" , repl , true /* skipShouldQueue */ )
609+ trace , processErr , err := store .Enqueue (
610+ ctx , "replicate" , repl , true /* skipShouldQueue */ , false , /* async */
611+ )
604612 require .NoError (t , err )
605613 require .NoError (t , processErr )
606614 formattedTrace := trace .String ()
@@ -639,7 +647,9 @@ func TestReplicaGCQueueSeesLearnerOrJointConfig(t *testing.T) {
639647 // Run the replicaGC queue.
640648 checkNoGC := func () roachpb.RangeDescriptor {
641649 store , repl := getFirstStoreReplica (t , tc .Server (1 ), scratchStartKey )
642- trace , processErr , err := store .ManuallyEnqueue (ctx , "replicaGC" , repl , true /* skipShouldQueue */ )
650+ trace , processErr , err := store .Enqueue (
651+ ctx , "replicaGC" , repl , true /* skipShouldQueue */ , false , /* async */
652+ )
643653 require .NoError (t , err )
644654 require .NoError (t , processErr )
645655 const msg = `not gc'able, replica is still in range descriptor: (n2,s2):`
@@ -699,7 +709,9 @@ func TestRaftSnapshotQueueSeesLearner(t *testing.T) {
699709 // raft to figure out that the replica needs a snapshot.
700710 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
701711 testutils .SucceedsSoon (t , func () error {
702- trace , processErr , err := store .ManuallyEnqueue (ctx , "raftsnapshot" , repl , true /* skipShouldQueue */ )
712+ trace , processErr , err := store .Enqueue (
713+ ctx , "raftsnapshot" , repl , true /* skipShouldQueue */ , false , /* async */
714+ )
703715 if err != nil {
704716 return err
705717 }
@@ -835,7 +847,9 @@ func TestLearnerReplicateQueueRace(t *testing.T) {
835847 queue1ErrCh := make (chan error , 1 )
836848 go func () {
837849 queue1ErrCh <- func () error {
838- trace , processErr , err := store .ManuallyEnqueue (ctx , "replicate" , repl , true /* skipShouldQueue */ )
850+ trace , processErr , err := store .Enqueue (
851+ ctx , "replicate" , repl , true /* skipShouldQueue */ , false , /* async */
852+ )
839853 if err != nil {
840854 return err
841855 }
@@ -1233,7 +1247,9 @@ func TestMergeQueueDoesNotInterruptReplicationChange(t *testing.T) {
12331247 // ensure that the merge correctly notices that there is a snapshot in
12341248 // flight and ignores the range.
12351249 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchKey )
1236- _ , processErr , enqueueErr := store .ManuallyEnqueue (ctx , "merge" , repl , true /* skipShouldQueue */ )
1250+ _ , processErr , enqueueErr := store .Enqueue (
1251+ ctx , "merge" , repl , true /* skipShouldQueue */ , false , /* async */
1252+ )
12371253 require .NoError (t , enqueueErr )
12381254 require .True (t , kvserver .IsReplicationChangeInProgressError (processErr ))
12391255 return nil
@@ -1278,7 +1294,9 @@ func TestMergeQueueSeesLearnerOrJointConfig(t *testing.T) {
12781294 })
12791295
12801296 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
1281- trace , processErr , err := store .ManuallyEnqueue (ctx , "merge" , repl , true /* skipShouldQueue */ )
1297+ trace , processErr , err := store .Enqueue (
1298+ ctx , "merge" , repl , true /* skipShouldQueue */ , false , /* async */
1299+ )
12821300 require .NoError (t , err )
12831301 require .NoError (t , processErr )
12841302 formattedTrace := trace .String ()
@@ -1313,7 +1331,9 @@ func TestMergeQueueSeesLearnerOrJointConfig(t *testing.T) {
13131331 checkTransitioningOut := func () {
13141332 t .Helper ()
13151333 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
1316- trace , processErr , err := store .ManuallyEnqueue (ctx , "merge" , repl , true /* skipShouldQueue */ )
1334+ trace , processErr , err := store .Enqueue (
1335+ ctx , "merge" , repl , true /* skipShouldQueue */ , false , /* async */
1336+ )
13171337 require .NoError (t , err )
13181338 require .NoError (t , processErr )
13191339 formattedTrace := trace .String ()
0 commit comments