Commit Graph

818 Commits (master)

Author SHA1 Message Date
Ben Johnson 9dffd9de3b Merge pull request #594 from anacrolix/patch-1
Update README.md
2016-09-12 10:49:43 -06:00
Ben Johnson ad29024c8a Merge pull request #591 from boltdb/readme
README
2016-09-08 10:33:36 -06:00
Ben Johnson 215223e6a9 README
Added note to README that the file format is fixed.
2016-09-08 10:32:55 -06:00
Ben Johnson e72f08ddb5 Merge pull request #561 from zhujun2006/master
task#560 print leaf k/v with right value
2016-09-06 14:09:29 -06:00
Ben Johnson de82765149 Merge pull request #578 from resin-os/align-fix
Correct broken unaligned load/store in armv5
2016-09-06 14:07:22 -06:00
Ben Johnson 1ff46c182d Merge pull request #590 from benbjohnson/vincent-petithory-compact-db
Compaction Command
2016-09-06 13:57:39 -06:00
Ben Johnson 1561ab171f Merge pull request #589 from nekto0n/master
Lower number of allocation in freelist.reindex()
2016-09-05 15:54:03 -06:00
Ben Johnson f5d275b537
Minor bolt compact revisions 2016-09-05 15:43:02 -06:00
Nikita Vetoshkin 3d34fbcbfb Lower number of allocation in freelist.reindex()
Here is a profile taken etcd.
Before:
     10924      10924 (flat, cum)  4.99% of Total
         .          .    230:
         .          .    231:// reindex rebuilds the free cache based on available and pending free lists.
         .          .    232:func (f *freelist) reindex() {
         .          .    233:	f.cache = make(map[pgid]bool)
         .          .    234:	for _, id := range f.ids {
     10924      10924    235:		f.cache[id] = true
         .          .    236:	}
         .          .    237:	for _, pendingIDs := range f.pending {
         .          .    238:		for _, pendingID := range pendingIDs {
         .          .    239:			f.cache[pendingID] = true
         .          .    240:		}
After:
         1          1 (flat, cum) 0.0017% of Total
         .          .    228:	f.reindex()
         .          .    229:
}         .          .    230:
         .          .    231:// reindex rebuilds the free cache based on available and pending free lists.
         .          .    232:func (f *freelist) reindex() {
         1          1    233:	f.cache = make(map[pgid]bool, len(f.ids))
         .          .    234:	for _, id := range f.ids {
         .          .    235:		f.cache[id] = true
         .          .    236:	}
         .          .    237:	for _, pendingIDs := range f.pending {
         .          .    238:		for _, pendingID := range pendingIDs {
2016-09-05 14:04:40 +05:00
Matt Joiner 8133f4399e Update README.md
Add anacrolix/torrent to users.
2016-09-02 15:19:24 +10:00
Ben Johnson 52d0f5e6a9
Merge branch 'compact-db' of https://github.com/vincent-petithory/bolt into vincent-petithory-compact-db 2016-09-01 14:47:06 -06:00
Ben Johnson ec58b76ba0 Merge pull request #577 from bouk/patch-1
Fix typo (Tx -> DB)
2016-08-31 16:25:56 -06:00
Ben Johnson 583e8937c6 Merge pull request #584 from benbjohnson/go17
Fix Go 1.7 pointer reference bug
2016-08-18 11:01:52 -06:00
Ben Johnson 92410e0673
fix Go 1.7 pointer reference bug
This commit fixes a bug where page end-of-header pointers were being
converted to byte slices even when the pointer did not point to
allocated memory. This occurs with pages that have a `page.count`
of zero.

Note: This was not an issue in Go 1.6 but the new Go 1.7 SSA backend
handles `nil` checks differently.

See https://github.com/golang/go/issues/16772
2016-08-18 08:44:57 -06:00
Ben Johnson 94c8db5968 Merge pull request #579 from asdine/master
Update description of project using BoltDB
2016-07-30 10:44:16 -04:00
Asdine El Hrychy 99f885d418 Update description of project using BoltDB 2016-07-30 12:06:00 +02:00
Lorenzo Stoakes 97aba5586d bucket: correct broken unaligned load/store in armv5
armv5 devices and older (i.e. <= arm9 generation) require addresses that are
stored to and loaded from to to be 4-byte aligned.

If this is not the case the lower 2 bits of the address are cleared and the load
is performed in an unexpected order, including up to 3 bytes of data located
prior to the address.

Inlined buckets are stored after their key in a page and since there is no
guarantee that the key will be of a length that is a multiple of 4, it is
possible for unaligned load/stores to occur when they are cast back to bucket
and page pointer types.

The fix adds a new field to track whether the current architecture exhibits this
issue, sets it on module load for ARM architectures, and then on bucket open, if
this field is set and the address is unaligned, a byte-by-byte copy of the
inlined bucket is performed.

Ref: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html
2016-07-28 14:25:49 +01:00
Bouke van der Bijl bb699ba24d Fix typo (Tx -> DB) 2016-07-22 13:08:01 -04:00
Ben Johnson 5cc10bbbc5 Merge pull request #573 from evnix/patch-1
added a BoltDB related project
2016-07-19 10:51:38 -06:00
Avinash D'Silva 318c587cae added a BoltDB related project 2016-07-17 22:11:04 +01:00
Ben Johnson acc803f0ce Merge pull request #567 from pankajkhairnar/pankajkhairnar-new-project
Added new project name in the list of projects using BoldDB
2016-07-07 10:56:50 -06:00
Ben Johnson c735b38f4e Merge pull request #570 from emersion/patch-1
Fixes build error in README code
2016-07-07 10:56:26 -06:00
emersion 2fcb4b2d24 Fixes build error in README code 2016-06-17 19:29:27 +02:00
Ben Johnson 3f7947a25d Merge pull request #569 from ifraixedes/patch-1
Remove skydb of the README
2016-06-16 13:33:16 -06:00
Ivan Fraixedes e2d1ba4e39 Remove skydb of the README
I think that SkyDB is over, I could find any link to the project.
2016-06-16 19:26:53 +02:00
Pankaj khairnar 76734943e1 Added new project which is using BoldDB 2016-06-12 16:53:54 +05:30
Ben Johnson 05e441d7b3 README 2016-06-07 08:38:33 -06:00
Ben Johnson fcd5488035 Merge pull request #565 from joe2far/patch-1
Fixed typo in README
2016-06-07 08:37:57 -06:00
Ben Johnson 26d9d16a46 Merge pull request #563 from dankomiocevic/patch-1
Add MuLiFS to the list of projects using Bolt.
2016-06-07 08:37:33 -06:00
Joe Farrell 08ce9bb754 Fixed typo in README 2016-06-03 16:56:58 +01:00
Danko Miocevic 5fec58dd72 Add MuLiFS to the list of projects using Bolt. 2016-05-26 12:49:33 -03:00
stone1342006 60fbb2c9fa task#560 print leaf k/v with right value 2016-05-18 22:56:05 +08:00
Ben Johnson dfb21201d9
v1.2.1 2016-05-16 09:40:46 -06:00
Ben Johnson c1c3bd7e84 Merge pull request #556 from xyproto/master
Add SimpleBolt and Algernon
2016-05-09 10:00:39 -06:00
Alexander F Rødseth 58adb4c087 Add SimpleBolt and Algernon 2016-05-04 10:19:01 +02:00
Ben Johnson d97499360d
Merge branch 'cyphar-548-fix-errors-with-unsynced-metadata' 2016-04-24 14:11:19 -06:00
Ben Johnson a5aec31dc3
add additional meta page tests 2016-04-24 14:09:45 -06:00
Ben Johnson 5e55b6cc1e
Merge branch '548-fix-errors-with-unsynced-metadata' of https://github.com/cyphar/boltdb into cyphar-548-fix-errors-with-unsynced-metadata 2016-04-24 13:23:29 -06:00
Ben Johnson e8ca7db0e7
Merge branch 'LK4D4-pool_allocate' 2016-04-22 14:33:50 -06:00
Ben Johnson f5f0f7af77
move page pool to db 2016-04-22 14:24:11 -06:00
Ben Johnson 9145d586f2
Merge branch 'pool_allocate' of https://github.com/LK4D4/bolt into LK4D4-pool_allocate 2016-04-22 14:16:02 -06:00
Aleksa Sarai ef2f3abff7 db: fix recovery from unsynced metadata
Bolt stores the two latest transactions' metadata, but previously did
not recover from validation failures in the latest by using the second
latest. Fix this by correctly handling validation failures in db.go, as
well as returning the metadata with highest txid which is also valid in
DB.meta().

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-20 08:17:28 +10:00
Ben Johnson 144418e147 Merge pull request #550 from ChrisHines/windows-remove-lock
Delay clearing db.path until just before db.close returns.
2016-04-07 08:34:38 -06:00
Chris Hines 5816124570 Wait to clear db.path until just before db.close returns.
The Windows version of funlock needs the db.path to delete the
corresponding .lock file.
2016-04-07 10:21:00 -04:00
Ben Johnson 831b652a7f Merge pull request #546 from josephspurrier/master
Add GoWebApp as a project that uses Bolt.
2016-03-25 21:18:27 -06:00
Ben Johnson b35bb5db2e Merge pull request #545 from benbjohnson/slice-capacity
Set slice capacity
2016-03-25 21:17:42 -06:00
Joseph Spurrier e90f18ec47 Update README.md
Added GoWebApp as a project that uses Bolt.
2016-03-25 16:25:51 -04:00
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