cockroachdb / cockroachdb/cockroach

roachtest/mixedversion: expose if a hook has been scheduled multiple times in one upgrade

Open
#143,455 1 comment 0 reactions 0 assignees View on GitHub
A-testeng-foundations A-testing C-enhancement E-starter T-testeng
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently in the mixed version framework, it is possible for a `InMixedVersion` hook to be called several times throughout one upgrade:

```
// it can be called up to four times during each major upgrade
// performed:
//
// 1. when the cluster upgrades to the new binary (`preserve_downgrade_option` set)
// 2. when the cluster downgrades to the old binary
// 3. when the cluster upgrades to the new binary again
// 4. when the cluster is finalizing
```

This is an intended feature to increase coverage, but can cause a few minor side effects:

1. If the hook is run in the background and expects only one instance to be running at once, it has no way of knowing that the test has spun up another instance. It would be nice if the mixed version API had some sort of callback to tell the first instance to stop running.
2. If the hook runs for an extended period, an unlucky plan could easily lead to a timeout. See https://github.com/cockroachdb/cockroach/issues/141896#issuecomment-2679362009 for an example.

Jira issue: CRDB-48844

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.