821 Commits

Author SHA1 Message Date
Ben Johnson
2b4a0e2894 set slice capacity
This commit sets the capacity on slices returned from
`Bucket.Get()` to match the slice length. Previously
the capacity would be the size of the mmap max size.

This does not cause any backwards compatibility issues,
however, it does allow users to `append()` to the returned
slice since that will cause Go to realloc a new slice on the
heap.

Fixes #544
2016-03-25 10:53:30 -06:00
Ben Johnson
c2610ee091 Merge pull request #542 from boltdb/remove-drone-badge
Remove badge
2016-03-23 11:13:08 -06:00
Ben Johnson
afb77b930b remove badge
Remove the Drone.IO badge while setting up new test infrastructure.
2016-03-23 11:12:00 -06:00
Ben Johnson
5d3cf80147 Merge pull request #540 from erock2112/patch-1
Add note about Go RFC3339Nano sortability to README
2016-03-22 11:34:05 -06:00
Eric Boren
40cff7a0e5 Add note about Go RFC3339Nano sortability to README
RFC3339 is sortable, but RFC3339Nano is not, because it does not use a fixed number of digits after the decimal.
2016-03-22 13:10:49 -04:00
Ben Johnson
08b033d921 Merge pull request #532 from asdine/project-list
Update README.md
2016-03-22 09:03:09 -06:00
Asdine El Hrychy
8192480115 Merge remote-tracking branch 'boltdb/master' into project-list
# Conflicts:
#	README.md
2016-03-22 15:51:53 +01:00
Ben Johnson
c6ba97b89e v1.2.0 v1.2.0 2016-03-21 21:43:21 -06:00
Ben Johnson
47b11621fb Merge pull request #537 from crowdriff/master
Adding "lru" to list of projects using Bolt.
2016-03-21 21:41:17 -06:00
Ben Johnson
6204c540b5 Merge pull request #539 from benbjohnson/rebalance-fix
Fix rebalance bug
2016-03-21 21:40:46 -06:00
Ben Johnson
c0934840fd fix rebalance bug
This commit fixes a rare issue where a page can become accessible
when it has already been freed. This occurs when the first two
child pages of a parent both have deletions and the first page
has 1 remaining children and the second page has 2 remaining
children. During rebalancing the first page pulls an element from
the second page and then the second page pulls the same element
back from the first. The child page was not being freed properly.

I resolved this issue by removing this part of the rebalancing.
I made this choice for two reasons:

1. Moving a single item between pages has negligible benefit. The
   page will eventually be cleaned up when it reaches zero elements.

2. This is an infrequently executed branch of code which increases
   the likelihood of bugs occurring and it makes it more difficult
   to test properly.

Fixes #348
2016-03-21 09:00:48 -06:00
Ben Johnson
7cb1534948 Merge pull request #538 from benbjohnson/strict-mode-fix
Fix strict mode
2016-03-21 09:00:23 -06:00
Ben Johnson
37e96de68d fix strict mode
This commits fixes a timing bug where `DB.StrictMode` can panic
before the goroutine reading the database can finish. If an error
is found in strict mode then it now finishes reading the entire
database before panicking.
2016-03-21 08:59:39 -06:00
Abhinav Ajgaonkar
7db0126c4b Adding "lru" to list of projects using Bolt. 2016-03-21 00:58:27 -04:00
Ben Johnson
0fd4c0547d Merge pull request #528 from boltdb/windows
Move to separate lock file on windows
2016-03-10 12:43:05 -07:00
Ben Johnson
871c8e43d8 Merge pull request #515 from benbjohnson/meta-write-to
Use tx.meta during Tx.WriteTo()
2016-03-10 12:42:47 -07:00
Ben Johnson
522043366c use tx.meta during Tx.WriteTo()
This commit changes `Tx.WriteTo()` to use the transaction's
in-memory meta page instead of copying from the disk. This is
needed because the transaction uses the size from its meta page
but writes the current meta page on disk which may have allocated
additional pages since the transaction started.

Fixes #513
2016-03-10 12:17:43 -07:00
Asdine El Hrychy
514ec57fe7 Update README.md 2016-03-05 00:22:18 +01:00
Ben Johnson
b514920f8f Merge pull request #531 from michelmno/master
new bolt_ppc64.go similar to bolt_ppc64le.go
2016-03-04 11:33:41 -07:00
Michel Normand
fb2396f544 new bolt_ppc64.go similar to bolt_ppc64le.go
version 4 of the patch
2016-03-04 08:20:31 +01:00
Ben Johnson
a5ebf41fd5 Merge pull request #527 from peteheist/master
Add bolt_ppc.go to compile on 32-bit PPC platforms.
2016-03-02 07:08:50 -07:00
Ben Johnson
220b61e988 move to separate lock file on windows 2016-03-01 08:15:25 -07:00
Pete Heist
d062b0e33c Add bolt_ppc.go to compile on 32-bit PPC platforms. 2016-02-29 21:43:51 +01:00
Ben Johnson
9af8da5df3 Merge pull request #525 from MJDSys/appveyor
Add appveyor.yml.
2016-02-28 13:35:43 -07:00
Ben Johnson
ae7352740a Merge pull request #524 from abhigupta912/mbuckets
Add mbuckets to list of projects using Bolt
2016-02-28 13:31:34 -07:00
Matthew Dawson
8a783fcb7e Add appveyor.yml.
Add an initial appveryor.yml to test on AppVeyor's Windows CI.
2016-02-27 23:34:11 -05:00
Abhishek Gupta
620e49540e Add mbuckets to list of projects using Bolt 2016-02-27 14:22:38 +05:30
Ben Johnson
6fa1249006 Merge pull request #520 from bobintornado/project-list
Update README.md
2016-02-24 08:47:52 -07:00
Bob Cao
add6474f61 Update README.md 2016-02-24 17:01:39 +08:00
Ben Johnson
2f846c3551 Merge pull request #508 from hermanschaaf/patch-1
Add Go Report Card to list of projects using Bolt
2016-02-06 08:59:41 -07:00
Herman Schaaf
187ee33aae Add Go Report Card to list of projects using Bolt 2016-02-06 16:33:50 +08:00
Alexander Morozov
e1ffca3629 Use sync.Pool for small pages in db.allocate
Benchmark results:
benchmark                          old ns/op     new ns/op     delta
BenchmarkDBBatchAutomatic-4        2552625       2485200       -2.64%
BenchmarkDBBatchSingle-4           59632698      50757603      -14.88%
BenchmarkDBBatchManual10x100-4     2564789       2452735       -4.37%

benchmark                          old allocs     new allocs     delta
BenchmarkDBBatchAutomatic-4        10199          10202          +0.03%
BenchmarkDBBatchSingle-4           56642          56653          +0.02%
BenchmarkDBBatchManual10x100-4     5986           5995           +0.15%

benchmark                          old bytes     new bytes     delta
BenchmarkDBBatchAutomatic-4        433587        382462        -11.79%
BenchmarkDBBatchSingle-4           32504533      16308931      -49.83%
BenchmarkDBBatchManual10x100-4     1362370       881765        -35.28%

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-28 09:51:51 -08:00
Ben Johnson
ee4a0888a9 Merge pull request #492 from boltdb/revert-491-arm64
Revert "Remove erroneous build constraint from arm64"
2016-01-19 17:55:44 -07:00
Ben Johnson
ad7482f549 Revert "Remove erroneous build constraint from arm64" 2016-01-19 17:40:29 -07:00
Ben Johnson
209a181292 Merge pull request #491 from crawford/arm64
Remove erroneous build constraint from arm64
2016-01-19 16:37:15 -07:00
Alex Crawford
8fe5ed6b41 Remove erroneous build constraint from arm64
This was preventing ARM64 targets from building.
2016-01-19 15:15:53 -08:00
Ben Johnson
6465994716 Merge pull request #487 from darklynx/add_project
added Request Baskets to projects list
2016-01-14 13:11:52 -08:00
Vladimir L
33a45fc8fd added Request Baskets to projects list 2016-01-14 21:54:57 +01:00
Ben Johnson
8f6dd95b53 Merge pull request #486 from tcyrus/tcyrus-patch-1
Update README.md
2016-01-14 11:05:19 -08:00
Timothy Cyrus
109049bcfb Update README.md 2016-01-12 14:41:22 -05:00
Ben Johnson
4030e7fbc1 Merge pull request #484 from etelej/master
Add bucket check to db.View in readme.md
2016-01-11 18:59:16 -08:00
Peter Etelej
769f43bec3 Add bucket check to db.View in readme.md
Add 'Assume bucket exists and has keys' comments on db.View calls
accessing bucket keys in examples of db.View in readme.md code examples.
Fixes #484
2016-01-12 05:28:15 +03:00
Ben Johnson
ed54c4790c Merge pull request #478 from TrevorSStone/master
Add documentation to Readme for mobile support (iOS/Android)
2016-01-11 16:02:03 -07:00
Ben Johnson
02c43da2b0 Merge pull request #481 from gyuho/boltdb_typo
*: fixes minor typos
2016-01-11 15:59:14 -07:00
Ben Johnson
db0771a655 Merge pull request #482 from gyuho/bolt_db_test_fix
*: fix test print format
2016-01-11 15:58:33 -07:00
Ben Johnson
d8b06c0a77 Merge branch 'xiang90-grow' 2016-01-11 15:42:16 -07:00
Ben Johnson
a122e1c02b add AllocSize, minor grow() refactor
This commit moves `overAllocation` to a configurable `DB.AllocSize`
field and performs minor cosmetic clean up.
2016-01-11 15:40:23 -07:00
Ben Johnson
694a82a959 Merge branch 'grow' of https://github.com/xiang90/bolt into xiang90-grow 2016-01-11 14:47:01 -07:00
Gyu-Ho Lee
42ab7c097f *: fix test print format 2016-01-08 00:31:45 -08:00
Gyu-Ho Lee
cf93cb8694 *: fixes minor typos 2016-01-07 23:33:40 -08:00