Commit Graph

323 Commits (a0963d8f2259b9c7f291887979d9dac2441b4ca6)

Author SHA1 Message Date
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
Ben Johnson fcce87626c Merge pull request #98 from benbjohnson/fsck
Add DB.Check().
2014-03-29 14:28:53 -06:00
Ben Johnson 7f2de9f17a Add DB.Check(). 2014-03-29 14:22:32 -06:00
Ben Johnson 7dafeaa896 Merge pull request #97 from benbjohnson/cli
Refactor bolt commands into individual files.
2014-03-27 22:39:29 -06:00
Ben Johnson fea388b03d Refactor bolt commands into individual files. 2014-03-27 22:36:05 -06:00
Ben Johnson b10aa18c88 Merge pull request #92 from benbjohnson/safe-copy
Fix DB.Copy() meta lock and partial write checks.
2014-03-26 11:00:25 -06:00
Ben Johnson f45f1ed8d4 Fix DB.Copy() meta lock and partial write checks. 2014-03-26 10:11:31 -06:00
Ben Johnson 2327fd97d7 Merge pull request #91 from benbjohnson/quickcheck
Fix quickcheck test for duplicate keys.
2014-03-25 08:21:58 -06:00
Ben Johnson 03ba0d1d4d Fix quickcheck test for duplicate keys. 2014-03-25 08:20:21 -06:00
Ben Johnson 381d08dffd Merge pull request #90 from benbjohnson/fix-bucket-reclamation
Fix bucket reclamation
2014-03-25 07:31:49 -06:00
Ben Johnson d8e4cffa12 Fix bucket reclamation.
The bucket page is allocated separately from the rest of the pages but the old bucket pages were
not being added to the freelist. This change fixes that and adds a simple check for database
consistency. More advanced consistency checks can be added in the future.

Fixes #82.
2014-03-25 07:25:00 -06:00
Ben Johnson 32da80f953 README
Add a list of "Other Projects Using Bolt".
2014-03-24 13:41:08 -06:00