Skip to content

storage: minor iterator tweaks#79744

Merged
erikgrinaker merged 2 commits intocockroachdb:mvcc-range-tombstonesfrom
erikgrinaker:mvcc-range-tombstone-iterfix
Apr 11, 2022
Merged

storage: minor iterator tweaks#79744
erikgrinaker merged 2 commits intocockroachdb:mvcc-range-tombstonesfrom
erikgrinaker:mvcc-range-tombstone-iterfix

Conversation

@erikgrinaker
Copy link
Copy Markdown
Contributor

This is for the mvcc-range-tombstones branch.

These are minor fixes/tweaks following #79291, which will be squashed into the respective commits on mvcc-range-tombstones. Submitting a PR just to keep the history.


storage: fix batch reads with multiple concurrent iterators

Release note: None

storage: minor code cleanups

Release note: None

@erikgrinaker erikgrinaker requested a review from a team as a code owner April 10, 2022 18:14
@erikgrinaker erikgrinaker self-assigned this Apr 10, 2022
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@erikgrinaker erikgrinaker force-pushed the mvcc-range-tombstones branch from d63e143 to 53aa367 Compare April 10, 2022 19:43
@erikgrinaker erikgrinaker requested a review from a team as a April 10, 2022 19:43
@erikgrinaker erikgrinaker force-pushed the mvcc-range-tombstone-iterfix branch from 768f563 to 4178a11 Compare April 10, 2022 19:44
@erikgrinaker erikgrinaker force-pushed the mvcc-range-tombstones branch from 53aa367 to 004eab2 Compare April 10, 2022 21:44
@erikgrinaker erikgrinaker force-pushed the mvcc-range-tombstone-iterfix branch from 4178a11 to 19748e3 Compare April 10, 2022 21:45
Copy link
Copy Markdown
Collaborator

@nicktrav nicktrav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @aliher1911 and @jbowens)

@erikgrinaker erikgrinaker merged commit 2097ac5 into cockroachdb:mvcc-range-tombstones Apr 11, 2022
@erikgrinaker
Copy link
Copy Markdown
Contributor Author

TFTR!

@erikgrinaker erikgrinaker deleted the mvcc-range-tombstone-iterfix branch April 11, 2022 20:33
Copy link
Copy Markdown
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained


pkg/storage/pebble_iterator.go, line 41 at r2 (raw file):

	// use two slices for each of the bounds since this caller should not change
	// the slice holding the current bounds, that the callee (pebble.MVCCIterator)
	// is currently using, until after the caller has made the SetBounds call.

Why is the removal of this 2 slice scheme correct? I assumed this meant we are making a copy somewhere in the Iterator.SetOptions code path but I can't spot it in the Pebble code.

Copy link
Copy Markdown
Contributor Author

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained


pkg/storage/pebble_iterator.go, line 41 at r2 (raw file):

Previously, sumeerbhola wrote…

Why is the removal of this 2 slice scheme correct? I assumed this meant we are making a copy somewhere in the Iterator.SetOptions code path but I can't spot it in the Pebble code.

Good catch, thanks. I don't think I fully grasped the need for this, and tests passed without it. Reintroduced in #79993.

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