Skip to content

Commit 10fac80

Browse files
craig[bot]abarganierkvoli
committed
108295: roachtest: increase timeout for network_logging to 60s r=dhartunian a=abarganier Fixes: cockroachdb#108088 The new network_logging roachtest sets a pgclient timeout of 10s to attempt detecting deadlocks. This timeout was hit fairly easily during the nightly runs. This is an indication that our 10s timeout is too aggressive. This PR changes the timeout from 10s to 60s which still achieves the original aim without being so aggressive. Release note: none 108333: kvserver: deflake lease preferences during outage r=erikgrinaker a=kvoli *This PR is intended to be backported to `release-22.2`. `TestLeasePreferencesDuringOutage` is currently skipped on master. Stressed for 30 mins without failure on release-22.2.* Previously, it was possible for a soon-to-be dead replica, to acquire the range lease in the `TestLeasePreferencesDuringOutage` test. The acquired lease would be expiration based, disallowing the intended leaseholder from acquiring the lease. This patch disables expiration based lease transfers, deflaking the test. Resolves: cockroachdb#105101 Epic: none Release note: None Co-authored-by: Alex Barganier <[email protected]> Co-authored-by: Austen McClernon <[email protected]>
3 parents 29c1a7c + c69d253 + 80b8bf8 commit 10fac80

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pkg/cmd/roachtest/tests/network_logging.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ func registerNetworkLogging(r registry.Registry) {
9090
// URLs already are wrapped in '', but we need to add a timeout flag.
9191
// Trim the trailing ' and re-add with the flag.
9292
trimmed := strings.TrimSuffix(url, "'")
93-
workloadPGURLs[i] = fmt.Sprintf("%s&statement_timeout=10s'", trimmed)
93+
// Define a 60s client statement timeout.
94+
workloadPGURLs[i] = fmt.Sprintf("%s&statement_timeout=60000'", trimmed)
9495
}
9596

9697
// Init & run a workload on the workload node.

pkg/kv/kvserver/client_lease_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,13 @@ func TestLeasePreferencesDuringOutage(t *testing.T) {
947947
locality("us", "mi"),
948948
locality("us", "mi"),
949949
}
950+
// Disable expiration based lease transfers. It is possible that a (pseudo)
951+
// dead node acquires the lease and we are forced to wait out the expiration
952+
// timer, if this were not set.
953+
settings := cluster.MakeTestingClusterSettings()
954+
sv := &settings.SV
955+
kvserver.TransferExpirationLeasesFirstEnabled.Override(ctx, sv, false)
956+
kvserver.ExpirationLeasesOnly.Override(ctx, sv, false)
950957
for i := 0; i < numNodes; i++ {
951958
serverArgs[i] = base.TestServerArgs{
952959
Locality: localities[i],

0 commit comments

Comments
 (0)