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

Duplicate iterator buffers #823

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Duplicate iterator buffers #823

merged 1 commit into from
Jun 15, 2023

Conversation

omerfirmak
Copy link
Contributor

The slice that pebble.Iterator returns for Key() and Value() requests are owned by the iterator. So it can be reused or garbage collected anytime.

We should make sure that we own those slices by copying the data first

@omerfirmak omerfirmak requested review from a team, IronGauntlets and joshklop and removed request for a team June 15, 2023 09:59
db/pebble/iterator.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Patch coverage: 78.57% and project coverage change: +0.09 🎉

Comparison is base (e4b6255) 72.96% compared to head (07afa95) 73.06%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #823      +/-   ##
==========================================
+ Coverage   72.96%   73.06%   +0.09%     
==========================================
  Files          54       54              
  Lines        5241     5253      +12     
==========================================
+ Hits         3824     3838      +14     
+ Misses       1109     1107       -2     
  Partials      308      308              
Impacted Files Coverage Δ
db/pebble/iterator.go 89.65% <78.57%> (-10.35%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

The slice that pebble.Iterator returns for Key() and Value() requests
are owned by the iterator. So it can be reused or garbage collected anytime.

We should make sure that we own those slices by copying the data first
@IronGauntlets IronGauntlets merged commit 257a50b into main Jun 15, 2023
@IronGauntlets IronGauntlets deleted the omerfirmak/it-buffers branch June 15, 2023 21:34
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.

4 participants