@@ -555,8 +555,12 @@ func testRaftSnapshotsToNonVoters(t *testing.T, drainReceivingNode bool) {
555555 // Manually enqueue the leaseholder replica into its store's raft snapshot
556556 // queue. We expect it to pick up on the fact that the non-voter on its range
557557 // needs a snapshot.
558- recording , pErr , err := leaseholderStore .ManuallyEnqueue (
559- ctx , "raftsnapshot" , leaseholderRepl , false , /* skipShouldQueue */
558+ recording , pErr , err := leaseholderStore .Enqueue (
559+ ctx ,
560+ "raftsnapshot" ,
561+ leaseholderRepl ,
562+ false , /* skipShouldQueue */
563+ false , /* async */
560564 )
561565 if pErr != nil {
562566 return pErr
@@ -751,7 +755,9 @@ func TestReplicateQueueSeesLearnerOrJointConfig(t *testing.T) {
751755 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
752756 {
753757 require .Equal (t , int64 (0 ), getFirstStoreMetric (t , tc .Server (0 ), `queue.replicate.removelearnerreplica` ))
754- _ , processErr , err := store .ManuallyEnqueue (ctx , "replicate" , repl , true /* skipShouldQueue */ )
758+ _ , processErr , err := store .Enqueue (
759+ ctx , "replicate" , repl , true /* skipShouldQueue */ , false , /* async */
760+ )
755761 require .NoError (t , err )
756762 require .NoError (t , processErr )
757763 require .Equal (t , int64 (1 ), getFirstStoreMetric (t , tc .Server (0 ), `queue.replicate.removelearnerreplica` ))
@@ -769,7 +775,9 @@ func TestReplicateQueueSeesLearnerOrJointConfig(t *testing.T) {
769775 ltk .withStopAfterJointConfig (func () {
770776 desc := tc .RemoveVotersOrFatal (t , scratchStartKey , tc .Target (2 ))
771777 require .True (t , desc .Replicas ().InAtomicReplicationChange (), desc )
772- trace , processErr , err := store .ManuallyEnqueue (ctx , "replicate" , repl , true /* skipShouldQueue */ )
778+ trace , processErr , err := store .Enqueue (
779+ ctx , "replicate" , repl , true /* skipShouldQueue */ , false , /* async */
780+ )
773781 require .NoError (t , err )
774782 require .NoError (t , processErr )
775783 formattedTrace := trace .String ()
@@ -808,7 +816,9 @@ func TestReplicaGCQueueSeesLearnerOrJointConfig(t *testing.T) {
808816 // Run the replicaGC queue.
809817 checkNoGC := func () roachpb.RangeDescriptor {
810818 store , repl := getFirstStoreReplica (t , tc .Server (1 ), scratchStartKey )
811- trace , processErr , err := store .ManuallyEnqueue (ctx , "replicaGC" , repl , true /* skipShouldQueue */ )
819+ trace , processErr , err := store .Enqueue (
820+ ctx , "replicaGC" , repl , true /* skipShouldQueue */ , false , /* async */
821+ )
812822 require .NoError (t , err )
813823 require .NoError (t , processErr )
814824 const msg = `not gc'able, replica is still in range descriptor: (n2,s2):`
@@ -868,7 +878,9 @@ func TestRaftSnapshotQueueSeesLearner(t *testing.T) {
868878 // raft to figure out that the replica needs a snapshot.
869879 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
870880 testutils .SucceedsSoon (t , func () error {
871- trace , processErr , err := store .ManuallyEnqueue (ctx , "raftsnapshot" , repl , true /* skipShouldQueue */ )
881+ trace , processErr , err := store .Enqueue (
882+ ctx , "raftsnapshot" , repl , true /* skipShouldQueue */ , false , /* async */
883+ )
872884 if err != nil {
873885 return err
874886 }
@@ -1004,7 +1016,9 @@ func TestLearnerReplicateQueueRace(t *testing.T) {
10041016 queue1ErrCh := make (chan error , 1 )
10051017 go func () {
10061018 queue1ErrCh <- func () error {
1007- trace , processErr , err := store .ManuallyEnqueue (ctx , "replicate" , repl , true /* skipShouldQueue */ )
1019+ trace , processErr , err := store .Enqueue (
1020+ ctx , "replicate" , repl , true /* skipShouldQueue */ , false , /* async */
1021+ )
10081022 if err != nil {
10091023 return err
10101024 }
@@ -1484,7 +1498,9 @@ func TestMergeQueueDoesNotInterruptReplicationChange(t *testing.T) {
14841498 // ensure that the merge correctly notices that there is a snapshot in
14851499 // flight and ignores the range.
14861500 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchKey )
1487- _ , processErr , enqueueErr := store .ManuallyEnqueue (ctx , "merge" , repl , true /* skipShouldQueue */ )
1501+ _ , processErr , enqueueErr := store .Enqueue (
1502+ ctx , "merge" , repl , true /* skipShouldQueue */ , false , /* async */
1503+ )
14881504 require .NoError (t , enqueueErr )
14891505 require .True (t , kvserver .IsReplicationChangeInProgressError (processErr ))
14901506 return nil
@@ -1529,7 +1545,9 @@ func TestMergeQueueSeesLearnerOrJointConfig(t *testing.T) {
15291545 })
15301546
15311547 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
1532- trace , processErr , err := store .ManuallyEnqueue (ctx , "merge" , repl , true /* skipShouldQueue */ )
1548+ trace , processErr , err := store .Enqueue (
1549+ ctx , "merge" , repl , true /* skipShouldQueue */ , false , /* async */
1550+ )
15331551 require .NoError (t , err )
15341552 require .NoError (t , processErr )
15351553 formattedTrace := trace .String ()
@@ -1564,7 +1582,9 @@ func TestMergeQueueSeesLearnerOrJointConfig(t *testing.T) {
15641582 checkTransitioningOut := func () {
15651583 t .Helper ()
15661584 store , repl := getFirstStoreReplica (t , tc .Server (0 ), scratchStartKey )
1567- trace , processErr , err := store .ManuallyEnqueue (ctx , "merge" , repl , true /* skipShouldQueue */ )
1585+ trace , processErr , err := store .Enqueue (
1586+ ctx , "merge" , repl , true /* skipShouldQueue */ , false , /* async */
1587+ )
15681588 require .NoError (t , err )
15691589 require .NoError (t , processErr )
15701590 formattedTrace := trace .String ()
0 commit comments