-
Notifications
You must be signed in to change notification settings - Fork 454
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
Check all "not found" errors #2532
Check all "not found" errors #2532
Conversation
Currently only the leveldb not found errors are handled. If a pebble not found error is returned by the backend it is propagated, causing the batchposter to fail to send transactions. With this change all DB not found errors are handled the same way. (cherry picked from commit 8506886)
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2 |
I signed the CLA. |
@@ -61,7 +61,7 @@ func (s *Storage) Get(_ context.Context, index uint64) (*storage.QueuedTransacti | |||
key := idxToKey(index) | |||
value, err := s.db.Get(key) | |||
if err != nil { | |||
if errors.Is(err, leveldb.ErrNotFound) { | |||
if isErrNotFound(err) { |
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.
I don't think there's an isErrNotFound
in scope here. Are you sure you didn't mean dbutil.IsErrNotFound
?
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.
Yes, you're right. The code has been moved recently. I cherry picked from our fork where the function is still in this file.
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.
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
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.
LGTM
It looks like I don't have permission to push to your branch, but it'll need to be up to date with master to be merged in |
Sorry about that, this needs another merge of master. I'll prioritize this PR so it should be merged next and won't need any other merges. |
Currently only the leveldb not found errors are handled. If a pebble not found error is returned by the backend it is propagated, causing the batchposter to fail to send transactions.
We saw this error only appear recently and I believe it's because the default was changed from
leveldb
topebble
herehttps://github.com/OffchainLabs/nitro/pull/2447/files
With this change all DB not found errors are handled the same way.
(cherry picked from commit 8506886)