-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: add basic rac2 integration test
Part of: #130187 Release note: None
- Loading branch information
Showing
24 changed files
with
1,430 additions
and
14 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
89 changes: 89 additions & 0 deletions
89
pkg/kv/kvserver/testdata/flow_control_integration_v2/basic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
echo | ||
---- | ||
---- | ||
-- Flow token metrics, before issuing the regular 1MiB replicated write. | ||
SELECT name, crdb_internal.humanize_bytes(value::INT8) | ||
FROM crdb_internal.node_metrics | ||
WHERE name LIKE '%kvflowcontrol%tokens%' | ||
ORDER BY name ASC; | ||
|
||
kvflowcontrol.tokens.eval.elastic.available | 24 MiB | ||
kvflowcontrol.tokens.eval.elastic.deducted | 0 B | ||
kvflowcontrol.tokens.eval.elastic.returned | 0 B | ||
kvflowcontrol.tokens.eval.elastic.unaccounted | 0 B | ||
kvflowcontrol.tokens.eval.regular.available | 48 MiB | ||
kvflowcontrol.tokens.eval.regular.deducted | 0 B | ||
kvflowcontrol.tokens.eval.regular.returned | 0 B | ||
kvflowcontrol.tokens.eval.regular.unaccounted | 0 B | ||
kvflowcontrol.tokens.send.elastic.available | 24 MiB | ||
kvflowcontrol.tokens.send.elastic.deducted | 0 B | ||
kvflowcontrol.tokens.send.elastic.returned | 0 B | ||
kvflowcontrol.tokens.send.elastic.unaccounted | 0 B | ||
kvflowcontrol.tokens.send.regular.available | 48 MiB | ||
kvflowcontrol.tokens.send.regular.deducted | 0 B | ||
kvflowcontrol.tokens.send.regular.returned | 0 B | ||
kvflowcontrol.tokens.send.regular.unaccounted | 0 B | ||
|
||
|
||
-- (Issuing + admitting a regular 1MiB, triply replicated write...) | ||
|
||
|
||
-- Stream counts as seen by n1 post-write. We should see three {regular,elastic} | ||
-- streams given there are three nodes and we're using a replication factor of | ||
-- three. | ||
SELECT name, value | ||
FROM crdb_internal.node_metrics | ||
WHERE name LIKE '%kvflowcontrol%stream%' | ||
ORDER BY name ASC; | ||
|
||
kvflowcontrol.streams.eval.elastic.blocked_count | 0 | ||
kvflowcontrol.streams.eval.elastic.total_count | 3 | ||
kvflowcontrol.streams.eval.regular.blocked_count | 0 | ||
kvflowcontrol.streams.eval.regular.total_count | 3 | ||
kvflowcontrol.streams.send.elastic.blocked_count | 0 | ||
kvflowcontrol.streams.send.elastic.total_count | 3 | ||
kvflowcontrol.streams.send.regular.blocked_count | 0 | ||
kvflowcontrol.streams.send.regular.total_count | 3 | ||
|
||
|
||
-- Another view of the stream count, using /inspectz-backed vtables. | ||
SELECT range_id, count(*) AS streams | ||
FROM crdb_internal.kv_flow_control_handles_v2 | ||
GROUP BY (range_id) | ||
HAVING count(*) = 3 | ||
ORDER BY streams DESC; | ||
|
||
range_id | stream_count | ||
-----------+--------------- | ||
70 | 3 | ||
|
||
|
||
-- Flow token metrics from n1 after issuing the regular 1MiB replicated write, | ||
-- and it being admitted on n1, n2 and n3. We should see 3*1MiB = 3MiB of | ||
-- {regular,elastic} tokens deducted and returned, and {8*3=24MiB,16*3=48MiB} of | ||
-- {regular,elastic} tokens available. Everything should be accounted for. | ||
SELECT name, crdb_internal.humanize_bytes(value::INT8) | ||
FROM crdb_internal.node_metrics | ||
WHERE name LIKE '%kvflowcontrol%tokens%' | ||
ORDER BY name ASC; | ||
|
||
kvflowcontrol.tokens.eval.elastic.available | 24 MiB | ||
kvflowcontrol.tokens.eval.elastic.deducted | 3.0 MiB | ||
kvflowcontrol.tokens.eval.elastic.returned | 3.0 MiB | ||
kvflowcontrol.tokens.eval.elastic.unaccounted | 0 B | ||
kvflowcontrol.tokens.eval.regular.available | 48 MiB | ||
kvflowcontrol.tokens.eval.regular.deducted | 3.0 MiB | ||
kvflowcontrol.tokens.eval.regular.returned | 3.0 MiB | ||
kvflowcontrol.tokens.eval.regular.unaccounted | 0 B | ||
kvflowcontrol.tokens.send.elastic.available | 24 MiB | ||
kvflowcontrol.tokens.send.elastic.deducted | 3.0 MiB | ||
kvflowcontrol.tokens.send.elastic.returned | 3.0 MiB | ||
kvflowcontrol.tokens.send.elastic.unaccounted | 0 B | ||
kvflowcontrol.tokens.send.regular.available | 48 MiB | ||
kvflowcontrol.tokens.send.regular.deducted | 3.0 MiB | ||
kvflowcontrol.tokens.send.regular.returned | 3.0 MiB | ||
kvflowcontrol.tokens.send.regular.unaccounted | 0 B | ||
---- | ||
---- | ||
|
||
# vim:ft=sql |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.