aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* Merge pull request #119 from benbjohnson/tx-rename•••Rename internal local Tx variables.Ben Johnson2014-04-044-152/+152
|\
| * 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. Ben Johnson2014-04-044-152/+152
|/
* Merge pull request #118 from benbjohnson/commit-hook•••Add Tx.OnCommit() handler.Ben Johnson2014-04-042-12/+58
|\
| * Add Tx.OnCommit() handler.•••This commit adds the ability to execute a function after a transaction has successfully committed. Ben Johnson2014-04-042-12/+58
|/
* README•••Add 'Scuttlebutt' to list of projects that use Bolt.Ben Johnson2014-04-031-0/+1
* Merge pull request #113 from benbjohnson/meta-checksum•••Add meta page checksums.Ben Johnson2014-04-023-10/+55
|\
| * 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. Ben Johnson2014-04-023-10/+55
|/
* Merge pull request #112 from benbjohnson/perf-stats•••Add performance counters.Ben Johnson2014-04-028-100/+160
|\
| * 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. Ben Johnson2014-04-028-100/+160
|/
* Merge pull request #111 from benbjohnson/flock•••Add advisory file locking.Ben Johnson2014-04-021-0/+12
|\
| * 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. Ben Johnson2014-04-021-0/+12
|/
* Merge pull request #109 from benbjohnson/consolidate-file-descriptors•••Consolidate file and metafile descriptors.Ben Johnson2014-04-022-18/+10
|\
| * 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. Ben Johnson2014-04-022-18/+10
|/
* README•••Remove the 'Internals' section since it is half-assed right now.Ben Johnson2014-04-021-30/+1
* Merge branch 'master' of https://github.com/boltdb/boltBen Johnson2014-04-021-0/+1
|\
| * Merge pull request #107 from DocSavage/master•••Add DVID to projects using BoltBen Johnson2014-03-311-0/+1
| |\
| | * Add DVID to projects using Bolt•••DVID added Bolt as an optional storage engine.Bill Katz2014-03-311-0/+1
| |/
* / 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. Ben Johnson2014-04-021-4/+12
|/
* Merge pull request #104 from benbjohnson/remove-db-open•••Remove DB.Open() and only allow bolt.Open().Ben Johnson2014-03-314-124/+79
|\
| * 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. Ben Johnson2014-03-314-124/+79
|/
* Merge pull request #102 from benbjohnson/fix-freelist•••Write freelist after each commit.Ben Johnson2014-03-316-10/+51
|\
| * 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". Ben Johnson2014-03-316-10/+51
|/
* Merge pull request #98 from benbjohnson/fsck•••Add DB.Check().Ben Johnson2014-03-297-1/+140
|\
| * Add DB.Check().Ben Johnson2014-03-297-1/+140
|/
* Merge pull request #97 from benbjohnson/cli•••Refactor bolt commands into individual files.Ben Johnson2014-03-2711-316/+395
|\
| * Refactor bolt commands into individual files.Ben Johnson2014-03-2711-316/+395
|/
* Merge pull request #92 from benbjohnson/safe-copy•••Fix DB.Copy() meta lock and partial write checks.Ben Johnson2014-03-261-1/+12
|\
| * Fix DB.Copy() meta lock and partial write checks.Ben Johnson2014-03-261-1/+12
|/
* Merge pull request #91 from benbjohnson/quickcheck•••Fix quickcheck test for duplicate keys.Ben Johnson2014-03-251-4/+15
|\
| * Fix quickcheck test for duplicate keys.Ben Johnson2014-03-251-4/+15
|/
* Merge pull request #90 from benbjohnson/fix-bucket-reclamation•••Fix bucket reclamationBen Johnson2014-03-253-9/+52
|\
| * 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. Ben Johnson2014-03-253-9/+52
* | README•••Add a list of "Other Projects Using Bolt".Ben Johnson2014-03-241-0/+7
|/
* Merge pull request #88 from benbjohnson/tx-rename•••Make DB/Tx API more consistent.Ben Johnson2014-03-248-149/+157
|\
| * Make DB/Tx API more consistent.•••I consolidated the DB.Tx() and DB.RWTx() calls into a single DB.Begin(writable bool) call. This is more consistent with the database/sql library. I also changed the DB.Do() and DB.With() call to DB.Update() and DB.View(), respectively. This is more intuitive and more inline with other database verbiage. Ben Johnson2014-03-248-149/+157
|/
* Merge pull request #87 from benbjohnson/errors•••Error refactoringBen Johnson2014-03-248-106/+94
|\
| * Error refactoring.•••Fixed up a few error issues and refactored out the Error type. Ben Johnson2014-03-248-106/+94
|/
* Merge pull request #86 from benbjohnson/mock•••Re-add tests for write failuresBen Johnson2014-03-243-3/+78
|\
| * Re-add tests for write failures•••Commit d2173f5f0ecbf4ed93c768e975435b04df3186ec removed the complete os & syscall mocking layer as overly complex. This commit adds back the simplest possible thing: hooks to control the database file writes. Missing tests: TestDBOpenMetaFileError, TestDBMmapStatError. These are harder to test without more extensive mocking. Conflicts: db_test.go Tommi Virtanen2014-03-243-3/+78
|/
* Resolve remaining errcheck warnings.Ben Johnson2014-03-242-11/+29
* Check errors from file close in DB.CopyFile•••Write errors are often delayed and reported only by the close. The extra close in defer on success is harmless, (*os.File).Close protects itself against multiple closes, and this way it's immediately obvious there is no code path that would leak open files. Tommi Virtanen2014-03-231-1/+5
* Check spill error in CommitTommi Virtanen2014-03-231-1/+3
* Check meta page write error in CommitTommi Virtanen2014-03-231-1/+3
* Merge pull request #81 from benbjohnson/tx-closed•••Add ErrTxClosed error.Ben Johnson2014-03-235-17/+89
|\
| * Add ErrTxClosed error.•••Commit/Rollback and mutable calls on Tx and Bucket now return ErrTxClosed if the transaction has already been committed or rolled back. Non-mutable calls have added an assertion to check if the transaction is closed which will cause a panic. I don't want to introduce an error return for accessor methods that are being used improperly so I think the panic is appropriate. Ben Johnson2014-03-235-17/+89
|/
* Merge pull request #78 from benbjohnson/tx-managed•••Mark Do()/With() transaction as managed.Ben Johnson2014-03-233-5/+43
|\
| * Mark Do()/With() transaction as managed.•••Transaction created from Do() and With() are now considered "managed". Managed transactions cannot be manually committed or rolled back since the Do() and With() functions provide that functionally automatically. Previously, a Tx could be manually committed and then any changes after that would be lost. Ben Johnson2014-03-233-5/+43
|/
* Merge pull request #76 from benbjohnson/fsync•••fdatasyncBen Johnson2014-03-233-0/+22
|\
| * Consolidate syscall files.Ben Johnson2014-03-232-1/+0
| * Merge branch 'fdatasync' of https://github.com/tv42/bolt into fsyncBen Johnson2014-03-233-0/+23
|/|