Skip to content

Commit 4ea4524

Browse files
authored
sa: deprecate parallelismPerRPC (#8728)
This was used when querying for rate limit calculations from the database. Last usage was removed in #7858
1 parent e7adc1d commit 4ea4524

7 files changed

Lines changed: 12 additions & 23 deletions

File tree

cmd/boulder-sa/main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Config struct {
2424

2525
Features features.Config
2626

27-
// Max simultaneous SQL queries caused by a single RPC.
27+
// Deprecated and unused.
2828
ParallelismPerRPC int `validate:"omitempty,min=1"`
2929
// LagFactor is how long to sleep before retrying a read request that may
3030
// have failed solely due to replication lag.
@@ -79,13 +79,11 @@ func main() {
7979

8080
clk := clock.New()
8181

82-
parallel := max(c.SA.ParallelismPerRPC, 1)
83-
8482
tls, err := c.SA.TLS.Load(scope)
8583
cmd.FailOnError(err, "TLS config")
8684

8785
saroi, err := sa.NewSQLStorageAuthorityRO(
88-
dbReadOnlyMap, dbIncidentsMap, scope, parallel, c.SA.LagFactor.Duration, clk, logger)
86+
dbReadOnlyMap, dbIncidentsMap, scope, c.SA.LagFactor.Duration, clk, logger)
8987
cmd.FailOnError(err, "Failed to create read-only SA impl")
9088

9189
sai, err := sa.NewSQLStorageAuthorityWrapping(saroi, dbMap, scope)

cmd/cert-checker/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ func TestGetAndProcessCerts(t *testing.T) {
339339
fc.Set(fc.Now().Add(time.Hour))
340340

341341
checker := newChecker(saDbMap, fc, pa, kp, time.Hour, testValidityDurations, nil, blog.NewMock())
342-
sa, err := sa.NewSQLStorageAuthority(saDbMap, saDbMap, nil, 1, 0, fc, blog.NewMock(), metrics.NoopRegisterer)
342+
sa, err := sa.NewSQLStorageAuthority(saDbMap, saDbMap, nil, 0, fc, blog.NewMock(), metrics.NoopRegisterer)
343343
test.AssertNotError(t, err, "Couldn't create SA to insert certificates")
344344
saCleanUp := test.ResetBoulderTestDatabase(t)
345345
defer func() {

ra/ra_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func initAuthorities(t *testing.T) (*DummyValidationAuthority, sapb.StorageAutho
307307
if err != nil {
308308
t.Fatalf("Failed to create dbMap: %s", err)
309309
}
310-
ssa, err := sa.NewSQLStorageAuthority(dbMap, dbMap, nil, 1, 0, fc, log, metrics.NoopRegisterer)
310+
ssa, err := sa.NewSQLStorageAuthority(dbMap, dbMap, nil, 0, fc, log, metrics.NoopRegisterer)
311311
if err != nil {
312312
t.Fatalf("Failed to create SA: %s", err)
313313
}

sa/sa.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,13 @@ func NewSQLStorageAuthority(
8686
dbMap *db.WrappedMap,
8787
dbReadOnlyMap *db.WrappedMap,
8888
dbIncidentsMap *db.WrappedMap,
89-
parallelismPerRPC int,
9089
lagFactor time.Duration,
9190
clk clock.Clock,
9291
logger blog.Logger,
9392
stats prometheus.Registerer,
9493
) (*SQLStorageAuthority, error) {
9594
ssaro, err := NewSQLStorageAuthorityRO(
96-
dbReadOnlyMap, dbIncidentsMap, stats, parallelismPerRPC, lagFactor, clk, logger)
95+
dbReadOnlyMap, dbIncidentsMap, stats, lagFactor, clk, logger)
9796
if err != nil {
9897
return nil, err
9998
}

sa/sa_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func initSA(t testing.TB) (*SQLStorageAuthority, clock.FakeClock) {
107107
fc := clock.NewFake()
108108
fc.Set(mustTime("2015-03-04 05:00"))
109109

110-
saro, err := NewSQLStorageAuthorityRO(dbMap, dbIncidentsMap, metrics.NoopRegisterer, 1, 0, fc, log)
110+
saro, err := NewSQLStorageAuthorityRO(dbMap, dbIncidentsMap, metrics.NoopRegisterer, 0, fc, log)
111111
if err != nil {
112112
t.Fatalf("Failed to create SA: %s", err)
113113
}

sa/saro.go

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ type SQLStorageAuthorityRO struct {
3838
dbReadOnlyMap *db.WrappedMap
3939
dbIncidentsMap *db.WrappedMap
4040

41-
// For RPCs that generate multiple, parallelizable SQL queries, this is the
42-
// max parallelism they will use (to avoid consuming too many MariaDB
43-
// threads).
44-
parallelismPerRPC int
45-
4641
// lagFactor is the amount of time we're willing to delay before retrying a
4742
// request that may have failed due to replication lag. For example, a user
4843
// might create a new account and then immediately create a new order, but
@@ -71,7 +66,6 @@ func NewSQLStorageAuthorityRO(
7166
dbReadOnlyMap *db.WrappedMap,
7267
dbIncidentsMap *db.WrappedMap,
7368
stats prometheus.Registerer,
74-
parallelismPerRPC int,
7569
lagFactor time.Duration,
7670
clk clock.Clock,
7771
logger blog.Logger,
@@ -82,13 +76,12 @@ func NewSQLStorageAuthorityRO(
8276
}, []string{"method", "result"})
8377

8478
ssaro := &SQLStorageAuthorityRO{
85-
dbReadOnlyMap: dbReadOnlyMap,
86-
dbIncidentsMap: dbIncidentsMap,
87-
parallelismPerRPC: parallelismPerRPC,
88-
lagFactor: lagFactor,
89-
clk: clk,
90-
log: logger,
91-
lagFactorCounter: lagFactorCounter,
79+
dbReadOnlyMap: dbReadOnlyMap,
80+
dbIncidentsMap: dbIncidentsMap,
81+
lagFactor: lagFactor,
82+
clk: clk,
83+
log: logger,
84+
lagFactorCounter: lagFactorCounter,
9285
}
9386

9487
return ssaro, nil

test/config-next/sa.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"dbConnectFile": "test/secrets/incidents_dburl",
1313
"maxOpenConns": 100
1414
},
15-
"ParallelismPerRPC": 20,
1615
"lagFactor": "200ms",
1716
"tls": {
1817
"caCertFile": "test/certs/ipki/minica.pem",

0 commit comments

Comments
 (0)