@@ -74,7 +74,7 @@ func registerDiskBandwidthOverload(r registry.Registry) {
74
74
staller := roachtestutil .MakeCgroupDiskStaller (t , c ,
75
75
false /* readsToo */ , false /* logsToo */ )
76
76
staller .Setup (ctx )
77
- staller .Slow (ctx , c .CRDBNodes (), provisionedBandwidth )
77
+ staller .Slow (ctx , c .CRDBNodes (), provisionedBandwidth /* bytesPerSecond */ )
78
78
79
79
// TODO(aaditya): Extend this test to also limit reads once we have a
80
80
// mechanism to pace read traffic in AC.
@@ -135,11 +135,11 @@ func registerDiskBandwidthOverload(r registry.Registry) {
135
135
db := c .Conn (ctx , t .L (), len (c .CRDBNodes ()))
136
136
defer db .Close ()
137
137
138
- const bandwidthLimit = 75
138
+ const bandwidthLimitMbs = 75
139
139
if _ , err := db .ExecContext (
140
140
// We intentionally set this to much lower than the provisioned value
141
141
// above to clearly show that the bandwidth limiter works.
142
- ctx , fmt .Sprintf ("SET CLUSTER SETTING kvadmission.store.provisioned_bandwidth = '%dMiB'" , bandwidthLimit )); err != nil {
142
+ ctx , fmt .Sprintf ("SET CLUSTER SETTING kvadmission.store.provisioned_bandwidth = '%dMiB'" , bandwidthLimitMbs )); err != nil {
143
143
t .Fatalf ("failed to set kvadmission.store.provisioned_bandwidth: %v" , err )
144
144
}
145
145
@@ -172,7 +172,7 @@ func registerDiskBandwidthOverload(r registry.Registry) {
172
172
}
173
173
174
174
// Allow a 5% room for error.
175
- const bandwidthThreshold = bandwidthLimit * 1.05
175
+ const bandwidthThreshold = bandwidthLimitMbs * 1.05
176
176
const sampleCountForBW = 12
177
177
const collectionIntervalSeconds = 10.0
178
178
// Loop for ~20 minutes.
0 commit comments