Skip to content
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
keep94:freelist
Apr 15, 2016
Merged

Allow for common free lists.#5
gconnell merged 2 commits intogoogle:masterfrom
keep94:freelist

Conversation

@keep94
Copy link
Copy Markdown
Contributor

@keep94 keep94 commented Apr 8, 2016

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.

@keep94
Copy link
Copy Markdown
Contributor Author

keep94 commented Apr 11, 2016

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add note that two btrees using the same freelist are not safe for concurrent write access.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@keep94
Copy link
Copy Markdown
Contributor Author

keep94 commented Apr 13, 2016

Ping.

1 similar comment
@keep94
Copy link
Copy Markdown
Contributor Author

keep94 commented Apr 15, 2016

Ping.

@gconnell gconnell merged commit ffef89d into google:master Apr 15, 2016
nvb added a commit to nvb/cockroach that referenced this pull request Nov 6, 2018
nvb added a commit to nvb/cockroach that referenced this pull request Nov 13, 2018
nvb added a commit to nvb/cockroach that referenced this pull request Nov 13, 2018
nvb added a commit to nvb/cockroach that referenced this pull request Nov 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants