-
Notifications
You must be signed in to change notification settings - Fork 137
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
feat(goleveldb,rocksdb): optimization: remove redundant check from iterator #250
feat(goleveldb,rocksdb): optimization: remove redundant check from iterator #250
Conversation
Codecov Report
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
- Coverage 68.54% 68.05% -0.50%
==========================================
Files 27 27
Lines 2130 2116 -14
==========================================
- Hits 1460 1440 -20
- Misses 595 596 +1
- Partials 75 80 +5
|
@creachadair I really couldn't say for sure if this one is safe. |
How do you know it is unnecessary? |
@08d2 I don't for sure, which is why I said
|
If you're not sure, I'm not sure how I'm supposed to be 😀 |
Then I suppose this PR should be closed, no? |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
None of us should be sure. My preference: I change this to a draft, and figure out if it's safe. |
@creachadair on this, I'd kindly request aid in figuring out how to make the certain determination that this code is safe. It's part of the omnibus upgrade branch. My comments about safety are driven by disabling these tests: the tests that you can see in common_test.go |
@faddat You have removed a fair amount of code which verifies certain invariants during tests. If that code was added again, would the corresponding tests fail? If they would fail, can you explain why those failures are safe to ignore? |
Hi @08d2 -- I have mainly experiential info on this. Basically, those iterator checks that are removed here, are what are required to pass the the tests that I removed here. "it works". Now, if you're able to help come up with some new tests, that would be super useful. For both this and #237 -- the reality is that I'm very literally just doing what I can observe to work well. I would like to improve testing, and restructure this repo, and ensure that we remove badgerdb from future timelines for both the cosmos-sdk and tendermint -- or have very good reason for using it. |
But why did you remove those tests? |
ah-- look at the corresponding code |
Looking at the code explains the "what" but not the "why" — can you ELI5? 😇 |
sure. The tests were dependent on the "redundant check from iterator". |
See checknextpanics? That would return the specific panic that the tests were looking for. Part of the reason that this was converted to a draft is that I reckon that different tests could be added. TBH, the larger issue right now is that the master branch is failing tests because... reasons. Need to solve that, before other things are relevant imo. |
I'm sorry, I don't follow. I'd appreciate it if you could take a few minutes to write out exactly what this PR is doing, and why you believe it is (or could be) safe. Connect the dots for me :) because at the moment, it's not obvious to me why any of these changes have been made, nor that any of them are actually safe. |
I mentioned above, I am not fully sure it's safe, and that's part of why it's on draft. Will work on the fact that main fails tests, then come back. This is much more serious: |
-- anyhow @08d2 -- I'd prefer to keep this as a draft, walk you through reasoning too. This PR, which is also contained in #237 -- is based on some work from Terra on performance, you can find it at their tm-db fork: https://github.com/terra-money/tm-db Unfortunately, they weren't super insistent on the tests passing there.
@08d2 -- clear enough for ya? Thanks! PS: I'm running #237 in prod. If you see reason why this is bad (#250) please don't hesitate to lmk your thoughts. It is an easy reversion. further related matter I am having an awful time reproducing the performance of #237 as synthetic benchmarks. I know it is a lot faster, cause I'm using it to serve >1b rpc queries /mo. If you or anyone else has thoughts on how to improve the synthetic benchmarks, I'm all ears. |
further-further related matter On 4th or 5th consideration, I am going to close this PR, and revert. I can't prove safety on it. I'm also going to open an issue that explores this but @creachadair and @08d2 are basically right here, there's too little proof behind these changes. |
This is a cherry pick from terra's performance oriented branch.
It removes an unnecessary check when we use the iterator.