Commit Graph

234 Commits (71e91e24b064c1c8e33d92b7f324b6cd57d07f87)

Author SHA1 Message Date
Steven Normore 71e91e24b0 move bench package to bench/cmd/bolt/bench 2014-04-18 21:44:48 -05:00
Steven Normore 105fece47a add bench sub-package 2014-04-18 21:44:47 -05:00
Steven Normore 97bd718b02 add benchmarks using Benchmark framework 2014-04-18 21:44:36 -05:00
Steven Normore 29b7d0a9a4 fix basic parallel benchmark 2014-04-18 21:44:36 -05:00
Steven Normore fdde1bcb06 moar bench package 2014-04-18 21:44:27 -05:00
Steven Normore 6957c9d534 initial bench and generate command structure 2014-04-18 21:44:27 -05: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
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
Ben Johnson 4ef19124d1 Consolidate file and metafile descriptors.
Previously, a two file descriptors were used for the database: file & metafile. The "file" file
descriptor was used for async writes while the "metafile" file descriptor was used with O_SYNC
writes. This commit changes that so that there's only one file descriptor and it uses fdatasync()
to synchronize writes.
2014-04-02 13:50:03 -06:00
Ben Johnson 76acd60ff3 README
Remove the 'Internals' section since it is half-assed right now.
2014-04-02 10:28:17 -06:00
Ben Johnson 8c5646982c Merge branch 'master' of https://github.com/boltdb/bolt 2014-04-02 07:46:47 -06:00
Ben Johnson 43eda94ec1 Remove count and overflow columns for free pages on 'bolt pages'.
The count and overflow columns are meaningless for freed pages since
there could be random overflow data in there. This commit removes those
columns for free pages.
2014-04-02 07:44:54 -06:00
Ben Johnson 4364c2f7f6 Merge pull request #107 from DocSavage/master
Add DVID to projects using Bolt
2014-03-31 13:31:26 -06:00
Bill Katz 6dd15bbf70 Add DVID to projects using Bolt
DVID added Bolt as an optional storage engine.
2014-03-31 15:25:05 -04:00
Ben Johnson 4870e5fe8c Merge pull request #104 from benbjohnson/remove-db-open
Remove DB.Open() and only allow bolt.Open().
2014-03-31 12:03:53 -06:00
Ben Johnson 8dafb2312b Remove DB.Open() and only allow bolt.Open().
Per @tv42's suggestion, this commit removes the ability to reopen an
instance of DB. All open calls go through bolt.Open().

Fixes #103.
2014-03-31 11:22:27 -06:00
Ben Johnson b5c1715a36 Merge pull request #102 from benbjohnson/fix-freelist
Write freelist after each commit.
2014-03-31 11:08:27 -06:00
Ben Johnson 440b89418f Write freelist after each commit.
Well, this is embarassing. Somehow the freelist was never getting written after each commit.
This commit fixes that and fixes a small reporting issue with "bolt pages".
2014-03-31 08:52:19 -06:00