Skip to content
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

Replacing use of Clojure's random functions with a seedable PRNG? #578

Closed
cole-miller opened this issue Jul 28, 2023 · 2 comments
Closed

Comments

@cole-miller
Copy link

cole-miller commented Jul 28, 2023

As far as I can tell, there's no way to seed the clojure.core functions for making random choices (rand-int and co., see https://clojure.atlassian.net/browse/CLJ-1452), and this is annoying if you want to hold that particular source of nondeterminism fixed when running Jepsen to increase your chances of reproducing a bug. (Of course there are various other nondeterministic inputs into a Jepsen test run.) Would you be interested in a PR that replaced Jepsen's use of these functions with a seedable PRNG?

@aphyr
Copy link
Collaborator

aphyr commented Jul 28, 2023

I don't think this would be particularly useful--the scheduler, network, and database are all nondeterministic and concurrent.

@cole-miller
Copy link
Author

Ah, I guess my intuition was that having a fixed generator graph would improve reproducibility at least somewhat even in the presence of those other sources of nondeterminism -- but you'd know better than I would on that point :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants