Skip to content

Commit

Permalink
Merge #60557
Browse files Browse the repository at this point in the history
60557: storage,server: disable separated intents r=sumeerbhola a=sumeerbhola

They are disabled by default, and the setting is
not randomized on the testing path for testserver.go.

This was causing slowness in TestLogic/*/aggregate
resulting in TestLogic sometimes exceeding the
test timeout.

This is due to an unforseen slowness in intent
resolution caused by the effectively randomized ordering
of the latest and older intents.

Informs #41720

Release note: None

Co-authored-by: sumeerbhola <[email protected]>
  • Loading branch information
craig[bot] and sumeerbhola committed Feb 13, 2021
2 parents 95c5d76 + 59bda0d commit 197d0cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pkg/server/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"context"
"encoding/base64"
"fmt"
"math/rand"
"net"
"net/http"
"net/http/cookiejar"
Expand Down Expand Up @@ -132,11 +131,12 @@ func makeTestConfigFromParams(params base.TestServerArgs) Config {
st := params.Settings
if params.Settings == nil {
st = cluster.MakeClusterSettings()
enabledSeparated := rand.Intn(2) == 0
log.Infof(context.Background(),
"test Config is randomly setting enabledSeparated: %t",
enabledSeparated)
storage.SeparatedIntentsEnabled.Override(&st.SV, enabledSeparated)
// TODO(sumeer): re-introduce this randomization.
// enabledSeparated := rand.Intn(2) == 0
// log.Infof(context.Background(),
// "test Config is randomly setting enabledSeparated: %t",
// enabledSeparated)
// storage.SeparatedIntentsEnabled.Override(&st.SV, enabledSeparated)
}
st.ExternalIODir = params.ExternalIODir
cfg := makeTestConfig(st)
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/intent_reader_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var SeparatedIntentsEnabled = settings.RegisterBoolSetting(
"storage.transaction.separated_intents.enabled",
"if enabled, intents will be written to a separate lock table, instead of being "+
"interleaved with MVCC values",
true,
false,
)

// This file defines wrappers for Reader and Writer, and functions to do the
Expand Down

0 comments on commit 197d0cc

Please sign in to comment.