cockroachdb / cockroachdb/cockroach
roachtest/mixedversion: expose if a hook has been scheduled multiple times in one upgrade
- 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
Assessment
This issue has not been assessed yet.