aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #654 from benbjohnson/revert-ca9f208Ben Johnson2017-01-311-17/+7
|\ | | | | Revert "replace unix implementation to be the same as solaris to fix …"
| * Revert "replace unix implementation to be the same as solaris to fix an ↵Ben Johnson2017-01-311-17/+7
|/ | | | | | issue with glusterfs" This reverts commit ca9f2088aab4fc9832e587655f0026875bddbf9b.
* Merge pull request #651 from zweizeichen/masterBen Johnson2017-01-301-3/+3
|\ | | | | hexidecimal -> hexadecimal
| * hexidecimal -> hexadecimalSebastian2017-01-281-3/+3
|/ | | Small spelling fix :)
* Merge pull request #642 from josharian/fix629Ben Johnson2016-12-281-1/+9
|\ | | | | Ensure that keys generated by testing/quick are unique
| * Ensure that keys generated by testing/quick are uniqueJosh Bleecher Snyder2016-12-281-1/+9
|/ | | | | | | | Quick seed 21691 used to generate duplicate keys, which caused some Puts of values to overwrite other values, causing spurious test failures. Fixes #629.
* Clean up timeout tests.Ben Johnson2016-12-271-161/+0
| | | | | | The new FCTNL locking does not support multiple locks from the same process which makes those tests fail. The lock tests have been removed.
* Merge pull request #616 from sinwav/idiomaticBen Johnson2016-12-272-3/+2
|\ | | | | Fix return statement inside else block at the end of function
| * Fix return statement inside else block at the end of function and gofmt ↵nick2016-10-312-3/+2
| | | | | | | | | | | | windows file Signed-off-by: nick <nicholasjamesrusso@gmail.com>
* | Merge pull request #625 from vrecan/FcntlFlockBen Johnson2016-12-271-7/+17
|\ \ | | | | | | replace unix implementation to be the same as solaris to fix an issue with glusterfs
| * | replace unix implementation to be the same as solaris to fix an issue with ↵Ben Aldrich2016-11-161-7/+17
| | | | | | | | | | | | glusterfs
* | | Merge pull request #628 from bep/patch-1Ben Johnson2016-12-271-1/+1
|\ \ \ | | | | | | | | Fix prefix scan example
| * | | Fix prefix scan exampleBjørn Erik Pedersen2016-12-061-1/+1
| | | | | | | | | | | | The example is correct in isolation, but if people just copy the loop, it will go into infinite loop when given an empty byte slice.
* | | | Merge pull request #641 from josharian/cleanupBen Johnson2016-12-234-17/+16
|\ \ \ \ | | | | | | | | | | Minor cleanup and bug fixes
| * | | | Allow GC to reclaim completed transactionsJosh Bleecher Snyder2016-12-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing append-based implementation left a hanging reference to the last tx. For example, if db.txs was: []*Tx{0x1, 0x2, 0x3, 0x4, 0x5} and we removed the second element, db.txs would now be: []*Tx{0x1, 0x3, 0x4, 0x5, 0x5}[:4] The garbage collector cannot reclaim anything anywhere in a slice, even pointers between its len and cap, because the len can always be extended up to the cap. This hanging reference to the Tx could last indefinitely, and since the Tx has a reference to user-provided functions, which could be closures, this bug could prevent arbitrary amounts of user garbage from being collected. Since db.txs is unordered anyway, switch to a simpler--and O(1) instead of O(n)--implementation. Swap the last element into the spot to be deleted, nil out the original last element, and shrink the slice.
| * | | | Fix freelist.size calculation for large freelistsJosh Bleecher Snyder2016-12-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | freelist.size did not account for the extra fake freelist item used to hold the number of elements when the freelist is large.
| * | | | Precalculate size of pending pgids in freelist.copyallJosh Bleecher Snyder2016-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | This recovers the slight alloc regression in #636.
| * | | | Clean up after #636Josh Bleecher Snyder2016-12-233-14/+5
|/ / / / | | | | | | | | | | | | | | | | freelist.lenall duplicated freelist.count. freelist.copyall and mergepgids docs had typos.
* | | | Merge pull request #636 from josharian/perfBen Johnson2016-12-213-20/+49
|\ \ \ \ | | | | | | | | | | Don't allocate huge slices to merge pgids in freelist.write
| * | | | Don't allocate huge slices to merge pgids in freelist.writeJosh Bleecher Snyder2016-12-203-20/+49
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a large (50gb) database with a read-write-delete heavy load, nearly 100% of allocated space came from freelists. 1/3 came from freelist.release, 1/3 from freelist.write, and 1/3 came from tx.allocate to make space for freelist.write. In the case of freelist.write, the newly allocated giant slice gets copied to the space prepared by tx.allocate and then discarded. To avoid this, add func mergepgids that accepts a destination slice, and use it in freelist.write. This has a mild negative impact on the existing benchmarks, but cuts allocated space in my real world db by over 30%. name old time/op new time/op delta _FreelistRelease10K-8 18.7µs ±10% 18.2µs ± 4% ~ (p=0.548 n=5+5) _FreelistRelease100K-8 233µs ± 5% 258µs ±20% ~ (p=0.151 n=5+5) _FreelistRelease1000K-8 3.34ms ± 8% 3.13ms ± 8% ~ (p=0.151 n=5+5) _FreelistRelease10000K-8 32.3ms ± 1% 32.2ms ± 7% ~ (p=0.690 n=5+5) DBBatchAutomatic-8 2.18ms ± 3% 2.19ms ± 4% ~ (p=0.421 n=5+5) DBBatchSingle-8 140ms ± 6% 140ms ± 4% ~ (p=0.841 n=5+5) DBBatchManual10x100-8 4.41ms ± 2% 4.37ms ± 3% ~ (p=0.548 n=5+5) name old alloc/op new alloc/op delta _FreelistRelease10K-8 82.5kB ± 0% 82.5kB ± 0% ~ (all samples are equal) _FreelistRelease100K-8 805kB ± 0% 805kB ± 0% ~ (all samples are equal) _FreelistRelease1000K-8 8.05MB ± 0% 8.05MB ± 0% ~ (all samples are equal) _FreelistRelease10000K-8 80.4MB ± 0% 80.4MB ± 0% ~ (p=1.000 n=5+5) DBBatchAutomatic-8 384kB ± 0% 384kB ± 0% ~ (p=0.095 n=5+5) DBBatchSingle-8 17.2MB ± 1% 17.2MB ± 1% ~ (p=0.310 n=5+5) DBBatchManual10x100-8 908kB ± 0% 902kB ± 1% ~ (p=0.730 n=4+5) name old allocs/op new allocs/op delta _FreelistRelease10K-8 5.00 ± 0% 5.00 ± 0% ~ (all samples are equal) _FreelistRelease100K-8 5.00 ± 0% 5.00 ± 0% ~ (all samples are equal) _FreelistRelease1000K-8 5.00 ± 0% 5.00 ± 0% ~ (all samples are equal) _FreelistRelease10000K-8 5.00 ± 0% 5.00 ± 0% ~ (all samples are equal) DBBatchAutomatic-8 10.2k ± 0% 10.2k ± 0% +0.07% (p=0.032 n=5+5) DBBatchSingle-8 58.6k ± 0% 59.6k ± 0% +1.70% (p=0.008 n=5+5) DBBatchManual10x100-8 6.02k ± 0% 6.03k ± 0% +0.17% (p=0.029 n=4+4)
* | | | Merge pull request #638 from boltdb/fix-634Ben Johnson2016-12-211-0/+3
|\ \ \ \ | | | | | | | | | | Document multi-process limitation in README
| * | | | READMEBen Johnson2016-12-211-0/+3
|/ / / / | | | | | | | | Add limitation about multiple processes opening databases concurrently.
* | | | Merge pull request #618 from tbe/masterBen Johnson2016-12-201-0/+3
|\ \ \ \ | |/ / / |/| | | [ppc64] added missing variable
| * | | [ppc64] added missing variabletbe2016-11-041-0/+3
| | |/ | |/| | | | The variable `brokenUnaligned` was missing for ppc64.
* | | Merge pull request #626 from timshannon/patch-1Ben Johnson2016-11-211-0/+2
|\ \ \ | |_|/ |/| | Added BoltHold and Ironsmith to the projects list
| * | Added BoltHold and Ironsmith to the projects listTim Shannon2016-11-201-0/+2
|/ /
* | Merge pull request #621 from jcvernaleo/jcv_readmeBen Johnson2016-11-091-0/+2
|\ \ | |/ |/| Add btcwallet and dcrwallet to projects using bolt.
| * Make wording a little less redundant.John C. Vernaleo2016-11-091-2/+2
| |
| * Add btcwallet and dcrwallet to projects using bolt.John C. Vernaleo2016-11-081-0/+2
|/
* Merge pull request #611 from jaredfolkins/masterBen Johnson2016-10-281-0/+49
|\ | | | | enhc: update example for nested buckets
| * enhc: update example for nested bucketsJared Folkins2016-10-281-0/+49
| |
* | Merge pull request #609 from hasit/patch-1Ben Johnson2016-10-281-0/+1
|\ \ | |/ |/| Add 'bolter' to the list of projects that use Bolt
| * Add 'bolter' to the list of projects that use BoltHasit Mistry2016-10-181-0/+1
|/ | | [bolter](https://github.com/hasit/bolter) is a command-line app for viewing BoltDB file in your terminal using [tablewriter](https://github.com/olekukonko/tablewriter).
* Merge pull request #605 from seeekr/patch-1Ben Johnson2016-10-081-1/+1
|\ | | | | fix typo in README.md
| * fix typo in README.mdDenis Andrejew2016-10-071-1/+1
|/
* Merge pull request #604 from gopherpit/masterBen Johnson2016-10-051-0/+1
|\ | | | | Add gopherpit to projects that use Bolt
| * Add gopherpit to projects that use BoltJanoš Guljaš2016-10-051-0/+1
|/
* Merge pull request #601 from benbjohnson/stats-tx-nBen Johnson2016-10-031-1/+1
|\ | | | | Fix Stats.Sub() for Stats.TxN.
| * Fix Stats.Sub() for Stats.TxN.Ben Johnson2016-10-031-1/+1
|/ | | | | | The subtraction for `TxN` was previously transposed which caused the result to be a negative number. This change alters the order to return the correct (positive) result.
* Merge pull request #595 from namore/add_warning_foreach_keysBen Johnson2016-09-131-0/+4
|\ | | | | Update README.md
| * Update README.mdRoman Naumann2016-09-131-0/+4
|/ | | | | Add warning to README.md that keys and values in `ForEach()` are invalid outside of transaction.
* Merge pull request #594 from anacrolix/patch-1Ben Johnson2016-09-121-0/+1
|\ | | | | Update README.md
| * Update README.mdMatt Joiner2016-09-021-0/+1
| | | | | | Add anacrolix/torrent to users.
* | Merge pull request #591 from boltdb/readmeBen Johnson2016-09-081-5/+5
|\ \ | | | | | | README
| * | READMEBen Johnson2016-09-081-5/+5
|/ / | | | | Added note to README that the file format is fixed.
* | Merge pull request #561 from zhujun2006/masterBen Johnson2016-09-061-2/+2
|\ \ | | | | | | task#560 print leaf k/v with right value
| * | task#560 print leaf k/v with right valuestone13420062016-05-181-2/+2
| | |
* | | Merge pull request #578 from resin-os/align-fixBen Johnson2016-09-067-1/+45
|\ \ \ | | | | | | | | Correct broken unaligned load/store in armv5
| * | | bucket: correct broken unaligned load/store in armv5Lorenzo Stoakes2016-07-287-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #590 from benbjohnson/vincent-petithory-compact-dbBen Johnson2016-09-064-0/+443
|\ \ \ \ | | | | | | | | | | Compaction Command