Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
3 people committed Aug 8, 2023
3 parents 29c1a7c + c69d253 + 80b8bf8 commit 10fac80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/roachtest/tests/network_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func registerNetworkLogging(r registry.Registry) {
// URLs already are wrapped in '', but we need to add a timeout flag.
// Trim the trailing ' and re-add with the flag.
trimmed := strings.TrimSuffix(url, "'")
workloadPGURLs[i] = fmt.Sprintf("%s&statement_timeout=10s'", trimmed)
// Define a 60s client statement timeout.
workloadPGURLs[i] = fmt.Sprintf("%s&statement_timeout=60000'", trimmed)
}

// Init & run a workload on the workload node.
Expand Down
7 changes: 7 additions & 0 deletions pkg/kv/kvserver/client_lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,13 @@ func TestLeasePreferencesDuringOutage(t *testing.T) {
locality("us", "mi"),
locality("us", "mi"),
}
// Disable expiration based lease transfers. It is possible that a (pseudo)
// dead node acquires the lease and we are forced to wait out the expiration
// timer, if this were not set.
settings := cluster.MakeTestingClusterSettings()
sv := &settings.SV
kvserver.TransferExpirationLeasesFirstEnabled.Override(ctx, sv, false)
kvserver.ExpirationLeasesOnly.Override(ctx, sv, false)
for i := 0; i < numNodes; i++ {
serverArgs[i] = base.TestServerArgs{
Locality: localities[i],
Expand Down

0 comments on commit 10fac80

Please sign in to comment.