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.
(6) Upgrade n1 to v2 protocol with v2 encoding.
(7) Transfer the range lease to n1.
(8) Upgrade n2,n3 to v2 protocol with v2 encoding.
(9) Transfer the range lease to n3.
```

Between each step, we issue writes, (un)block admission and observe the
flow control metrics and vtables.

Resolves: #130431
Resolves: #129276
Release note: None
  • Loading branch information
kvoli committed Sep 25, 2024
1 parent f9cbb05 commit aae093e
Show file tree
Hide file tree
Showing 2 changed files with 1,659 additions and 1 deletion.
Loading

0 comments on commit aae093e

Please sign in to comment.