-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
rewrite enumerate children async to be less fragile #3571
Conversation
7b48da0
to
4c3c784
Compare
4c3c784
to
bece206
Compare
closes #3505 |
CHANGELOG: |
I've tried pinning my large directory with this code and following error happened: http://dump.bitcheese.net/files/lokydaf/daemon.log |
bece206
to
d35bf52
Compare
@Voker57 Whoops, forgot that these keysets arent threadsafe. Did some locking and ran the merkledag tests with the race detector (would be great to have faster CI so we can run the race detector in CI). Should be good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, but I am not 100% sure of my knowledge and understanding side-effects of this code.
This forkbombed or something my PC (extreme load, unresponsive until I killed ipfs). Unbounded concurrency again? |
@Voker57 are you able to run |
@Voker57 I just removed concurrency from the pin enumeration. This should help, it might be slower, but depending on the situation, it might actually be faster because of disk contention issues with async... |
There are merge conflicts. |
fdcff01
to
eac1fa2
Compare
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
merge conflicts resolved. Awaiting feedback from @Voker57. My 100GB dataset was able to be pinned just fine, but its on a rather beefy machine. |
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
Serial fetching works, but it's very slow: 1.15 hrs vs ~40 minutes using my patch. it's utilizing neither CPU nor IO to full capacity. |
I've submitted PR on this PR (is this the best way to do this?) which brings RAM usage to adequate levels. Also, I've rechecked and parallelizing doesn't win anything significant here on traditional HDD, except if disk storage is split into several IO channels somehow. |
@Voker57 I'm going to merge this one for now so its shipped in 0.4.5 (despite the decreased performance). We will get your patches into the next release. |
#3550 made us realize how terribly fragile the EnumerateChildrenAsync code was, so this is a cleaner rewrite of it from scratch.
License: MIT
Signed-off-by: Jeromy why@ipfs.io