Commit Graph

558 Commits (2c04100eb9793f2b8541d243494e2909d2112325)

Author SHA1 Message Date
Ben Johnson e3345690a3 Add single-bucket/single-tx caveat.
This commit adds a caveat to the README to notify users that bulk loading
random writes into a single new bucket can be problematic. This issue was
reported by @freepk.

Fixes #244.
2014-08-24 18:02:50 -06:00
Ben Johnson 43a1303c15 Merge pull request #243 from benbjohnson/deref-split-root
Fix split root dereference.
2014-08-21 22:52:58 -06:00
Ben Johnson f088575049 Fix split root dereference.
This commit fixes a bug that occurs when a root node is split just after a re-mmap occurs.
Previously, this would cause a panic because the new root node would still reference
keys from the old mmap.
2014-08-21 22:49:58 -06:00
Ben Johnson 28e80eedb5 Merge pull request #242 from clutchski/patch-1
fix spelling mistake in README
2014-08-20 15:17:14 -06:00
Matt Perpick f74816f99b fix spelling mistake in README 2014-08-20 14:18:11 -04:00
Ben Johnson e40a4f06da Merge pull request #241 from AndreasBriese/master
added ipLocator to projects using Bolt
2014-08-18 10:39:25 -06:00
Andreas Briese 2dc3be256d added ipLocator to projects using Bolt 2014-08-18 18:06:45 +02:00
Ben Johnson 2e572902b7 Merge pull request #239 from benbjohnson/example
Add cursor examples.
2014-08-16 16:06:28 -06:00
Ben Johnson 1dc60ba7a1 Add cursor examples. 2014-08-16 15:20:31 -06:00
Ben Johnson 117d8715ac Merge pull request #236 from siddontang/master
Add LedisDB to project list
2014-08-03 19:47:43 -06:00
siddontang 83ed27a598 Add LedisDB to project list 2014-08-04 09:23:34 +08:00
Ben Johnson 8fb50d5ee5 Merge pull request #235 from benbjohnson/caveats
Caveats & Limitations
2014-07-28 09:01:21 -06:00
Ben Johnson c216d6477c README 2014-07-28 08:59:45 -06:00
Ben Johnson 152c71a51b README 2014-07-27 14:32:58 -06:00
Ben Johnson defbfd35af Merge pull request #234 from benbjohnson/testing
Testing cleanup
2014-07-26 19:47:10 -06:00
Ben Johnson bbf2da4c90 Fix go vet. 2014-07-26 19:41:05 -06:00
Ben Johnson 44e6192d2b Remove testify. 2014-07-26 17:17:03 -06:00
Ben Johnson ba6badc57f Move tests to a test package. 2014-07-26 15:11:47 -06:00
Ben Johnson ca2339d7cb Remove wrapping test closures. 2014-07-26 14:44:04 -06:00
Ben Johnson 06222e06de Remove withTempPath() helper. 2014-07-25 23:14:17 -06:00
Ben Johnson f7a40c7fb5 Merge pull request #230 from benbjohnson/doc
Documentation!
2014-07-25 22:12:17 -06:00
Ben Johnson ddb6b2f0ed README 2014-07-25 11:20:39 -06:00
Ben Johnson d021755f07 Merge pull request #229 from benbjohnson/bucket-fill-percent
Change fill percent to be per-bucket.
2014-07-24 11:25:57 -06:00
Ben Johnson cb17016062 Add FillPercent documentation. 2014-07-24 11:25:25 -06:00
Ben Johnson c3400efefd Change fill percent to be per-bucket.
This commit moves the DB.FillPercent field to Bucket.FillPercent. This
allows the fill percentage to be specified per-bucket, per-tx. This
value is not persisted and should be set whenever using it.
2014-07-24 10:36:09 -06:00
Ben Johnson 5fb781318f Merge pull request #228 from benbjohnson/fix-large-append
Fix root split on very large append.
2014-07-23 15:44:17 -06:00
Ben Johnson aa66291b9b Fix root split on very large append.
This commit fixes a bug where a root split on a very large insert would
cause an overflow of the root node. The problem was that the new root
was not split when it was created so a new root with more than 64K child
nodes would overflow the page.count (uint16).
2014-07-23 15:08:59 -06:00
Ben Johnson 40adaef94e Merge pull request #227 from benbjohnson/fix-double-spill
Fix double spill
2014-07-23 14:35:52 -06:00
Ben Johnson fd3c1d44b0 Fix double spill.
This fixes an issue where split nodes can be double spilled. This is typically
not noticable but it can have large effects when bulk inserting as double
spilled nodes will get added to the freelist which will grow quickly.
2014-07-23 09:04:36 -06:00
Ben Johnson 5c993fdecf Merge pull request #226 from benbjohnson/optimize-large-append
Optimize large append.
2014-07-22 13:17:51 -06:00
Ben Johnson b0c97d887a Optimize large append.
This commit fixes an issue where large nodes would take up most of
the insert time because the entire node size would be calculated to
check if it could fit in a page or not. This changes the behavior
so that a node's size is only calculated up to the size it needs to
check and then returns.
2014-07-22 13:02:38 -06:00
Ben Johnson c0308f777f Merge pull request #221 from cmars/win32
Fixed cast for 32-bit windows.
2014-07-16 15:02:46 -06:00
Ben Johnson 89f9735610 Merge pull request #225 from benbjohnson/no-sync
Add DB.NoSync option for bulk loading.
2014-07-15 07:45:39 -06:00
Ben Johnson 048d3f19b2 Add DB.NoSync option for bulk loading.
This commit adds the DB.NoSync flag to skip fsync() calls on each commit. This should only
be used for bulk loading as it can corrupt your database in the event of a system failure.

Initial tests show it can provide a 2x speed up for sequential inserts.
2014-07-15 07:37:46 -06:00
Ben Johnson 1395a04d97 Merge pull request #224 from benbjohnson/rebalance-time
Only update rebalance time if nodes are rebalanced
2014-07-15 07:29:10 -06:00
Ben Johnson 6e977e2f19 Only update rebalance time if nodes are rebalanced.
This commit changes TxStats.RebalanceTime to only update if there are nodes that have been
rebalanced. Previously, the RebalanceTime would include a small amount of time to check if
there were nodes to rebalance but this is confusing to users and not terribly helpful.
2014-07-15 07:26:02 -06:00
Casey Marshall 1409473547 Fixed cast for 32-bit windows. 2014-07-13 03:14:27 -05:00
Ben Johnson f873035fc9 Remove unreachable test code. 2014-07-11 10:07:24 -06:00
Ben Johnson ba4adce39b Merge pull request #220 from benbjohnson/handle-panic
Recover from panics appropriately.
2014-07-11 10:04:28 -06:00
Ben Johnson ac4838472d Recover from panics appropriately.
This commit adds a defer handler to ensure that transactions are always closed out - even
in the event of a panic within user code. It's recommended that applications always fail
in the event of a panic but some packages such as net/http will automatically recover
which is a problem (IHMO).
2014-07-11 09:54:10 -06:00
Ben Johnson fe9a0781e2 Merge pull request #219 from benbjohnson/freelist-overflow
Allow freelist overflow.
2014-07-10 15:06:19 -06:00
Ben Johnson 88c8709cb1 Remove ErrFreelistOverflow error. 2014-07-10 15:01:50 -06:00
Ben Johnson ce0754b0d3 Allow freelist overflow.
This commit is a backwards compatible change that allows the freelist to overflow the
page.count (uint16). It works by checking if the overflow will occur and marking the
page.count as 0xFFFF and setting the actual count to the first element of the freelist.

This approach was used because it's backwards compatible and it doesn't make sense to
change the data type of all page counts when only the freelist's page can overflow.

Fixes #192.
2014-07-10 14:50:21 -06:00
Ben Johnson 4d4ae58c6d Merge pull request #215 from benbjohnson/free-cache
Add freelist cache.
2014-07-10 14:20:40 -06:00
Ben Johnson 333c586ed0 Clean up freelist reindex. 2014-07-10 14:16:26 -06:00
Ben Johnson cc8004c980 Merge branch 'master' of https://github.com/boltdb/bolt into free-cache 2014-07-10 14:00:32 -06:00
Ben Johnson 90fe8d9c12 Fix test for path errors. 2014-07-10 09:41:40 -06:00
Ben Johnson ca5f582710 Merge pull request #218 from benbjohnson/fix-win
Fix Windows mmap sizing.
2014-07-10 07:35:40 -06:00
Ben Johnson e903703e61 Fix Windows mmap sizing.
This commit fixes an issue on Windows where the database was doubling
when it was re-opened. This occurred because Windows has to truncate the
file to the mmap size and the mmap resizing code was doubling the size
whenever the DB size was at the next threshold. This has been changed so
that the DB size will double only when the DB size is above the next
threshold.
2014-07-10 07:11:01 -06:00
Ben Johnson d9a0f51bee Add 'Intro to BoltDB' link. 2014-07-07 08:39:59 -06:00