Commit Graph

444 Commits (defbfd35afe342d7fa821ab3cfc53232c31e8d0e)

Author SHA1 Message Date
Steven Normore 6957c9d534 initial bench and generate command structure 2014-04-18 21:44:27 -05:00
Martin Kobetic 1bead4401c all tests pass 2014-04-18 00:14:56 +00:00
Martin Kobetic 9a3d0db1b2 trying to fix large seek 2014-04-17 22:01:16 +00:00
Martin Kobetic 194a0967b4 hide the cursor stack details behind function calls (pop/push/current) 2014-04-17 21:25:03 +00:00
Martin Kobetic 846cb9db03 tests pass 2014-04-17 14:02:31 +00:00
Ben Johnson bd8c09e895 Merge branch 'c_cursor' of github.com:Shopify/bolt into c_cursor
Conflicts:
	c/cursor_test.go
2014-04-17 08:26:48 -04:00
Ben Johnson a233966d0c Clean up 2014-04-17 08:25:26 -04:00
Ben Johnson c0ae4881ab Add Cursor.Next() to C cursor. 2014-04-16 15:17:35 -04:00
Steven Normore fe1f861f74 adds cursor iterate test 2014-04-16 15:38:23 +00:00
Ben Johnson a8cb83c008 Fix pointer arithematic. 2014-04-16 11:30:03 -04:00
Steven Normore 32937280c3 wip 2014-04-16 15:00:26 +00:00
Ben Johnson 6903c7447b Merge pull request #131 from benbjohnson/cursor-bucket
Add Cursor.Bucket() function.
2014-04-16 09:40:30 -04:00
Ben Johnson 63a8cddd2b Add Cursor.Bucket() function.
This commit adds an accessor to the Cursor type to retrieve the Bucket that
it was created from.
2014-04-16 09:38:53 -04:00
Steven Normore b178373351 build c/cursor and running tests 2014-04-16 13:29:52 +00:00
Martin Kobetic 4e01c9fd81 fix up the C bits to compile 2014-04-16 13:27:48 +00:00
Martin Kobetic 3ae69d73fb cleanup 2014-04-16 13:27:48 +00:00
Martin Kobetic 8a24e16dfd minor cleanup 2014-04-16 13:27:48 +00:00
Martin Kobetic fd4263d944 first draft 2014-04-16 13:27:48 +00:00
Ben Johnson 184f39b4dc Merge pull request #130 from benbjohnson/create-bucket-api
Return bucket from CreateBucket() functions.
2014-04-16 09:25:57 -04:00
Ben Johnson 2505b9a7dc Return bucket from CreateBucket() functions.
This commit changes the API for:

    Tx.CreateBucket()
    Tx.CreateBucketIfNotExists()
    Bucket.CreateBucket()
    Bucket.CreateBucketIfNotExists()

These functions now return the *Bucket and error instead of just the error.
2014-04-15 23:45:06 -04:00
Ben Johnson 02cd971daa Fix race detector CI. 2014-04-11 15:15:56 -06:00
Ben Johnson 2c8020ec8e Merge pull request #127 from benbjohnson/nested-keys
Add nested buckets.
2014-04-11 15:11:55 -06:00
Ben Johnson 10fed5f74d Upgrade import/export to use nested buckets. 2014-04-11 14:59:46 -06:00
Ben Johnson 714436100a Merge branch 'master' into nested-keys
Conflicts:
	db_test.go
	tx_test.go
2014-04-11 14:31:34 -06:00
Ben Johnson d8ec4f9297 Merge pull request #128 from benbjohnson/import-export
Add import/export to CLI.
2014-04-11 14:18:06 -06:00
Ben Johnson e6b5fdc30e Add import/export to CLI.
This commit adds two new commands:

    bolt import --input INPUT PATH
    bolt export PATH

This exports the database in a simple, nested, key/value JSON document.
Each node in the document has a "key", a "value", and an optional "type".
The key and value fields are both base64 encoded.
2014-04-11 14:05:58 -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 e9c8f14d88 Merge pull request #122 from mkobetic/benchmark_tweaks
Make all benchmarks constant size and add multiple sizes
2014-04-10 13:58:21 -06:00
Ben Johnson d73cf1101b Merge pull request #123 from Shopify/commit_in_binary
Embed branch and SHA in binary during build
2014-04-09 06:39:23 -06:00
Steven Normore 38b69be680 add ldflags on build with main.commit and main.branch to Makefile 2014-04-09 11:51:43 +00:00
Steven Normore ace156f52c add bin to gitignore 2014-04-09 11:50:53 +00:00
Martin Kobetic 86cc692872 make all benchmarks constant size and add multiple sizes 2014-04-08 20:53:54 +00:00
Ben Johnson ac2d4f0336 Merge branch 'master' of https://github.com/boltdb/bolt 2014-04-08 14:04:21 -06:00
Ben Johnson fef1aad638 Merge pull request #121 from snormore/makefile_env
Add get/build targets to Makefile
2014-04-08 12:13:59 -06:00
Steven Normore 0781aa9637 add get/build targets to Makefile 2014-04-08 18:03:20 +00:00
Ben Johnson e51eb4e243 Merge pull request #120 from snormore/readme_typo
Fix typo in README
2014-04-08 07:23:09 -06:00
Steven Normore 4d442e03d5 fix typo in README 2014-04-08 07:55:44 -04:00
Ben Johnson feb84e39be Update cursor benchmark. 2014-04-04 13:08:40 -06:00
Ben Johnson 3f7dbffa2e Merge pull request #119 from benbjohnson/tx-rename
Rename internal local Tx variables.
2014-04-04 12:04:53 -06:00
Ben Johnson 12204df0b5 Rename internal local Tx variables.
This commit changes the local Tx variables from "t" to "tx". This is partly
for consistency with external documentation but also because it just
annoys me for some reason.
2014-04-04 12:03:04 -06:00
Ben Johnson af1551e8dd Merge pull request #118 from benbjohnson/commit-hook
Add Tx.OnCommit() handler.
2014-04-04 11:21:33 -06:00
Ben Johnson 394e42e3eb Add Tx.OnCommit() handler.
This commit adds the ability to execute a function after a transaction has
successfully committed.
2014-04-04 07:59:24 -06:00
Ben Johnson d667ae0fe1 README
Add 'Scuttlebutt' to list of projects that use Bolt.
2014-04-03 09:31:34 -06:00
Ben Johnson 71fa5d8610 Merge pull request #113 from benbjohnson/meta-checksum
Add meta page checksums.
2014-04-02 17:02:41 -06:00
Ben Johnson ca83d17125 Add meta page checksums.
This commit adds checksums to the meta pages on every write. When the
database loads, it verifies the checksums on the meta pages and returns
an error if either one is corrupt.

In the future, it should fallback to the previous meta page but for right
now it just hard fails. This is at least preferable to opening the database
and getting a random error or further corruption.

Fixes #25.
2014-04-02 16:56:16 -06:00
Ben Johnson 20a1479c4c Merge pull request #112 from benbjohnson/perf-stats
Add performance counters.
2014-04-02 16:03:16 -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 c5823a20bd Merge pull request #111 from benbjohnson/flock
Add advisory file locking.
2014-04-02 14:09:28 -06:00
Ben Johnson 1eacfa9489 Add advisory file locking.
This commit adds advisory locking via flock() to the database file. This ensures that two separate
processes cannot both open the same data file which would cause corruption.

Fixes #110.
2014-04-02 14:05:24 -06:00
Ben Johnson 1c3ebaebae Merge pull request #109 from benbjohnson/consolidate-file-descriptors
Consolidate file and metafile descriptors.
2014-04-02 13:58:03 -06:00