-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kvflowcontrol: add simulation unit test equivalent to kvflowsimulator #130186
Closed
Tracked by
#129276
Labels
A-replication-admission-control-v2
Related to introduction of replication AC v2
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv
KV Team
Comments
3 tasks
blathers-crl
bot
added
the
X-blathers-untriaged
blathers was unable to find an owner
label
Sep 5, 2024
kvoli
changed the title
Simulation unit test equivalent to the tests in
kvflowcontrol: add simulation unit test equivalent to kvflowsimulator
Sep 5, 2024
pkg/.../kvflowsimulator
kvoli
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv
KV Team
A-replication-admission-control-v2
Related to introduction of replication AC v2
and removed
X-blathers-untriaged
blathers was unable to find an owner
labels
Sep 5, 2024
kvoli
added a commit
to kvoli/cockroach
that referenced
this issue
Sep 13, 2024
... Resolves: cockroachdb#130186 Release note: None
kvoli
added a commit
to kvoli/cockroach
that referenced
this issue
Sep 13, 2024
Add a new simulation test, `TestUsingSimulation`. This test mirrors `kvflowsimulator.TestUsingSimulation` and its existing datadriven tests cases. When comparing the output from each, no behavioral differences show up, only intentionally different metric names. Note that like the `kvflowsimulator.TestUsingSimulation`, the simulation test needs to be deterministic and therefore only uses a single goroutine, to avoid goroutine scheduling causing non-determinism. As such, helper methods have been added to facilitate waiting for available tokens directly on a stream's token counter and on a range in a non-blocking manner (`testingNonBlockingAdmit`). These added methods are simplified versions of `WaitForEval`, which always wait for all connected streams to have available tokens before admission. Resolves: cockroachdb#130186 Release note: None
kvoli
added a commit
to kvoli/cockroach
that referenced
this issue
Sep 13, 2024
Add a new simulation test, `TestUsingSimulation`. This test mirrors `kvflowsimulator.TestUsingSimulation` and its existing datadriven tests cases. When comparing the output from each, no behavioral differences show up, only intentionally different metric names. Note that like the `kvflowsimulator.TestUsingSimulation`, the simulation test needs to be deterministic and therefore only uses a single goroutine, to avoid goroutine scheduling causing non-determinism. As such, helper methods have been added to facilitate waiting for available tokens directly on a stream's token counter and on a range in a non-blocking manner (`testingNonBlockingAdmit`). These added methods are simplified versions of `WaitForEval`, which always wait for all connected streams to have available tokens before admission. Resolves: cockroachdb#130186 Release note: None
kvoli
added a commit
to kvoli/cockroach
that referenced
this issue
Sep 13, 2024
Add a new simulation test, `TestUsingSimulation`. This test mirrors `kvflowsimulator.TestUsingSimulation` and its existing datadriven tests cases. When comparing the output from each, no behavioral differences show up, only intentionally different metric names. Note that like the `kvflowsimulator.TestUsingSimulation`, the simulation test needs to be deterministic and therefore only uses a single goroutine, to avoid goroutine scheduling causing non-determinism. As such, helper methods have been added to facilitate waiting for available tokens directly on a stream's token counter and on a range in a non-blocking manner (`testingNonBlockingAdmit`). These added methods are simplified versions of `WaitForEval`, which always wait for all connected streams to have available tokens before admission. Resolves: cockroachdb#130186 Release note: None
kvoli
added a commit
to kvoli/cockroach
that referenced
this issue
Sep 13, 2024
Add a new simulation test, `TestUsingSimulation`. This test mirrors `kvflowsimulator.TestUsingSimulation` and its existing datadriven tests cases. When comparing the output from each, no behavioral differences show up, only intentionally different metric names. Note that like the `kvflowsimulator.TestUsingSimulation`, the simulation test needs to be deterministic and therefore only uses a single goroutine, to avoid goroutine scheduling causing non-determinism. As such, helper methods have been added to facilitate waiting for available tokens directly on a stream's token counter and on a range in a non-blocking manner (`testingNonBlockingAdmit`). These added methods are simplified versions of `WaitForEval`, which always wait for all connected streams to have available tokens before admission. Resolves: cockroachdb#130186 Release note: None
craig bot
pushed a commit
that referenced
this issue
Sep 16, 2024
130446: rac2: add kvflowsimulator equivalent simulation test r=sumeerbhola a=kvoli Add a new simulation test, `TestUsingSimulation`. This test mirrors `kvflowsimulator.TestUsingSimulation` and its existing datadriven tests cases. When comparing the output from each, no behavioral differences show up, only intentionally different metric names. Note that like the `kvflowsimulator.TestUsingSimulation`, the simulation test needs to be deterministic and therefore only uses a single goroutine, to avoid goroutine scheduling causing non-determinism. As such, helper methods have been added to facilitate waiting for available tokens directly on a stream's token counter and on a range in a non-blocking manner (`testingNonBlockingAdmit`). These added methods are simplified versions of `WaitForEval`, which always wait for all connected streams to have available tokens before admission. Resolves: #130186 Release note: None Co-authored-by: Austen McClernon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-replication-admission-control-v2
Related to introduction of replication AC v2
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv
KV Team
Add a unit test which has similar coverage as
kvflowsimulator
forrac2
:cockroach/pkg/kv/kvserver/kvflowcontrol/kvflowsimulator/simulation_test.go
Lines 43 to 47 in d3e15d7
Jira issue: CRDB-41914
Epic CRDB-37515
The text was updated successfully, but these errors were encountered: