-
Notifications
You must be signed in to change notification settings - Fork 161
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
WIP: failing proptest for willow sync #2695
WIP: failing proptest for willow sync #2695
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2695/docs/iroh/ Last updated: 2024-09-04T16:46:17Z |
a2d8316
to
46c386c
Compare
Some updates:
|
Closing this in favor of #2727 |
Hmm. #2724 is still a mystery to me. On the surface it seems very unrelated. Why should some additional info during sync affect the final state of the store? |
…reliably (#2727) ## Description Fixes #2695 * Refactor peer manager to really keep track of all connections, the previous logic of a single peer state was flawed for simultaneous accepts while closing previous connections. * Better debuggability of reconciler * Add proptest from #2695 and refactor to run in both directions simultaneously. ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. --------- Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
Description
This is a proptest that runs several "rounds" of a protocol. Each "round", one side does some writes. In between rounds and at the end, the side that wrote calls
sync_once
with the other side.I've seen the test fail in four ways:
RecvStream
, but rarely thatspawn_node
. Lots of threads created with the blob, docs and willow store.Here's some output of a run that fails with the last kind of error (output cleaned up somewhat):
Failing test output
Unfortunately, there's a bunch of randomness involved in willow, so it's hard to reproduce consistently, and also hard to shrink for proptest as a result of that.
Dialing down the complexity of the tests (fewer rounds, smaller rounds), also seems to make it much harder to reproduce this issue.
I started testing this, because I was often seeing weird results for
get_many
in my port oftauri-todos
for willow, where suddenly some entries were duplicated and some entries missing entirely. It actually happens much more often in the tauri version, but the setup is also slightly different (real time & continuous sync vs. clear rounds with waiting for finished syncs).Breaking Changes
Notes & open questions
TODO:
Change checklist