This repository has been archived by the owner on Dec 3, 2018. It is now read-only.
forked from boltdb/bolt
-
Notifications
You must be signed in to change notification settings - Fork 3
Switch to bbolt #5
Open
lukechampine
wants to merge
102
commits into
master
Choose a base branch
from
bbolt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Read txns would lock pages allocated after the txn, keeping those pages off the free list until closing the read txn. Instead, track allocating txid to compute page lifetime, freeing pages if all txns between page allocation and page free are closed.
*: use coreos/bbolt as import path
When the database has a lot of freepages, the cost to sync all freepages down to disk is high. If the total database size is small (<10GB), and the application can tolerate ~10 seconds recovery time, then it is reasonable to simply not sync freelist and rescan the db to rebuild freelist on recovery.
add option to skip freelist sync
Garbage collect pages allocated after minimum txid
Writes pgidNoFreelist to the meta freelist page to detect when freelists haven't been synced down. Fixes #5
rebuild freelist when opening with FreelistSync after NoFreelistSync
gofmt, change git path
Confirm that the number of freed pages exceeds the overflow count, then check that reopening gives the same number of free pages.
count is not shifted up by start index when taking subslice of free list, dropping the last entry in the list.
Default/nil quick.Config uses 1000 rounds, causing TestBucker_Put_Single to run for over 3 minutes in CI. The default count (via qconfig()) for boltdb is 5, so use that.
* unconditionally free freelist, if any, when committing txn * only treat freelist pages as reachable if set to valid pgid Fixes boltdb#9
test: use qconfig() instead of defaults in TestBucket_Put_Single
fix NoSyncFreelist reachability checking
freelist: read all free pages on count overflow
Configure the db page size at runtime. Makes cross-arch debugging a bit easier.
Added a test to check that bucket is actually non-nil before getting a cursor on it. This happens when querying non-bucket entries, the Bucket() method does not return explicit errors, so we can guess it's probably because it's a key of the wrong type (ie: not leaf). No clear idea wether the results in the case described '-read-mode=seq -write-mode=rnd-nest' really do make sense, it looks like read are zero whatsoever.
By default, pages are split when they reach half full. For 'bolt compact' we want to fill the entire page for maximum compaction.
As of now the test fails and tries to delete the next key returned by the cursor, which happens to be a nested bucket. That's why Delete is fails. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Fix CLI tool print entire freelist. Add option to dump leaf element keys/value bytes.
Otherwise, nil dereference on ReadOnly DB Fixes boltdb#45
tx: load freelist on Check() [continuation of PR#49]
…rds the original developer.
Trivial. Removed 'moribund' from README.md
Was filling up all the disk space in Jenkins VMs. Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
db_test.go: remove temp files after tests
Add 'boltcli' to the list of projects that use Bolt
fix funlock error when call db.Close on windows
Panic if page provided to freelist.read is incorrect page type.
Was causing freelist corruption on tx.WriteTo
Reliably triggers consistency check failures on ramdisk without freelist free fix.
Fix freelist corruption on tx.WriteTo
This is safe, as the only place that creates call values always explicitly sets err. It's a leftover from an earlier iteration of the code.
Remove unnecessary if in batch handling
tx: fix the number of pages is incorrectly counted
If this var is missing building on the ppc architecture fails. This PR adds it.
bolt_ppc.go: define `var brokenUnaligned`
DB.Close() actually waits for the transactions to finish now, since the PR 377. boltdb#377
Close waits for the transactions to finish
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This merges all the bbolt code, plus my patch that adds
MmapError
.This is a little unconventional; it's probably more "correct" to fork bbolt to NebulousLabs/bbolt, and then rewrite our Sia import paths to bbolt. I think we could also setup a NebulousLabs/bolt -> NebulousLabs/bbolt redirect.