Skip to content

db: pool range-key iterator structs, remove Clone#1662

Merged
jbowens merged 1 commit intocockroachdb:masterfrom
jbowens:pool-no-clone
Apr 21, 2022
Merged

db: pool range-key iterator structs, remove Clone#1662
jbowens merged 1 commit intocockroachdb:masterfrom
jbowens:pool-no-clone

Conversation

@jbowens
Copy link
Copy Markdown
Contributor

@jbowens jbowens commented Apr 20, 2022

Add a sync.Pool for pooling of the iteratorRangeKeyState struct which holds an
iterator's range key iterator stack.

Additionally, remove the (keyspan.FragmentIterator).Clone method. This method
is no longer necessary now that visibility of range keys is enforced by the
keyspan.MergingIter's transform, which hides keys created more recently than
the cloned iterator's sequence number.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Add a sync.Pool for pooling of the iteratorRangeKeyState struct which holds an
iterator's range key iterator stack.

Additionally, remove the (keyspan.FragmentIterator).Clone method. This method
is no longer necessary now that visibility of range keys is enforced by the
keyspan.MergingIter's transform, which hides keys created more recently than
the cloned iterator's sequence number.
Copy link
Copy Markdown
Contributor

@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 10 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jbowens)

Copy link
Copy Markdown
Contributor Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

TFTR!

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jbowens)

@jbowens jbowens merged commit 8decd08 into cockroachdb:master Apr 21, 2022
@jbowens jbowens deleted the pool-no-clone branch April 21, 2022 14:31
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