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

storage: tweak raftEntryCache allocation #13487

Merged

Conversation

petermattis
Copy link
Collaborator

@petermattis petermattis commented Feb 8, 2017

Using cacheEntryKey and raftpb.Entry as values to OrderedCache implied
an allocation for storing the values in interfaces. There was an
additional allocation for the cache.Entry. These 3 allocations have been
reduced to 1 using the same approach as TimestampCache: an unnamed
struct composed of the key, value and cache.Entry.


This change is Reviewable

Jira issue: CRDB-14771

Jira issue: CRDB-14772

Using cacheEntryKey and raftpb.Entry as values to OrderedCache implied
an allocation for storing the values in interfaces. There was an
additional allocation for the cache.Entry. These 3 allocations have been
reduced to 1 using the same approach as TimestampCache: an unnamed
struct composed of the key, value and cache.Entry.
@bdarnell
Copy link
Member

bdarnell commented Feb 8, 2017

:lgtm:


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@petermattis petermattis merged commit ddbcd15 into cockroachdb:master Feb 8, 2017
@petermattis petermattis deleted the pmattis/raft-entry-cache branch February 8, 2017 21:26
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.

None yet

2 participants