aboutsummaryrefslogtreecommitdiff
path: root/node.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Expand assertion statements.Ben Johnson2015-01-301-6/+17
| | | | | | This commit expands calls to _assert() that use variadic arguments. These calls require conversion to interface{} so there was a large number of calls to Go's internal convT2E() function. In some profiling this was taking over 20% of total runtime. I don't remember seeing this before Go 1.4 so perhaps something has changed.
* Move tests to a test package.Ben Johnson2014-07-261-2/+2
|
* Change fill percent to be per-bucket.Ben Johnson2014-07-241-1/+1
| | | | | | This commit moves the DB.FillPercent field to Bucket.FillPercent. This allows the fill percentage to be specified per-bucket, per-tx. This value is not persisted and should be set whenever using it.
* Fix root split on very large append.Ben Johnson2014-07-231-14/+7
| | | | | | | This commit fixes a bug where a root split on a very large insert would cause an overflow of the root node. The problem was that the new root was not split when it was created so a new root with more than 64K child nodes would overflow the page.count (uint16).
* Fix double spill.Ben Johnson2014-07-231-1/+5
| | | | | | This fixes an issue where split nodes can be double spilled. This is typically not noticable but it can have large effects when bulk inserting as double spilled nodes will get added to the freelist which will grow quickly.
* Optimize large append.Ben Johnson2014-07-221-8/+21
| | | | | | | | This commit fixes an issue where large nodes would take up most of the insert time because the entire node size would be calculated to check if it could fit in a page or not. This changes the behavior so that a node's size is only calculated up to the size it needs to check and then returns.
* Fix merge-split regression.Ben Johnson2014-06-181-17/+32
| | | | | | | This commit reverts merge-split and fixes the node.split() to do a multi-page split. This issue caused problems with bulk loading because it would split into a small page and a very large page. The very large page, in turn, would be an arbitrary size so when it was freed later it would be difficult to reuse and would cause serious fragmentation issues.
* Fix double free in merge-left rebalance.Ben Johnson2014-06-061-1/+0
| | | | | | | | | This commit fixes a bug where deletions that caused merge-left rebalances were updating the parent node which caused a node to "reappear" even after it had been deleted. This was fixed in merge-right rebalances a while ago but merge-left is less frequent so it was missed until now. Many thanks to Jordan Sherer (@jsherer) for finding and reporting the bug.
* Fix merge-split spill issues.Ben Johnson2014-06-031-10/+24
|
* Allow split nodes to be merged with the next node.Ben Johnson2014-06-021-34/+49
| | | | | | | | | This commit changes the node.split() functionality to check if the next node has available space and, if so, it will merge the newly split keys into the next node. Previously, keys could be continually put into the left side of a split causing that first half to split off small right side nodes. This was especially problematic with databases with a high fill percent.
* Add circular dependency integrity check.Ben Johnson2014-05-281-0/+1
| | | | | | This commit adds a check to prevent circular dependencies in branch nodes. If a circular dependency occurs then a panic will be called and the commit will be prevented. This only works for a single branch level and will not recursively search the tree.
* Add option to adjust fill percentage.Ben Johnson2014-05-151-2/+8
| | | | | | | | | | This commit adds the ability to adjust the fill percentage for splitting nodes. This works by setting a threshold that is a percentage of a total page size. When that threshold is crossed during a split then a new node is created. This is primarily beneficial for append-only workloads. Fixes #163.
* Merge branch 'master' of https://github.com/boltdb/bolt into fix-deletionBen Johnson2014-05-091-0/+3
|\ | | | | | | | | Conflicts: node.go
| * add asserts for detecting pgid high watermark overflowMartin Kobetic2014-05-091-0/+4
| |
* | Fix deletion reclamation.Ben Johnson2014-05-091-13/+36
|/
* Fix bucket free.Ben Johnson2014-05-071-1/+11
|
* Add inline bucket support.Ben Johnson2014-05-051-2/+32
| | | | | | | | | | | | | | | This commit adds support for writing small buckets directly inline to their value in their parent's leaf node. Previously, subbuckets would simply have a bucket header stored in their parent bucket which pointed to the root page. This required that every bucket use at least a single page. This has a high overhead for buckets with only one or two small items. Inline buckets checks subbuckets to see if they only have a small amount of data (about 1kb) and no subbuckets. If these conditions are met then the bucket's root node is written to a fake page which is simply a pointer to the end of the bucket's header. Fixes #124.
* Refactor split/spill.Ben Johnson2014-05-031-18/+123
|
* Add nested buckets.Ben Johnson2014-04-111-27/+23
| | | | | | | This commit adds the ability to create buckets inside of other buckets. It also replaces the buckets page with a root bucket. Fixes #56.
* Add performance counters.Ben Johnson2014-04-021-0/+3
| | | | | | | | | | | | This commit adds performance counters for each transaction which are rolled up to the database level on each commit/rollback. Counters are meant to be a very fast way to track what is going on in the database. A few timers are also added in areas where the time.Now() overhead is not noticible. The DB.Stat() function is now deprecated since the `bolt` CLI now performs similar functions. Fixes #108.
* Add DB.Check().Ben Johnson2014-03-291-0/+10
|
* Consolidate Tx and RWTx.Ben Johnson2014-03-081-1/+1
|
* Rename Transaction to Tx.Ben Johnson2014-03-081-20/+20
| | | | | I changed the Transaction/RWTransaction types to Tx/RWTx, respectively. This makes the naming more consistent with other packages such as database/sql. The txnid is changed to txid as well.
* Revert "Refactor Transaction/Bucket API."Ben Johnson2014-02-221-1/+1
| | | | This reverts commit 1ad2b99f281d587b767b36f886401e81d17915a9.
* Refactor Transaction/Bucket API.Ben Johnson2014-02-211-1/+1
|
* Read-only transactional block.Ben Johnson2014-02-161-1/+1
|
* API Documentation.Ben Johnson2014-02-131-6/+6
|
* Mmap remap.Ben Johnson2014-02-121-4/+20
|
* Cursor iteration.Ben Johnson2014-02-111-0/+4
|
* Add freelist.Ben Johnson2014-02-101-12/+8
|
* Rebalance after deletion.Ben Johnson2014-02-081-2/+161
|
* Refactor node lookup.Ben Johnson2014-02-071-1/+8
|
* Fix multi-put transaction.Ben Johnson2014-02-061-1/+1
|
* Fix quick tests.Ben Johnson2014-02-051-5/+7
|
* Add RWTransaction.Delete().Ben Johnson2014-02-031-0/+14
|
* Add RWTransaction.Put().Ben Johnson2014-02-011-0/+178
|
* TODOBen Johnson2014-01-241-40/+0
|
* TODOBen Johnson2014-01-241-0/+10
|
* Intermediate commit.Ben Johnson2014-01-211-0/+30
|
* Refactoring to RWCursor, RWTxn, and branch/leaf nodes and pages.Ben Johnson2014-01-171-91/+0
|
* Initial db.open.Ben Johnson2014-01-111-38/+38
|
* Move all C code into repo.Ben Johnson2014-01-091-0/+51
|
* Basic types.Ben Johnson2014-01-081-0/+40