Skip to content

Commit dc45340

Browse files
craig[bot]stevendanna
andcommitted
Merge #155007
155007: kvserver: remove whitespace in flow_control_integration_test.go r=pav-kv a=stevendanna This makes it easier to edit this test file if your editor removes trailing whitespace by default. Epic: none Release note: None Co-authored-by: Steven Danna <[email protected]>
2 parents 53a2a95 + 9f7c651 commit dc45340

File tree

39 files changed

+406
-406
lines changed

39 files changed

+406
-406
lines changed

pkg/kv/kvserver/flow_control_integration_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,7 @@ func TestFlowControlLeaderNotLeaseholderV2(t *testing.T) {
15701570
h.query(n1, v2FlowTokensQueryStr)
15711571

15721572
h.comment(`
1573-
-- (Issuing another 1x1MiB, 3x replicated write that's admitted via
1573+
-- (Issuing another 1x1MiB, 3x replicated write that's admitted via
15741574
-- the work queue on the leaseholder. It shouldn't deduct any tokens.)
15751575
`)
15761576
h.put(ctx, k, 1, testFlowModeToPri(mode))
@@ -1858,7 +1858,7 @@ func TestFlowControlSendQueue(t *testing.T) {
18581858
-- Block admission [n2,n3,n4,n5].
18591859
-- Regular write -4 MiB.
18601860
-- Regular write -1 MiB.
1861-
-- - Blocks on wait-for-eval, however the test bypasses this instance.
1861+
-- - Blocks on wait-for-eval, however the test bypasses this instance.
18621862
-- - Metrics should reflect 2 streams being prevented from forming a send queue.
18631863
-- Allow admission [n1,n2,n3,n4,n5] (all).
18641864
-- Assert all tokens returned.
@@ -1932,11 +1932,11 @@ func TestFlowControlSendQueue(t *testing.T) {
19321932
-- Send queue metrics from n1, n3's send queue should have been force-flushed.`)
19331933
h.query(n1, flowSendQueueQueryStr)
19341934
h.comment(`
1935-
-- Observe the total tracked tokens per-stream on n1, n3's flushed entries
1935+
-- Observe the total tracked tokens per-stream on n1, n3's flushed entries
19361936
-- will also be tracked here.`)
19371937
h.query(n1, v2FlowPerStreamTrackedQueryStr, flowPerStreamTrackedQueryHeaderStrs...)
19381938
h.comment(`
1939-
-- Per-store tokens available from n1, these should reflect the deducted
1939+
-- Per-store tokens available from n1, these should reflect the deducted
19401940
-- tokens from force-flushing n3.`)
19411941
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
19421942

@@ -2025,7 +2025,7 @@ func TestFlowControlSendQueue(t *testing.T) {
20252025
setTokenReturnEnabled(true /* enabled */, 0, 1, 2, 3, 4)
20262026
h.waitForAllTokensReturned(ctx, 5, 0 /* serverIdx */)
20272027
h.comment(`
2028-
-- Per-store tokens available from n1. Expect these to return to the same as
2028+
-- Per-store tokens available from n1. Expect these to return to the same as
20292029
-- the initial state.
20302030
`)
20312031
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
@@ -2060,7 +2060,7 @@ func TestFlowControlSendQueue(t *testing.T) {
20602060
h.comment(`
20612061
-- Observe the total tracked tokens per-stream on n1. We should expect to see the
20622062
-- 1 MiB write being tracked across a quorum of streams, while the 4 MiB write
2063-
-- is tracked across each stream (except s1). Two(/4 non-leader) replica send
2063+
-- is tracked across each stream (except s1). Two(/4 non-leader) replica send
20642064
-- streams should be prevented from forming a send queue and have higher tracked
20652065
-- tokens than the other two.
20662066
`)
@@ -2246,7 +2246,7 @@ func TestFlowControlSendQueueManyInflight(t *testing.T) {
22462246
-- queue prevented from forming. Lastly, we will unblock admission and stress
22472247
-- the raft in-flights tracker as the queue is drained.`)
22482248
h.comment(`
2249-
-- Initial per-store tokens available from n1.
2249+
-- Initial per-store tokens available from n1.
22502250
`)
22512251
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
22522252
h.comment(`-- (Blocking below-raft admission on [n1,n2,n3].)`)
@@ -2460,7 +2460,7 @@ func TestFlowControlSendQueueRangeRelocate(t *testing.T) {
24602460
-- be tracked here.`)
24612461
h.query(n1, v2FlowPerStreamTrackedQueryStr, flowPerStreamTrackedQueryHeaderStrs...)
24622462
h.comment(`
2463-
-- Per-store tokens available from n1, these should reflect the lack of tokens
2463+
-- Per-store tokens available from n1, these should reflect the lack of tokens
24642464
-- for s3.`)
24652465
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
24662466

@@ -2748,7 +2748,7 @@ func TestFlowControlRangeSplitMergeMixedVersion(t *testing.T) {
27482748
h.waitForSendQueueSize(ctx, merged.RangeID, 0 /* expSize 0 MiB */, 0 /* serverIdx */)
27492749

27502750
h.comment(`
2751-
-- Send queue and flow token metrics from n1, post-split-merge.
2751+
-- Send queue and flow token metrics from n1, post-split-merge.
27522752
-- We do not expect to see the send queue develop for s3.`)
27532753
h.query(n1, flowSendQueueQueryStr)
27542754
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
@@ -2961,7 +2961,7 @@ func TestFlowControlSendQueueRangeMigrate(t *testing.T) {
29612961
-- be tracked here.`)
29622962
h.query(n1, v2FlowPerStreamTrackedQueryStr, flowPerStreamTrackedQueryHeaderStrs...)
29632963
h.comment(`
2964-
-- Per-store tokens available from n1, these should reflect the lack of tokens
2964+
-- Per-store tokens available from n1, these should reflect the lack of tokens
29652965
-- for s3.`)
29662966
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
29672967

@@ -3146,7 +3146,7 @@ func TestFlowControlSendQueueRangeSplitMerge(t *testing.T) {
31463146
-- be tracked here.`)
31473147
h.query(n1, v2FlowPerStreamTrackedQueryStr, flowPerStreamTrackedQueryHeaderStrs...)
31483148
h.comment(`
3149-
-- Per-store tokens available from n1, these should reflect the lack of tokens
3149+
-- Per-store tokens available from n1, these should reflect the lack of tokens
31503150
-- for s3.`)
31513151
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
31523152

@@ -3417,7 +3417,7 @@ func TestFlowControlSendQueueRangeFeed(t *testing.T) {
34173417
-- n3, using 4x1 MiB (deduction, the write itself is small) writes. Then,
34183418
-- we will write 1 MiB to the range and wait for the closedTS to fall
34193419
-- behind on n3. We expect that the closedTS falling behind will trigger
3420-
-- an error that is returned to the mux rangefeed client, which will in turn
3420+
-- an error that is returned to the mux rangefeed client, which will in turn
34213421
-- allows the rangefeed request to be re-routed to another replica.`)
34223422
// Block admission on n3, while allowing every other node to admit.
34233423
setTokenReturnEnabled(true /* enabled */, 0, 1)
@@ -3451,7 +3451,7 @@ func TestFlowControlSendQueueRangeFeed(t *testing.T) {
34513451
-- be tracked here.`)
34523452
h.query(n1, v2FlowPerStreamTrackedQueryStr, flowPerStreamTrackedQueryHeaderStrs...)
34533453
h.comment(`
3454-
-- Per-store tokens available from n1, these should reflect the lack of tokens
3454+
-- Per-store tokens available from n1, these should reflect the lack of tokens
34553455
-- for s3.`)
34563456
h.query(n1, flowPerStoreTokenQueryStr, flowPerStoreTokenQueryHeaderStrs...)
34573457

@@ -3820,12 +3820,12 @@ var flowPerStoreDeductionQueryHeaderStrs = []string{
38203820
// v2FlowTokensQueryStr is the query string to fetch flow tokens metrics from
38213821
// the node metrics table.
38223822
const v2FlowTokensQueryStr = `
3823-
SELECT
3823+
SELECT
38243824
name,
38253825
crdb_internal.humanize_bytes(value::INT8)
3826-
FROM
3826+
FROM
38273827
crdb_internal.node_metrics
3828-
WHERE
3828+
WHERE
38293829
name LIKE '%kvflowcontrol%tokens%'
38303830
ORDER BY
38313831
name ASC;
@@ -3834,12 +3834,12 @@ ORDER BY
38343834
// flowSendQueueQueryStr is the query string to fetch flow control send queue
38353835
// metrics from the node metrics table.
38363836
const flowSendQueueQueryStr = `
3837-
SELECT
3837+
SELECT
38383838
name,
38393839
crdb_internal.humanize_bytes(value::INT8)
3840-
FROM
3840+
FROM
38413841
crdb_internal.node_metrics
3842-
WHERE
3842+
WHERE
38433843
name LIKE '%kvflowcontrol%send_queue%'
38443844
AND name != 'kvflowcontrol.send_queue.count'
38453845
ORDER BY

pkg/kv/kvserver/testdata/flow_control_integration_v2/admission_post_split_merge_v2_encoding_apply_to_all

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ echo
1111
-- that are yet to get admitted. We see 2*3*1MiB=6MiB deductions of
1212
-- {regular,elastic} tokens with no corresponding returns. The 2*1MiB writes
1313
-- happened on what is soon going to be the LHS and RHS of a range being split.
14-
SELECT
14+
SELECT
1515
name,
1616
crdb_internal.humanize_bytes(value::INT8)
17-
FROM
17+
FROM
1818
crdb_internal.node_metrics
19-
WHERE
19+
WHERE
2020
name LIKE '%kvflowcontrol%tokens%'
2121
ORDER BY
2222
name ASC;
@@ -65,12 +65,12 @@ ORDER BY
6565
-- post-split LHS and RHS ranges respectively. We should see 15MiB extra tokens
6666
-- deducted which comes from (2MiB+3MiB)*3=15MiB. So we stand at
6767
-- 6MiB+15MiB=21MiB now.
68-
SELECT
68+
SELECT
6969
name,
7070
crdb_internal.humanize_bytes(value::INT8)
71-
FROM
71+
FROM
7272
crdb_internal.node_metrics
73-
WHERE
73+
WHERE
7474
name LIKE '%kvflowcontrol%tokens%'
7575
ORDER BY
7676
name ASC;
@@ -131,12 +131,12 @@ ORDER BY
131131
-- from 4MiB*3=12MiB. So we stand at 21MiB+12MiB=33MiB tokens deducted now. The
132132
-- RHS of the range is gone now, and the previously 3*3MiB=9MiB of tokens
133133
-- deducted for it are released at the subsuming LHS leaseholder.
134-
SELECT
134+
SELECT
135135
name,
136136
crdb_internal.humanize_bytes(value::INT8)
137-
FROM
137+
FROM
138138
crdb_internal.node_metrics
139-
WHERE
139+
WHERE
140140
name LIKE '%kvflowcontrol%tokens%'
141141
ORDER BY
142142
name ASC;
@@ -189,12 +189,12 @@ ORDER BY
189189
-- {regular,elastic} tokens returned, including those from:
190190
-- - the LHS before the merge, and
191191
-- - the LHS and RHS before the original split.
192-
SELECT
192+
SELECT
193193
name,
194194
crdb_internal.humanize_bytes(value::INT8)
195-
FROM
195+
FROM
196196
crdb_internal.node_metrics
197-
WHERE
197+
WHERE
198198
name LIKE '%kvflowcontrol%tokens%'
199199
ORDER BY
200200
name ASC;

pkg/kv/kvserver/testdata/flow_control_integration_v2/admission_post_split_merge_v2_encoding_apply_to_elastic

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ echo
1111
-- that are yet to get admitted. We see 2*3*1MiB=6MiB deductions of
1212
-- {regular,elastic} tokens with no corresponding returns. The 2*1MiB writes
1313
-- happened on what is soon going to be the LHS and RHS of a range being split.
14-
SELECT
14+
SELECT
1515
name,
1616
crdb_internal.humanize_bytes(value::INT8)
17-
FROM
17+
FROM
1818
crdb_internal.node_metrics
19-
WHERE
19+
WHERE
2020
name LIKE '%kvflowcontrol%tokens%'
2121
ORDER BY
2222
name ASC;
@@ -65,12 +65,12 @@ ORDER BY
6565
-- post-split LHS and RHS ranges respectively. We should see 15MiB extra tokens
6666
-- deducted which comes from (2MiB+3MiB)*3=15MiB. So we stand at
6767
-- 6MiB+15MiB=21MiB now.
68-
SELECT
68+
SELECT
6969
name,
7070
crdb_internal.humanize_bytes(value::INT8)
71-
FROM
71+
FROM
7272
crdb_internal.node_metrics
73-
WHERE
73+
WHERE
7474
name LIKE '%kvflowcontrol%tokens%'
7575
ORDER BY
7676
name ASC;
@@ -131,12 +131,12 @@ ORDER BY
131131
-- from 4MiB*3=12MiB. So we stand at 21MiB+12MiB=33MiB tokens deducted now. The
132132
-- RHS of the range is gone now, and the previously 3*3MiB=9MiB of tokens
133133
-- deducted for it are released at the subsuming LHS leaseholder.
134-
SELECT
134+
SELECT
135135
name,
136136
crdb_internal.humanize_bytes(value::INT8)
137-
FROM
137+
FROM
138138
crdb_internal.node_metrics
139-
WHERE
139+
WHERE
140140
name LIKE '%kvflowcontrol%tokens%'
141141
ORDER BY
142142
name ASC;
@@ -189,12 +189,12 @@ ORDER BY
189189
-- {regular,elastic} tokens returned, including those from:
190190
-- - the LHS before the merge, and
191191
-- - the LHS and RHS before the original split.
192-
SELECT
192+
SELECT
193193
name,
194194
crdb_internal.humanize_bytes(value::INT8)
195-
FROM
195+
FROM
196196
crdb_internal.node_metrics
197-
WHERE
197+
WHERE
198198
name LIKE '%kvflowcontrol%tokens%'
199199
ORDER BY
200200
name ASC;

pkg/kv/kvserver/testdata/flow_control_integration_v2/basic_v2_encoding_apply_to_all

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ echo
22
----
33
----
44
-- Flow token metrics, before issuing the 1MiB replicated write.
5-
SELECT
5+
SELECT
66
name,
77
crdb_internal.humanize_bytes(value::INT8)
8-
FROM
8+
FROM
99
crdb_internal.node_metrics
10-
WHERE
10+
WHERE
1111
name LIKE '%kvflowcontrol%tokens%'
1212
ORDER BY
1313
name ASC;
@@ -78,12 +78,12 @@ ORDER BY
7878
-- and it being admitted on n1, n2 and n3. We should see 3*1MiB = 3MiB of
7979
-- {regular,elastic} tokens deducted and returned, and {8*3=24MiB,16*3=48MiB} of
8080
-- {regular,elastic} tokens available. Everything should be accounted for.
81-
SELECT
81+
SELECT
8282
name,
8383
crdb_internal.humanize_bytes(value::INT8)
84-
FROM
84+
FROM
8585
crdb_internal.node_metrics
86-
WHERE
86+
WHERE
8787
name LIKE '%kvflowcontrol%tokens%'
8888
ORDER BY
8989
name ASC;

pkg/kv/kvserver/testdata/flow_control_integration_v2/basic_v2_encoding_apply_to_elastic

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ echo
22
----
33
----
44
-- Flow token metrics, before issuing the 1MiB replicated write.
5-
SELECT
5+
SELECT
66
name,
77
crdb_internal.humanize_bytes(value::INT8)
8-
FROM
8+
FROM
99
crdb_internal.node_metrics
10-
WHERE
10+
WHERE
1111
name LIKE '%kvflowcontrol%tokens%'
1212
ORDER BY
1313
name ASC;
@@ -78,12 +78,12 @@ ORDER BY
7878
-- and it being admitted on n1, n2 and n3. We should see 3*1MiB = 3MiB of
7979
-- {regular,elastic} tokens deducted and returned, and {8*3=24MiB,16*3=48MiB} of
8080
-- {regular,elastic} tokens available. Everything should be accounted for.
81-
SELECT
81+
SELECT
8282
name,
8383
crdb_internal.humanize_bytes(value::INT8)
84-
FROM
84+
FROM
8585
crdb_internal.node_metrics
86-
WHERE
86+
WHERE
8787
name LIKE '%kvflowcontrol%tokens%'
8888
ORDER BY
8989
name ASC;

pkg/kv/kvserver/testdata/flow_control_integration_v2/blocked_admission_v2_encoding_apply_to_all

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ echo
77
-- Flow token metrics from n1 after issuing 5 1MiB 3x replicated writes
88
-- that are yet to get admitted. We see 5*1MiB*3=15MiB deductions of
99
-- {regular,elastic} tokens with no corresponding returns.
10-
SELECT
10+
SELECT
1111
name,
1212
crdb_internal.humanize_bytes(value::INT8)
13-
FROM
13+
FROM
1414
crdb_internal.node_metrics
15-
WHERE
15+
WHERE
1616
name LIKE '%kvflowcontrol%tokens%'
1717
ORDER BY
1818
name ASC;
@@ -95,12 +95,12 @@ ORDER BY
9595
-- Flow token metrics from n1 after work gets admitted. We see 15MiB returns of
9696
-- {regular,elastic} tokens, and the available capacities going back to what
9797
-- they were.
98-
SELECT
98+
SELECT
9999
name,
100100
crdb_internal.humanize_bytes(value::INT8)
101-
FROM
101+
FROM
102102
crdb_internal.node_metrics
103-
WHERE
103+
WHERE
104104
name LIKE '%kvflowcontrol%tokens%'
105105
ORDER BY
106106
name ASC;

0 commit comments

Comments
 (0)