File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -2393,21 +2393,6 @@ func prepareChangeReplicasTrigger(
23932393 return crt , nil
23942394}
23952395
2396- func within10s (ctx context.Context , fn func () error ) error {
2397- retOpts := retry.Options {InitialBackoff : time .Second , MaxBackoff : time .Second , MaxRetries : 10 }
2398- var err error
2399- for re := retry .StartWithCtx (ctx , retOpts ); re .Next (); {
2400- err = fn ()
2401- if err == nil {
2402- return nil
2403- }
2404- }
2405- if err != nil {
2406- return err
2407- }
2408- return ctx .Err ()
2409- }
2410-
24112396type changeReplicasTxnArgs struct {
24122397 db * kv.DB
24132398
@@ -2544,7 +2529,12 @@ func execChangeReplicasTxn(
25442529
25452530 // NB: we haven't written any intents yet, so even in the unlikely case in which
25462531 // this is held up, we won't block anyone else.
2547- if err := within10s (ctx , func () error {
2532+ if err := (retry.Options {
2533+ InitialBackoff : 100 * time .Millisecond ,
2534+ Multiplier : 2 ,
2535+ MaxBackoff : time .Second ,
2536+ MaxDuration : 10 * time .Second ,
2537+ }).Do (ctx , func (ctx context.Context ) error {
25482538 if args .testAllowDangerousReplicationChanges {
25492539 return nil
25502540 }
You can’t perform that action at this time.
0 commit comments