This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Allow for common free lists.#5
Merged
gconnell merged 2 commits intogoogle:masterfrom Apr 15, 2016
keep94:freelist
Merged
Conversation
Contributor
Author
|
Ping. |
|
|
||
| // FreeList represents a free list of btree nodes. By default each | ||
| // BTree has its own FreeList, but multiple BTrees can share the same | ||
| // FreeList. |
Contributor
There was a problem hiding this comment.
Add note that two btrees using the same freelist are not safe for concurrent write access.
Contributor
Author
|
Ping. |
1 similar comment
Contributor
Author
|
Ping. |
nvb
added a commit
to nvb/cockroach
that referenced
this pull request
Nov 6, 2018
google/btree#5 Release note: None
nvb
added a commit
to nvb/cockroach
that referenced
this pull request
Nov 13, 2018
google/btree#5 Release note: None
nvb
added a commit
to nvb/cockroach
that referenced
this pull request
Nov 13, 2018
google/btree#5 Release note: None
nvb
added a commit
to nvb/cockroach
that referenced
this pull request
Nov 15, 2018
google/btree#5 Release note: None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the same pull request that I had sent yesterday except that I changed FreeList always to have 32 node capacity. The grow field is now gone. Now btree.New(50) is functionally equivalent to btree.NewWithFreeList(50, btree.NewFreeList()).
Because we continue to have network connectivity issues, I am still unable to collect meaningful metrics on freelist high water marks for now. However, I plan to monitor our freelist high water mark going forward. If we find that our high water mark is consistently pinned at 32, I will send another PR to introduce the NewUnboundedFreeList() function.
Thanks again.