Commit Graph

870 Commits (d294ec8a4251296644cbe25531f570d40fdd497f)

Author SHA1 Message Date
lorneli d294ec8a42 db: add test in read-only mode 2017-09-12 20:04:55 +08:00
Xiang Li 4d3ab93ca9 Merge pull request #37 from jpbetz/tx-tests
Improve test coverage for releaseRange rollbacks.
2017-09-11 14:30:52 -07:00
Joe Betz d72f7607a6 Improve test coverage for releaseRange rollbacks. 2017-09-11 12:01:14 -07:00
Xiang Li 4ff482b44e Merge pull request #36 from jpbetz/freelist-tests
Increase freelist.releaseRange unit test coverage.
2017-09-08 11:51:36 -07:00
Joe Betz 9245fa7732 Increase freelist.releaseRange unit test coverage. 2017-09-08 10:33:46 -07:00
Raphael Geronimi 3a49aacce1 Added support for no timeout locks on db files (#35)
No longer unconditionally sleeps if file lock is already held
2017-09-06 14:24:56 -07:00
Anthony Romano a148de800f Merge pull request #33 from heyitsanthony/cov
add coverage reports
2017-08-30 15:53:31 -07:00
Anthony Romano e6a9c1db87 add coverage reports
Fixes #11
2017-08-30 14:22:44 -07:00
Anthony Romano 337da347fe Merge pull request #30 from tylertreat/nosync_option
Add NoSync field to Options
2017-08-24 11:00:17 -07:00
Tyler Treat 69fa13f2f1 Add NoSync field to Options
This allows enabling NoSync when you only have access to the Options
passed into Open() and not the returned DB (as is frequently the case
with libraries).
2017-08-24 09:35:24 -07:00
Anthony Romano 9c39199963 Merge pull request #32 from heyitsanthony/readme-fork
README: explain purpose of bbolt fork
2017-08-23 20:09:27 -07:00
Anthony Romano 92ba45fa6d README: explain purpose of bbolt fork
Fixes #31
2017-08-23 18:55:47 -07:00
Gyu-Ho Lee e1c92081e5 Merge pull request #28 from gyuho/goreport
goreport + minor fixes
2017-08-11 16:27:02 -07:00
Gyu-Ho Lee c3092301af *: go vet fixes
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-11 13:47:10 -07:00
Gyu-Ho Lee 9d07787d9f README: add goreportcard badge
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-11 13:41:18 -07:00
Anthony Romano dd1d5a7cbd Merge pull request #24 from heyitsanthony/node-gap
Avoid allocate a hole page, when the node size equals to pageSize
2017-08-11 13:25:33 -07:00
Gyu-Ho Lee 2db8c236bc Merge pull request #27 from gyuho/README
README: update links to 'coreos/bbolt'
2017-08-11 13:02:11 -07:00
Gyu-Ho Lee 4d8f7f7f8d README: update links to 'coreos/bbolt'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-11 12:58:44 -07:00
Anthony Romano 3efc7f7ed5 Merge pull request #20 from heyitsanthony/readd-cli-commands
Add "buckets", "keys" and "get" CLI commands
2017-08-11 11:23:52 -07:00
Lewis Marshall 0ca39ebe25 Add "buckets", "keys" and "get" CLI commands
These were previously removed but I find them quite useful so have
reintroduced them.

Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-08-11 11:13:11 -07:00
Lewis Marshall f07641f90a Add "dump" and "page" commands to CLI usage
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-08-11 11:12:22 -07:00
Anthony Romano 533739c662 Merge pull request #17 from heyitsanthony/fix543
Fix issue #543 'bolt bench crashes'
2017-08-11 10:43:53 -07:00
Anthony Romano 9fc2cf177d Merge pull request #23 from heyitsanthony/del-nonexisting
Fix deletion of non-existing keys
2017-08-11 10:43:32 -07:00
Anthony Romano a6c45c18c3 Merge pull request #16 from heyitsanthony/config-page-size
Options.PageSize
2017-08-11 10:43:09 -07:00
Anthony Romano 2fe83be160 Merge pull request #19 from heyitsanthony/skip-freelist-read
do not read freelist if database opened readonly
2017-08-11 10:11:03 -07:00
Anthony Romano c5d7f33536 Merge pull request #22 from heyitsanthony/fill-compact
Set FillPercent=1.0 in 'bolt compact'.
2017-08-11 10:05:38 -07:00
Anthony Romano 6b378d844e Merge pull request #18 from heyitsanthony/fmt
more fmt passes
2017-08-11 09:58:09 -07:00
Anthony Romano ca5f9b69f3 Merge pull request #21 from heyitsanthony/add_mips_support
Add support for mips, mips64
2017-08-11 09:57:29 -07:00
Anthony Romano 045bd0e3bc Merge pull request #26 from heyitsanthony/fix-32bit-test
fix overflow breaking 32-bit test builds
2017-08-11 09:57:09 -07:00
Anthony Romano 1ab9756653 fix overflow breaking 32-bit test builds 2017-08-10 23:36:52 -07:00
Pavel Borzenkov 6336a429d1 Fix deletion of non-existing keys
Doc for Bucket.Delete says that a Delete() on non-existing key is a
no-op. Right now it tries to delete the next key returned by the
cursor. Fix this by checking for key equivalence before deletion.

 Fixes #349

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2017-08-10 23:07:50 -07:00
Pavel Borzenkov 3c6c3ac0a2 Add a test for deletion of non-existing key
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>
2017-08-10 23:07:50 -07:00
dogben ef8e711cfb Set FillPercent=1.0 in 'bolt compact'.
By default, pages are split when they reach half full. For 'bolt compact' we want to fill the entire page for maximum compaction.
2017-08-10 22:58:57 -07:00
Vladimir Stefanovic e264e743a9 Add support for mips, mips64 2017-08-10 22:49:48 -07:00
Sokolov Yura aka funny_falcon ec37ce8e9b do not read freelist if database opened readonly 2017-08-10 22:30:40 -07:00
Anthony Romano d3d8bbd794 pass gofmt 2017-08-10 22:07:25 -07:00
Anthony Romano 32c9f9e929 pass unused 2017-08-10 22:07:25 -07:00
Anthony Romano e5514a24a6 pass gosimple 2017-08-10 22:07:25 -07:00
Anthony Romano 89b9a2c19e make fmt
* gosimple
* unused
* gofmt
2017-08-10 22:07:25 -07:00
Christian Mauduit 319a33c534 Fix issue #543 'bolt bench crashes'
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.
2017-08-10 21:14:06 -07:00
Anthony Romano 012f88489b add PageSize to Option struct
Configure the db page size at runtime. Makes cross-arch debugging a bit easier.
2017-08-10 20:46:08 -07:00
Anthony Romano 78ca4fde00 get rid of os.Getpagesize() calls where appropriate 2017-08-10 20:46:08 -07:00
Anthony Romano 12923fe56c Merge pull request #12 from heyitsanthony/skip-freelist-overflow
freelist: read all free pages on count overflow
2017-08-10 14:28:08 -07:00
Anthony Romano b219ffc6cc Merge pull request #10 from heyitsanthony/fix-freepage-test
fix NoSyncFreelist reachability checking
2017-08-09 08:48:36 -07:00
Anthony Romano 7bc833016a Merge pull request #13 from heyitsanthony/weaken-single-put
test: use qconfig() instead of defaults in TestBucket_Put_Single
2017-08-09 08:41:24 -07:00
Anthony Romano fd5de8495a fix NoSyncFreelist reachability checking
* unconditionally free freelist, if any, when committing txn

* only treat freelist pages as reachable if set to valid pgid

Fixes #9
2017-08-09 07:24:02 -07:00
Anthony Romano 1038faf165 test: use qconfig() instead of defaults in TestBucket_Put_Single
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.
2017-08-09 00:30:52 -07:00
Anthony Romano 03f5e16968 freelist: read all free pages on count overflow
count is not shifted up by start index when taking subslice of free
list, dropping the last entry in the list.
2017-08-08 23:38:46 -07:00
Anthony Romano f50ad8e90c test: check free page counts on close/reopen for freelist overflow
Confirm that the number of freed pages exceeds the overflow count, then check
that reopening gives the same number of free pages.
2017-08-08 23:37:24 -07:00
Gyu-Ho Lee 2ab139b399 Merge pull request #8 from gyuho/ci
gofmt, change git path
2017-07-27 15:05:25 -07:00