Comments (5)
@mr-bat I just noticed your comment. Sorry to be late.
It's because prefix b+tree requires a special case for deletion. Unlike general b+-tree, prefix b+-tree stores shortest possible separator as see in https://github.com/myui/btree4j/blob/master/src/main/java/btree4j/BTree.java#L802
Then, even if a key is deleted, it's hard to determine while the intermediate seperator(s) in branch nodes can be deleted or not.
from btree4j.
But as described in the paper, delete
can be implemented with a careful implementation.
No merge
feature (merging small leaves and branch shrinking) since my original motivation was append-only usecase.
Better to implement it for delete-heavy workloads.
from btree4j.
Could you explain a bit how we approach this situation?
I tryed implementing it without any luck.
-merge neighbour nodes that share the same parent
-set left/right
-remove parent separator
[if > 0 keys] -recalculate parent separator
[else] -point parent-parent to node & remove parent node
from btree4j.
see https://gist.github.com/myui/e2424bcd2b11741f68581a6c80b5e438
from btree4j.
You can also look at this project https://github.com/mr-bat/BPlusTree.
I ended up implementing a B+ tree of my own.
from btree4j.
Related Issues (12)
- With 10 million keys finds only first few million keys HOT 7
- Replace log4j with SLF4J or java.util.logging
- Better Durability on page read/write HOT 2
- Exception with message: range scan failled... bug? HOT 3
- How to get all values for duplicate keys? HOT 1
- there's an exception when key is greater than 127
- Primitives.toBytes HOT 1
- Distribute artifacts from Maven Central HOT 5
- B-tree server using memcached binary protocol
- Setup travis CI
- Atomicity and consistency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btree4j.