Commit Graph

33 Commits (10074ee8f417cb8f204f9164ce09911d8c287f23)

Author SHA1 Message Date
Ben Johnson cefc3c5ebd Add circular dependency integrity check.
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.
2014-05-28 08:02:55 -06:00
Ben Johnson a1873dd6f6 Add option to adjust fill percentage.
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.
2014-05-15 14:04:57 -06:00
Ben Johnson d1b21e619d Merge branch 'master' of https://github.com/boltdb/bolt into fix-deletion
Conflicts:
	node.go
2014-05-09 09:38:08 -06:00
Ben Johnson a5cb717fc7 Fix deletion reclamation. 2014-05-09 09:26:34 -06:00
Martin Kobetic d279ea44ce add asserts for detecting pgid high watermark overflow 2014-05-09 13:35:00 +00:00
Ben Johnson 0966dde0d4 Fix bucket free. 2014-05-07 10:37:50 -06:00
Ben Johnson 55e71b0902 Add inline bucket support.
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.
2014-05-05 16:39:55 -06:00
Ben Johnson 25fea2fd9f Refactor split/spill. 2014-05-03 16:21:28 -06:00
Ben Johnson 698b07b074 Add nested buckets.
This commit adds the ability to create buckets inside of other buckets.
It also replaces the buckets page with a root bucket.

Fixes #56.
2014-04-11 12:36:54 -06:00
Ben Johnson 686b6a3341 Add performance counters.
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.
2014-04-02 16:03:03 -06:00
Ben Johnson 7f2de9f17a Add DB.Check(). 2014-03-29 14:22:32 -06:00
Ben Johnson c551e45a47 Consolidate Tx and RWTx. 2014-03-08 20:40:48 -07:00
Ben Johnson 57376f0905 Rename Transaction to Tx.
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.
2014-03-08 17:04:02 -07:00
Ben Johnson 3b2fd8f2d3 Revert "Refactor Transaction/Bucket API."
This reverts commit 1ad2b99f28.
2014-02-22 22:54:54 -07:00
Ben Johnson 1ad2b99f28 Refactor Transaction/Bucket API. 2014-02-21 22:57:50 -07:00
Ben Johnson 459b8eb4ab Read-only transactional block. 2014-02-16 15:43:35 -07:00
Ben Johnson 8ad59edd02 API Documentation. 2014-02-13 10:58:27 -07:00
Ben Johnson 7bb878ff69 Mmap remap. 2014-02-12 11:49:57 -07:00
Ben Johnson b8122bf568 Cursor iteration. 2014-02-11 09:07:07 -07:00
Ben Johnson 509e93dff4 Add freelist. 2014-02-10 14:04:01 -07:00
Ben Johnson 3da04c52b9 Rebalance after deletion. 2014-02-08 23:13:54 -07:00
Ben Johnson 84939c21f6 Refactor node lookup. 2014-02-07 15:03:29 -07:00
Ben Johnson a0c8de592d Fix multi-put transaction. 2014-02-06 16:06:13 -07:00
Ben Johnson 8b3b81ef47 Fix quick tests. 2014-02-05 07:56:13 -07:00
Ben Johnson 0cae98efc5 Add RWTransaction.Delete(). 2014-02-03 14:33:51 -07:00
Ben Johnson 1a17a2cf1e Add RWTransaction.Put(). 2014-02-01 12:30:37 -05:00
Ben Johnson 73ab1d420d TODO 2014-01-24 16:32:18 -07:00
Ben Johnson 20b26eac78 TODO 2014-01-24 12:51:56 -07:00
Ben Johnson bce3e667df Intermediate commit. 2014-01-21 15:00:48 -07:00
Ben Johnson 153372abd4 Refactoring to RWCursor, RWTxn, and branch/leaf nodes and pages. 2014-01-17 15:23:39 -07:00
Ben Johnson ee24437bfc Initial db.open. 2014-01-11 22:51:01 -07:00
Ben Johnson f922c1d2bc Move all C code into repo. 2014-01-09 09:07:10 -07:00
Ben Johnson ebc9f0da9e Basic types. 2014-01-08 08:06:17 -07:00