forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: use B-Tree for compaction reducer
Swap out the node hash map for a B-Tree. The issue with the node hash map is it's growth pattern. It doubles in size whenver it nears its capacity, which results in large allocations. The B-Tree is a lot more well behaved in this regard. Note how the key into the B-Tree is the hash of the key. This avoids a lot of expensive string compares and maintains the randomness for when we evict from the index. Since there can be collisions, I've used the multimap variant of the tree. (cherry picked from commit b2bab8b)
- Loading branch information
1 parent
0f28eb9
commit 5453caa
Showing
2 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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