Commit Graph

337 Commits (93338e17eccebb077f96aabc7edc8f1c98c1b79d)

Author SHA1 Message Date
Ben Johnson 93338e17ec Merge pull request #174 from benbjohnson/remove-db-check
Remove DB.Check(). Allow read-only Tx.Check().
2014-05-27 12:08:33 -06:00
Ben Johnson 92a9f2e200 Remove DB.Check(). Allow read-only Tx.Check().
This commit removes the DB.Check() function and instead makes the user decide
whether a transaction should be writable or read-only. Tx.Check() is not safe
to use concurrently on a read-only transaction, however, it significantly
improves the performance of it.
2014-05-27 11:31:55 -06:00
Ben Johnson 746dbb3566 Merge branch 'master' of https://github.com/boltdb/bolt 2014-05-27 08:28:06 -06:00
Ben Johnson 271129e40c Merge pull request #172 from benbjohnson/allocation
Remove allocations from read-only buckets.
2014-05-23 13:04:18 -06:00
Ben Johnson bfccbb2cb5 Avoid trashing page cache on Tx.Copy().
This commit change the database copy to use O_DIRECT so that the Linux page
cache is not trashed during a backup. This is only available on Linux.
2014-05-23 11:40:05 -06:00
Ben Johnson 06b01dbb67 Remove allocations from read-only buckets. 2014-05-23 10:40:09 -06:00
Ben Johnson 7432bc341f Merge pull request #169 from benbjohnson/allocation
Fix freelist allocation direction.
2014-05-21 13:46:12 -06:00
Ben Johnson 6fcc7fdb3d Merge pull request #171 from Shopify/tx_copy
Move Copy/CopyFile from DB to Tx and make sure it copies exactly Tx.Size() bytes
2014-05-21 11:04:08 -06:00
Martin Kobetic 8cd1c60f7c review comments 2014-05-21 16:57:29 +00:00
Martin Kobetic 0eda6c9f15 add tx.Size() and ensure tx.Copy() copies exactly that many bytes 2014-05-21 15:43:11 +00:00
Martin Kobetic 519d65228e move Copy and CopyFile from DB to Tx 2014-05-21 15:08:37 +00:00
Ben Johnson 644a949855 README 2014-05-19 16:16:36 -06:00
Ben Johnson a0963d8f22 Added new projects. 2014-05-19 15:33:52 -06:00
Ben Johnson 12b36fe70c Fix freelist allocate(). 2014-05-19 14:11:32 -06:00
Ben Johnson 782ead0dbf Fix freelist allocation direction.
This commit fixes the freelist so that it frees from the beginning of the data file
instead of the end. It also adds a fast path for pages which can be allocated from
the first free pages and it includes read transaction stats.
2014-05-19 12:08:33 -06:00
Ben Johnson cc6302194b Merge pull request #166 from benbjohnson/fill-percent
Add option to adjust fill percentage.
2014-05-15 14:25:29 -06:00
Ben Johnson 6840e4f3dc Change verbiage, fix node test. 2014-05-15 14:21:17 -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 7b96ede8b6 Merge pull request #165 from benbjohnson/strict-mode
Add strict mode.
2014-05-15 07:59:37 -06:00
Ben Johnson 1f5fb0208b Add strict mode. 2014-05-14 18:08:55 -06:00
Ben Johnson a6d6d964b6 Merge pull request #162 from Shopify/nested_stats2
Recursive/aggregate bucket stats
2014-05-14 12:20:46 -06:00
Ben Johnson e728eb90da Minor stats fixes. 2014-05-14 12:06:31 -06:00
Martin Kobetic 6eaeb31424 address review comments 2014-05-13 17:28:17 +00:00
Ben Johnson 417b0b7bf6 Merge pull request #161 from benbjohnson/work
Add -work flag to 'bolt bench'.
2014-05-12 15:36:10 -06:00
Ben Johnson b5ae095a87 Add -work flag to 'bolt bench'.
This commit adds a 'work' flag to the bolt bench utility so that databases
generated by the bench CLI can be saved for analysis.
2014-05-12 15:34:07 -06:00
Martin Kobetic 51568b52df undo page.go changes 2014-05-12 20:47:03 +00:00
Martin Kobetic 4dbd354a8d add inline stats to cmd 2014-05-12 20:46:01 +00:00
Martin Kobetic 0716cdaec8 tweaks 2014-05-12 19:33:53 +00:00
Martin Kobetic 0dbfa3f08a merge inline branch into leaf branch 2014-05-12 18:22:45 +00:00
Martin Kobetic deffc06a05 fix inline bucket stats 2014-05-12 17:29:16 +00:00
Martin Kobetic c4ad027df7 aggregate bucket stats recursively and add stats to cmd 2014-05-09 20:50:58 +00:00
Martin Kobetic b9899d09ab first part 2014-05-09 20:50:55 +00:00
Ben Johnson 4b56f820bc Merge pull request #160 from benbjohnson/fix-deletion
Fix deletion & dereferencing.
2014-05-09 10:02:13 -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
Ben Johnson c595561faa Fix node unit tests. 2014-05-09 07:55:01 -06:00
Ben Johnson 5f13a416ce Merge pull request #159 from Shopify/pgid_overflow_checks
add asserts for detecting pgid high watermark overflow
2014-05-09 07:45:19 -06:00
Martin Kobetic 3ffcee742c remove stray file 2014-05-09 13:38:11 +00:00
Martin Kobetic d279ea44ce add asserts for detecting pgid high watermark overflow 2014-05-09 13:35:00 +00:00
Ben Johnson 8da0a92637 Merge pull request #158 from benbjohnson/bolt-info
Add 'bolt info'.
2014-05-08 08:44:41 -06:00
Ben Johnson 50e04a29ae Add 'bolt info'. 2014-05-08 08:43:18 -06:00
Ben Johnson 3d2e092a5d Merge pull request #154 from benbjohnson/inline-buckets
(wip) Add inline bucket support.
2014-05-07 12:09:36 -06:00
Ben Johnson d52d142275 Minor fixes. 2014-05-07 12:06:22 -06:00
Ben Johnson e99a24eb44 Improve bucket code documentation. 2014-05-07 11:23:30 -06: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 6133ecb878 Merge pull request #153 from benbjohnson/consolidate
Consolidate code for clarity.
2014-05-05 07:58:53 -06:00
Ben Johnson c3903d38a1 Consolidate code for clarity.
This commit consolidates some of the smaller files into some of the larger files.
The smaller files cluttered the file tree and made it harder to see the logical
groupings of structs.
2014-05-05 07:56:54 -06:00
Ben Johnson 383ddb246a Merge pull request #152 from benbjohnson/remove-bolt-set
Remove 'bolt set'.
2014-05-05 07:50:00 -06:00
Ben Johnson c22d2e03bc Remove 'bolt set'.
This commit removes the 'set' command in the Bolt CLI. It proved to not be very useful
so there's no point in keeping the extra code around.
2014-05-05 07:48:45 -06:00