Ben Johnson
d9a0f51bee
Add 'Intro to BoltDB' link.
2014-07-07 08:39:59 -06:00
Ben Johnson
def455554b
Add freelist cache.
...
This commit adds a cache to the freelist which combines the available free pages and pending free pages in
a single map. This was added to improve performance where freelist.isFree() was consuming 70% of CPU time
for large freelists.
2014-06-30 08:01:41 -06:00
Ben Johnson
e4ad031878
Merge pull request #214 from Shopify/fix_stats_sub
...
Copy the free pages stats from the receiver
2014-06-27 11:40:46 -06:00
Martin Kobetic
8c386e72f3
Copy the free pages stats from the receiver
2014-06-27 17:38:06 +00:00
Ben Johnson
d1a77a9c82
Minor fix.
2014-06-24 11:58:46 -06:00
Ben Johnson
283c556aa8
Merge pull request #213 from Shopify/stats_sub2
...
Drop the *s guard in Stats.Sub()
2014-06-24 11:56:55 -06:00
Martin Kobetic
bae0fbd290
review tweaks
2014-06-24 17:54:40 +00:00
Martin Kobetic
ba79a0a355
drop the *s guard
2014-06-24 17:40:53 +00:00
Ben Johnson
78d08e0438
Merge pull request #212 from Shopify/stats_sub
...
Improve Stats.Sub()
2014-06-24 11:37:16 -06:00
Martin Kobetic
8dd18bd620
review tweaks
2014-06-24 17:19:50 +00:00
Martin Kobetic
32e22b3bb6
add some guards for nil pointers
2014-06-24 15:32:04 +00:00
Martin Kobetic
bbee09da30
copy receiver stats in Stats.Sub()
2014-06-24 15:32:04 +00:00
Ben Johnson
c45c4a1ae6
Merge pull request #210 from benbjohnson/default-options
...
Add DefaultOptions variable.
2014-06-22 14:19:26 -06:00
Ben Johnson
642b104396
Add DefaultOptions variable.
...
This commit adds an explicit DefaultOptions variable for additional documentation.
Open() can still be passed a nil options which will cause options to be change to
the DefaultOptions variable. This change also allows options to be set globally for
an application if more than one database is being opened in a process.
This commit also moves all errors to errors.go so that the godoc groups them together.
2014-06-22 12:44:20 -06:00
Ben Johnson
4f428feecc
Merge pull request #208 from benbjohnson/open-timeout
...
Add Open() options, flock timeout.
2014-06-22 10:10:55 -06:00
Ben Johnson
622c1f1525
Merge pull request #209 from benbjohnson/next-seq-uint64
...
Change Bucket.NextSequence() to return uint64
2014-06-22 10:00:04 -06:00
Ben Johnson
0f585358f4
Change Bucket.NextSequence() to return uint64.
...
This commit changes NextSequence() to return a uint64 instead of an int. This also
removes the ErrSequenceOverflow error condition since overflowing a uint64 is unlikely.
Fixes #39 .
2014-06-22 09:33:28 -06:00
Ben Johnson
00ee0da528
Add Open() options, flock timeout.
...
This commit changes Open() to provide an additional Options argument. The options
argument currently only has a Timeout which will cause the Open() to return
ErrTimeout if a file lock cannot be obtained in time.
Fixes #207 .
2014-06-21 14:44:28 -06:00
Ben Johnson
0a59a75472
Merge pull request #206 from Shopify/pending_page_stats
...
Split the freelist page count stats to free and pending
2014-06-20 09:03:24 -06:00
Martin Kobetic
571f201672
split the freelist page count stats to free and pending
2014-06-20 14:53:25 +00:00
Ben Johnson
42b4cae0fd
Merge pull request #202 from benbjohnson/refactor-split
...
Fix split-merge regression.
2014-06-19 07:17:36 -06:00
Ben Johnson
b1dbd35da1
Fix merge-split regression.
...
This commit reverts merge-split and fixes the node.split() to do a multi-page split. This issue
caused problems with bulk loading because it would split into a small page and a very large page.
The very large page, in turn, would be an arbitrary size so when it was freed later it would be
difficult to reuse and would cause serious fragmentation issues.
2014-06-18 16:16:58 -06:00
Ben Johnson
5043a9e839
Merge pull request #200 from benbjohnson/fix-i686
...
Fix i686 build error.
2014-06-18 15:28:43 -06:00
Ben Johnson
56de9902a8
Merge pull request #201 from Shopify/freelist_stats_cleanup
...
Fix up freelist stats naming and add FreeAlloc
2014-06-18 12:35:13 -06:00
Martin Kobetic
8a386756df
fix up freelist stats naming and add FreeAlloc
2014-06-18 18:10:42 +00:00
Ben Johnson
515bf03ff9
Fix i686 build error.
2014-06-18 11:53:01 -06:00
Ben Johnson
afd38460ef
Merge pull request #199 from kardianos/patch-1
...
Update README.md
2014-06-18 10:04:45 -06:00
Daniel Theophanes
c3ae6e7307
Update README.md
2014-06-18 09:02:06 -07:00
Ben Johnson
4e3b3d3b2d
Merge pull request #198 from yosssi/patch-1
...
Add "BoltStore" link on README.md
2014-06-18 09:53:47 -06:00
Keiji Yoshida
ce59819e84
Add "BoltStore" link on README.md
...
I completed creating [BoltStore](https://github.com/yosssi/boltstore ) and added its link on README.md.
2014-06-18 15:24:52 +09:00
Ben Johnson
f8365b732e
Merge pull request #197 from Shopify/freelist_stats
...
Add freelist stats to db stats
2014-06-17 13:34:15 -06:00
Martin Kobetic
4918ce8301
drop mergeStats and move freelist stats update to Tx
2014-06-17 19:30:10 +00:00
Martin Kobetic
c105316292
add freelist stats to db stats
2014-06-17 18:40:56 +00:00
Ben Johnson
41aa602f27
Document key/value lifecycle.
...
This commit adds a caveat to the godoc that explains how key and value
byte slices will only be valid for the life of the transaction.
2014-06-16 09:42:59 -06:00
Ben Johnson
0329b03f58
Merge pull request #193 from benbjohnson/check-freelist-overflow
...
Check for freelist overflow
2014-06-13 16:02:47 -06:00
Ben Johnson
4db99647eb
Fix freelist rollback.
2014-06-13 15:50:47 -06:00
Ben Johnson
8137a18374
Merge pull request #194 from benbjohnson/fix-deadlock
...
Fix deadlock on remmap.
2014-06-13 12:29:59 -06:00
Ben Johnson
defdb743cd
Fix deadlock on remmap.
...
This commit fixes a deadlock situation that can occur when Bolt's database size crosses a threshold
and requires remapping the mmap.
2014-06-13 12:07:37 -06:00
Ben Johnson
f448639ce4
Check for freelist overflow.
2014-06-13 07:56:10 -06:00
Ben Johnson
01bc9be72f
Merge pull request #191 from benbjohnson/win-ftw
...
Windows Support
2014-06-13 07:07:33 -06:00
Ben Johnson
a2535f64ec
Merge pull request #190 from Shopify/cursor_delete
...
Add Cursor.Delete()
2014-06-12 10:45:07 -06:00
Ben Johnson
8eaea4c150
Remove errcheck.
2014-06-12 09:32:29 -06:00
Ben Johnson
1c97a490dd
Add Windows support.
...
This commit adds Windows support to Bolt. Windows memory maps return an address instead of a byte
slice so the DB.data field had to be refactored to be a pointer to a large byte array.
2014-06-12 09:23:30 -06:00
Martin Kobetic
a00a88baef
add Cursor.Delete()
2014-06-11 21:46:19 +00:00
Ben Johnson
c2577db1c2
Add Windows support.
2014-06-11 11:11:21 -06:00
Ben Johnson
5e9ce18567
Merge pull request #189 from benbjohnson/increase-max-nodes-per-page
...
Increase max nodes per page.
2014-06-10 10:06:01 -06:00
Ben Johnson
fd7b0efeb5
Increase max nodes per page.
...
This commit changes the maxNodesPerPage constant so that it is essentially unlimited.
Previously, a single large transaction could create more nodes than the mock array
could handle.
Fixes #188 .
2014-06-10 09:38:40 -06:00
Ben Johnson
c9b983c853
Merge pull request #187 from benbjohnson/fix-seek
...
Fix in-between page seek
2014-06-09 12:59:29 -06:00
Ben Johnson
511ecba69b
Refactor Cursor.Next() to use Cursor.next().
2014-06-09 12:37:07 -06:00
Ben Johnson
63a9afd028
Add seek forward test.
2014-06-09 12:31:52 -06:00