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

Enable true async mode #35

Open
aleks-f opened this issue Dec 15, 2021 · 0 comments
Open

Enable true async mode #35

aleks-f opened this issue Dec 15, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@aleks-f
Copy link
Owner

aleks-f commented Dec 15, 2021

Currently, the I/O has to be "serialized" from outside, which defeats the async nature of the I/O to a significant extent; while internally the I/O requests will be going on between multiple peers for every request, the request round-trip must be "outside shielded" (serialized) to prevent concurrent I/O requests.

There are two main reasons for this limitation:

  1. On startup, I/O may begin before Session was completely initialized; this has to do with SocketProactor::IOCompletion running in its own thread. Session constructor should wait for the initial discovery I/O to complete before proceeding and allowing kademlia library I/O operations to be issued.

  2. When I/O is running concurrently, loading values sometimes fails with "value not found" error; this manifest itself as a timeout, but increasing the timeout value does not help it - for some reason, some peers fail to respond with the sought for value; a "stopgap" that fixes this problem is to treat the timed out peers as new ("uncontacted") on such occurrence, but the true underlying reason for it should be further investigated (this problem does not happen when the loading operations are serialized)

@aleks-f aleks-f added the bug Something isn't working label Dec 15, 2021
@aleks-f aleks-f self-assigned this Dec 15, 2021
aleks-f added a commit that referenced this issue Dec 19, 2021
aleks-f added a commit that referenced this issue Dec 19, 2021
* add save/load time measuring

* fix: Enable true async mode #35

* chore(stress): Linux compile fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant