Skip to content
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

store: add methods to check for presence of a value without reading it out #10494

Merged
merged 6 commits into from
Jan 29, 2024

Conversation

nagisa
Copy link
Collaborator

@nagisa nagisa commented Jan 25, 2024

Best reviewed on a per-commit basis.

cc #10455

@nagisa nagisa requested a review from a team as a code owner January 25, 2024 12:49
@nagisa nagisa requested review from akhi3030 and removed request for a team January 25, 2024 12:49
@akhi3030
Copy link
Collaborator

In general looks reasonable to me. But maybe either @wacban or @shreyan-gupta can also validate. I'll give my approval.

@nagisa nagisa requested a review from shreyan-gupta January 25, 2024 12:57
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (ad9721d) 72.01% compared to head (fb68b79) 72.02%.

Files Patch % Lines
core/store/src/trie/mod.rs 75.80% 9 Missing and 6 partials ⚠️
core/store/src/trie/update.rs 85.71% 2 Missing ⚠️
core/store/src/genesis/state_applier.rs 0.00% 1 Missing ⚠️
runtime/runtime/src/lib.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10494      +/-   ##
==========================================
+ Coverage   72.01%   72.02%   +0.01%     
==========================================
  Files         720      720              
  Lines      146476   146558      +82     
  Branches   146476   146558      +82     
==========================================
+ Hits       105486   105565      +79     
+ Misses      36133    36130       -3     
- Partials     4857     4863       +6     
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (-0.01%) ⬇️
db-migration 0.08% <0.00%> (-0.01%) ⬇️
genesis-check 1.25% <0.00%> (-0.01%) ⬇️
integration-tests 36.95% <40.00%> (-0.09%) ⬇️
linux 71.21% <77.64%> (-0.01%) ⬇️
linux-nightly 71.35% <77.64%> (+<0.01%) ⬆️
macos 55.13% <50.58%> (+0.02%) ⬆️
pytests 1.47% <0.00%> (-0.01%) ⬇️
sanity-checks 1.27% <0.00%> (-0.01%) ⬇️
unittests 68.00% <74.11%> (+0.03%) ⬆️
upgradability 0.13% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nagisa nagisa force-pushed the nagisa/adds-has-received-data branch from 3b88260 to 93ae45f Compare January 26, 2024 14:28
@nagisa nagisa changed the base branch from nagisa/improves-memstore-lookup-api to nagisa/adds-flat-lookup-api January 26, 2024 14:28
@nagisa nagisa force-pushed the nagisa/adds-flat-lookup-api branch from 250b646 to 3642da6 Compare January 29, 2024 10:53
Base automatically changed from nagisa/adds-flat-lookup-api to master January 29, 2024 11:29
Outstanding question: do we need or want to consult flat storage when
checking for presence?
`get_received_data` has a property of returning the data read out from
the storage which can result in the data being read out multiple times
only for most of these reads to be immediately discarded. The newly
added functions enable explicitly checking for presence of a key without
reading out the corresponding value.
@nagisa nagisa force-pushed the nagisa/adds-has-received-data branch from 93ae45f to fb68b79 Compare January 29, 2024 15:07
@nagisa nagisa enabled auto-merge January 29, 2024 15:08
@nagisa nagisa added this pull request to the merge queue Jan 29, 2024
Merged via the queue into master with commit 84b4559 Jan 29, 2024
24 of 26 checks passed
@nagisa nagisa deleted the nagisa/adds-has-received-data branch January 29, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants