-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Shard download space fix #3604
Shard download space fix #3604
Conversation
Hi @undertome, it would be useful for me to have a little more background on this bug fix. It would be handy to know:
Also it looks like the fix is associated with being low on resources. Does the user have any recourse once they discover that they are too low on resources to handle the shards? Thanks. |
Hi Scott,
If the user is low on resources, the Hope that helps. |
A couple of your commit messages don't follow these guidelines: https://chris.beams.io/posts/git-commit/ May I suggest rewordings? Consider:
and
Or perhaps you can come up with something better. |
7cbbd6c
to
f9b9647
Compare
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.
👍 Looks good. I left notes about a few things for you to think about. Nothing critical, although covering a few more of the error cases in the unit tests would be really nice. All comments are at your discretion. Thanks for making life a little easier for ledger users!
FWIW, I was running the unit tests for code coverage on this branch using macOS and I got this error message during the test run:
It did not leave a stack trace behind. I'll see if I can reproduce the problem. |
Not surprisingly the bug is not easy to reproduce.
I'm going to start a loop running the |
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.
Thanks for the improved unit test coverage.
I'm guessing the non-reproducible unit test failure that I saw is not because of these changes.
I continued running a test over the weekend to try and get more information about the crash observed on Friday. I ran just the ShardArchiveHandler unit test in a loop. After 5928 iterations I got a different crash from the originally reported crash. Here's link to the stack trace of this most recent crash in case it's useful: https://gist.github.com/scottschurr/cec16dc035d9ec83fe61e6411cee0ddf |
Success! By running just the ShardArchiveHandler under code coverage in a loop I was able to reproduce the original symptom quickly. And this time I got a stack trace. On the console I see:
You can find the stack trace here: https://gist.github.com/scottschurr/f43be7a61290562738728bb4b668a6e8 |
Are you sure you're running code from this branch? That stack trace references |
That's a fair question. Here's the git log of the branch I've been testing:
|
That said, even though that's the source code currently in place, it's possible (but seems unlikely) that I did not do a proper build before running the ShardArchiveHandler unit test in a loop over the weekend. If that's the case please accept my apologies. For the |
The |
I took a quick look at the stack @scottschurr produced and observed the following. The crash comes from within a journal. From |
Thanks for looking into it, I will see if this checks out. |
Codecov Report
|
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.
👍
2265040
to
453894b
Compare
New commit fixes a Travis error caused by an "unused" (it's used in an |
f8f52d0
to
449cc29
Compare
High Level Overview of Change
With this change, the
DatabaseShardImp
will confirm that sufficient space is available to store all the shards queued for download, instead of confirming that each shard will fit without considering the additional space required by the others.Context of Change
This PR is stacked on two unmerged PRs. The relevant code starts with commit 6e1b74e.
Type of Change