We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a67cc34 commit c1770b4Copy full SHA for c1770b4
pkg/roachprod/failureinjection/failures/reset.go
@@ -7,7 +7,7 @@ package failures
7
8
import (
9
"context"
10
- "slices"
+ "math/rand"
11
"time"
12
13
"github.com/cockroachdb/cockroach/pkg/roachprod"
@@ -87,11 +87,12 @@ func (m *processMap) getStartOrder() []string {
87
return order
88
}
89
90
-// getStopOrder returns the order in which the processes should be stopped. It
91
-// is the reverse of the start order.
+// getStopOrder returns the order in which the processes should be stopped.
92
func (m *processMap) getStopOrder() []string {
93
order := m.getStartOrder()
94
- slices.Reverse(order)
+ rand.Shuffle(len(order), func(i, j int) {
+ order[i], order[j] = order[j], order[i]
95
+ })
96
97
98
0 commit comments