Commit Graph

306 Commits (b9899d09ab6c032b54fe4a09e9389dff28d8a7f8)

Author SHA1 Message Date
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
Ben Johnson f860b35c4e Merge pull request #151 from benbjohnson/remove-c
Remove the c package
2014-05-05 07:44:54 -06:00
Ben Johnson 376ce6858a Remove the c package.
The CGO binding from an external package did not work as well as hoped. The C code
has been moved to the project which uses it.
2014-05-05 07:43:10 -06:00
Ben Johnson 84570ee67e Merge pull request #150 from tv42/typo-seek
Fix Cursor.Seek to say caller should test key==nil not value==nil, explain what value==nil really means these days
2014-05-04 21:46:50 -06:00
Tommi Virtanen eaa47b6468 Document cursors seeing nested buckets 2014-05-04 18:32:59 -07:00
Tommi Virtanen 458400eb82 Cursor.Seek validity is indicated by key being nil 2014-05-04 18:30:30 -07:00
Ben Johnson 60624c4c19 Merge pull request #148 from benbjohnson/split-spill
Refactor split/spill
2014-05-03 16:21:45 -06:00
Ben Johnson 25fea2fd9f Refactor split/spill. 2014-05-03 16:21:28 -06:00
Ben Johnson a18135e055 Merge pull request #147 from benbjohnson/stats
Add streaming stats to bolt bench.
2014-05-01 15:13:05 -06:00
Ben Johnson d48c4a20be Add streaming stats to bolt bench.
This commit adds -stats-interval to the 'bolt bench' utility. By setting this argument
to an interval greater than 0s, the benchmark tool will output stats as streaming JSON.
This data can, in turn, be graphed to understand performance over time.
2014-04-30 12:27:54 -06:00
Ben Johnson 09914968ba Merge pull request #146 from benbjohnson/bench-batch
Add --batch-size to 'bolt bench'
2014-04-30 12:01:56 -06:00
Ben Johnson 2bfb1b3db5 Merge branch 'bench-batch' into moar_bench
Conflicts:
	cmd/bolt/bench.go
2014-04-30 12:00:39 -06:00
Ben Johnson 6854ca415f Remove bolt bench -stat. 2014-04-30 11:55:08 -06:00
Ben Johnson cabb44e01f Add --batch-size to 'bolt bench'.
This commit adds a --batch-size CLI argument to the 'bolt bench' tool.
This argument will insert into Bolt in smaller batches which is a more
typical use case.

/cc @snormore
2014-04-29 12:36:42 -06:00
Ben Johnson b6135c2c95 Merge pull request #145 from benbjohnson/tx-cursor
Add Tx.Cursor().
2014-04-29 09:56:10 -06:00
Ben Johnson 0dfb71267c Merge pull request #144 from benbjohnson/copy-key
Copy key on Put() and CreateBucket().
2014-04-29 09:34:38 -06:00
Ben Johnson e3957cd0de Add Tx.Cursor().
This commit adds the Cursor() function to Tx. This allows iteration on the root bucket
in a similar way to iteration on other buckets.

Fixes #141.
2014-04-29 07:25:14 -06:00
Ben Johnson e3ed193646 Copy key on Put() and CreateBucket().
This commit makes a copy of the key byte slice before inserting into the database.
This fixes the issue where users may reuse byte buffers which can corrupt the database.

Fixes #143.
2014-04-29 06:54:01 -06:00
Ben Johnson 46d83eb140 Merge pull request #142 from extemporalgenome/Printf-byteslice
Printf's %s and %q already do the right thing with []byte
2014-04-25 16:13:24 -06:00
Kevin Gillette 1879d88c43 Printf's %s and %q do the right thing with []byte; removed string conversion. 2014-04-25 15:38:42 -06:00
Martin Kobetic d9e7e0257b add -stats and -batch-size support to bench cmd 2014-04-24 16:30:39 -04:00
Ben Johnson 5524825919 Merge pull request #139 from Shopify/moar_c_cursor
More C cursor improvements
2014-04-23 12:05:53 -06:00
Martin Kobetic 5612ea7694 fix empty byte vs nil test problems 2014-04-23 16:54:41 +00:00
Martin Kobetic 181eb96dc7 add test for empty bucket handling 2014-04-23 15:36:41 +00:00
Martin Kobetic ded351df92 another test case and minor cleanup 2014-04-23 14:25:25 +00:00
Martin Kobetic 9d095430b4 fix deep search 2014-04-23 14:00:53 +00:00
Martin Kobetic 9cc516f8e2 add deep tree tests, some cleanup 2014-04-22 21:20:49 +00:00
Ben Johnson 775e2d6cca Merge pull request #137 from benbjohnson/bucket-stats
Change to BucketStats and Bucket.Stats().
2014-04-22 15:17:09 -06:00
Ben Johnson 0567eea5f5 Change to BucketStats and Bucket.Stats().
This commit pluralizes the BucketStat type to be BucketStats. This makes it
more consistent with the other Stats() calls. This commit also changes the
return type to a struct instead of a pointer.

Finally, this commit adds documentation to the fields of BucketStats.
2014-04-22 15:11:49 -06:00
Ben Johnson 7587e61802 Merge pull request #136 from Shopify/stats_space
Add space stats to the bucket stats
2014-04-22 15:03:07 -06:00
Martin Kobetic a02ddf402b rename MaxDepth to Depth 2014-04-22 20:32:09 +00:00
Martin Kobetic 03cb096230 skip space assertions for incompatible page size 2014-04-22 20:29:37 +00:00