iotexproject / iotex-core

Official implementation of IoTeX blockchain protocol in Go.
https://iotex.io
Apache License 2.0
1.55k stars 322 forks source link

return bucket not exist for the filter function in kvstore with buffer #4251

Open CoderZhi opened 2 months ago

CoderZhi commented 2 months ago

In the implementation of KVStore, e.g., boltdb, error ErrBucketNotExist is returned when the bucket doesn't exist. If the kvstore returns an error, the error will be returned without going through the data stored in buffer. This PR fixes the bug and eventually return error ErrBucketNotExist if no such namespace found in the buffer.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist:

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud