Commit Graph

691 Commits (6fa1249006bd0fb3836b664614fc4bb7c6f74167)

Author SHA1 Message Date
Emmanuel Odeke c46c54210a README: add drive to projects using bolt 2015-07-14 13:12:25 -06:00
Martin Kobetic 04a3e85793 Merge sorted pgids rather than resorting everything 2015-06-16 13:48:54 -06:00
Ben Johnson be4e606bc4 Merge pull request #388 from ajvb/master
Added Kala to Projects Using Bolt section
2015-06-10 20:31:01 -06:00
AJ Bahnken af0644b17a Added Kala to Projects Using Bolt section 2015-06-10 18:24:53 -07:00
Ben Johnson abb4088170 Merge pull request #387 from benbjohnson/batch-doc
Add batch size and delay docs
2015-06-10 11:09:42 -06:00
Ben Johnson 696f3a3ada Add batch size and delay docs
This commit adds documentation for batch size and delay to the
DB.Batch() call. Previously there was no reference to these properties
from the Batch() call so it was nearly impossible for anyone to
know to adjust these settings.

Thanks to Kelly Sommers for bringing the doc issue to my attention.
2015-06-10 10:59:56 -06:00
Ben Johnson 5eb31d5821 Merge pull request #384 from benbjohnson/drone
Fix Drone CI
2015-06-04 12:02:00 -06:00
Ben Johnson 06e894e661 Fix Drone CI.
This commit ignores the TestBucket_Put_ValueTooLarge test on
Drone CI because the containers do not have enough memory. This
test will still be run by anyone else who runs the test suite so
that will still provide coverage.
2015-06-04 11:48:43 -06:00
Ben Johnson 34b7c13e04 Merge pull request #367 from mdlayher/master
bucket_test: add test for ErrValueTooLarge on insert
2015-06-03 13:34:06 -06:00
Ben Johnson 764b4844e9 Merge pull request #368 from mdlayher/test_tx_foreach
tx_test: add tests for two tx.ForEach cases
2015-06-03 13:21:39 -06:00
Ben Johnson 8f42da05d6 Merge pull request #383 from benbjohnson/madvise
Add madvise() after mmap().
2015-06-03 07:10:20 -06:00
Ben Johnson 88f777f332 Add madvise() after mmap().
This commit advises the mmapped data file to use MADV_RANDOM to avoid
readahead. This can provide a performance boost to Bolt databases that
are larger than memory by avoiding unnecessary disk i/o.
2015-06-02 13:04:44 -06:00
Ben Johnson afceb316b9 Merge pull request #379 from benbjohnson/tx-doc
Add docs for dependent transactions.
2015-05-21 09:53:52 -06:00
Ben Johnson a03d52a9dd Add docs for dependent transactions.
This commit adds documentation to clarify that read-only and read-write
transactions should not be mixed in the same goroutine as it can cause
deadlocks during remapping.

See: https://github.com/boltdb/bolt/issues/378
2015-05-21 09:50:13 -06:00
Ben Johnson c69cb102ce Merge pull request #377 from benbjohnson/close-race
Wait for pending transactions on close
2015-05-21 09:02:35 -06:00
Ben Johnson e929eba364 Wait for pending tx on close.
This commit fixes the DB.Close() function so that it waits for any
open transactions to finish before closing.
2015-05-20 16:10:07 -06:00
Ben Johnson 55af28c19c Merge pull request #376 from ryanuber/readme-consul
Add Consul to README
2015-05-19 20:17:35 -06:00
Ryan Uber 89ab219630 Add Consul to README 2015-05-19 19:12:40 -07:00
Ben Johnson 957d850b51 README 2015-05-18 13:50:00 -06:00
Ben Johnson d4363a9208 Merge branch 'ro' 2015-05-18 13:45:09 -06:00
Ben Johnson df52bd0803 Add test case inline documentation. 2015-05-18 13:45:02 -06:00
sasha-s aa13f7f94f make ignoring Truncate() explicit
https://github.com/boltdb/bolt/pull/371#issuecomment-103176330
2015-05-18 12:00:40 -07:00
sasha-s fda75748b5 use a shared lock in read-only mode
https://github.com/boltdb/bolt/pull/371#issuecomment-103119486
2015-05-18 11:07:19 -07:00
Ben Johnson c5eb8da413 Merge pull request #375 from benbjohnson/min-mmap-size
Change min mmap size from 1MB to 32KB.
2015-05-18 11:51:49 -06:00
Ben Johnson a450f843ee Change min mmap size from 1MB to 32KB.
This commit adjusts the minimum mmap size from 1MB to 32KB. The
previous limit was arbitrary and causes wasted space for very small
databases.

Thanks to @mcuadros for submitting the original pull request:

  https://github.com/boltdb/bolt/pull/351
2015-05-18 10:37:47 -06:00
Ben Johnson 75e094b84f Merge pull request #374 from oliver006/master
Update README.md - add project
2015-05-18 10:31:09 -06:00
Ben Johnson 2c5801bedd Merge branch 'fix-crash' 2015-05-18 10:15:49 -06:00
Ben Johnson bf5458de2f Add inline documentation for bdc109b.
This commit simply adds some additional comments to the commit provided
by sasha-s that fixes the "slice out of bounds" errors.
2015-05-18 10:14:47 -06:00
Oliver 27f88b367d Update README.md
Adding prometheus annotation server to the list projects using BoltDB.
2015-05-18 09:34:19 -04:00
sasha-s 019bf5b010 open read-only databases in read-only mode 2015-05-14 15:43:13 -07:00
Matt Layher 06cdcaad94 tx_test: add tests for two tx.ForEach cases 2015-05-12 16:55:19 -04:00
Matt Layher 530d83e137 bucket_test: add test for ErrValueTooLarge on insert 2015-05-12 16:35:27 -04:00
Ben Johnson 2c04100eb9 Merge pull request #366 from benbjohnson/sync
Add DB.Sync()
2015-05-10 09:00:53 -06:00
Ben Johnson e5aaa976ba Add DB.Sync().
This commit adds DB.Sync() for users who set DB.NoSync to true.
2015-05-08 13:11:15 -06:00
Ben Johnson da700e8fdb Add caveat regarding endianness of data files as suggested by Raphael Geronimi. 2015-05-06 09:26:22 -06:00
Ben Johnson fd65d6c954 Merge pull request #363 from benbjohnson/no-truncate
Add DB.NoTruncate flag.
2015-05-06 09:24:37 -06:00
Ben Johnson b107b35f19 Add DB.NoGrowSync flag.
This commit adds the DB.NoGrowSync flag to optionally revert mmap()
calls to how they were implemented before the ext3/ext4 fix. When
NoGrowSync is true, remapping the data file will not force the file
system to resize it immediately. This works for non-ext3/4 file
systems.

The default value of NoGrowSync is false so it is still safe for
ext3/ext4 file systems by default.

See also: https://github.com/boltdb/bolt/issues/284
2015-05-06 09:23:32 -06:00
Ben Johnson 550b8c7cb6 Merge pull request #354 from xiang90/cmd
cmd/bolt: remove duplicate blockProfile flag
2015-04-28 11:12:55 -07:00
Ben Johnson 8a2a9b2eb7 Merge pull request #356 from timshannon/master
Added Freehold to the projects list in README + Transaction Documentation change
2015-04-23 08:41:13 -07:00
Tim Shannon 07590fc00b Added Freehold to the projects list in README.
Added a few lines of documentation to clarify that read-only
transactions need to be rolled back and not committed, as per the
discussion in issue #344
2015-04-23 09:49:55 -05:00
Xiang Li 71f28eaecb cmd/bolt: remove duplicate blockProfile flag 2015-04-22 21:37:22 -07:00
Ben Johnson d647626090 Merge pull request #352 from benbjohnson/cli
Refactor CLI
2015-04-19 20:51:38 -06:00
Ben Johnson 73a3aa1ccc Add 'bolt page' command. 2015-04-17 13:28:32 -06:00
sasha-s bdc109bdc7 fix `slice bounds out of range`/maxAllocSize bugs
when accessing the node data we used to use cast to
*[maxAllocSize]byte, which breaks if we try to go across maxAllocSize boundary.

This leads to occasional panics.
Sample stacktrace:
```
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/boltdb/bolt.(*node).write(0xc208010f50, 0xc27452a000)
    $GOPATH/src/github.com/boltdb/bolt/node.go:228 +0x5a5
github.com/boltdb/bolt.(*node).spill(0xc208010f50, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/node.go:364 +0x506
github.com/boltdb/bolt.(*node).spill(0xc208010700, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/node.go:336 +0x12d
github.com/boltdb/bolt.(*node).spill(0xc208010620, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/node.go:336 +0x12d
github.com/boltdb/bolt.(*Bucket).spill(0xc22b6ae880, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/bucket.go:535 +0x1c4
github.com/boltdb/bolt.(*Bucket).spill(0xc22b6ae840, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/bucket.go:502 +0xac2
github.com/boltdb/bolt.(*Bucket).spill(0xc22f4e2018, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/bucket.go:502 +0xac2
github.com/boltdb/bolt.(*Tx).Commit(0xc22f4e2000, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/tx.go:150 +0x1ee
github.com/boltdb/bolt.(*DB).Update(0xc2080e4000, 0xc24d077508, 0x0, 0x0)
    $GOPATH/src/github.com/boltdb/bolt/db.go:483 +0x169
```
It usually happens when working with large (50M/100M) values.
One way to reproduce it is to change maxAllocSize in bolt_amd64.go to 70000 and run the tests.
TestBucket_Put_Large crashes.
2015-04-16 11:58:02 -07:00
Ben Johnson 3ad30436da Add 'bolt dump' command. 2015-04-16 11:13:34 -06:00
Ben Johnson dd542876fa Add improved CLI documentation. 2015-04-15 15:21:50 -06:00
Ben Johnson d0e8a99e30 Refactor bolt CLI. 2015-04-14 16:32:20 -06:00
Ben Johnson 3b449559cf Add --path to bolt bench. 2015-04-12 09:36:45 -06:00
Ben Johnson 5edfe08f65 Merge pull request #347 from mike-marcacci/patch-1
Added InfluxDB to list of projects using bolt
2015-04-11 19:58:53 -06:00
Mike Marcacci c50df3a891 Added InfluxDB to list of projects using bolt 2015-04-11 18:16:07 -07:00