Skip to content

Commit

Permalink
kvserver: add v1->v2 flow control integration test
Browse files Browse the repository at this point in the history
Add `TestFlowControlV1ToV2Transition`, which ratchets up the enabled
version of replication flow control v2:

```
v1 protocol with v1 encoding =>
v2 protocol with v1 encoding =>
v2 protocol with v2 encoding
```

The test is structured to issue writes and wait for returned tokens
whenever the protocol transitions from v1 to v2, or a leader changes.

More specifically, the test takes the following steps:

```
(1) Start n1, n2, n3 with v1 protocol and v1 encoding.
(2) Upgrade n1 to v2 protocol with v1 encoding.
(3) Transfer the range lease to n2.
(4) Upgrade n2 to v2 protocol with v1 encoding.
(5) Upgrade n3 to v2 protocol with v1 encoding.
(5) Upgrade n1 to v2 protocol with v2 encoding.
(6) Transfer the range lease to n1.
(7) Upgrade n2,n3 to v2 protocol with v2 encoding.
(8) Transfer the range lease to n3.
Between each step, we issue writes, (un)block admission and observe the
flow control metrics and vtables.
```

Resolves: cockroachdb#130431
Resolves: cockroachdb#129276
Release note: None
  • Loading branch information
kvoli committed Sep 24, 2024
1 parent 04c54f6 commit 49f45fb
Show file tree
Hide file tree
Showing 2 changed files with 1,588 additions and 1 deletion.
Loading

0 comments on commit 49f45fb

Please sign in to comment.