666 Commits

Author SHA1 Message Date
Gyu-Ho Lee
cf93cb8694 *: fixes minor typos 2016-01-07 23:33:40 -08:00
Ben Johnson
25b28102db Merge pull request #479 from azazeal/master
Wrong threadCount passed to TestSimulate_1op_1p
2016-01-07 13:50:34 -07:00
Panagiotis Siatras
cd49fd6393 Merge pull request #1 from azazeal/fix-simulation_test-threadCount
FIX: Incorrect threadCount in simulation_test.go
2016-01-07 21:15:50 +02:00
Panagiotis Siatras
7d03ba92d0 FIX: Incorrect threadCount in simulation_test.go
TestSimulate_1op_1p should pass 1 as the threadCount instead of 100
2016-01-07 21:15:00 +02:00
Ben Johnson
34a0fa5307 Merge pull request #477 from benbjohnson/testing
Test suite refactoring
2016-01-02 22:34:41 -07:00
Ben Johnson
8b08bd4a80 test suite refactoring
This commit refactors the test suite to make it cleaner and to use the
standard testing library better. The `assert()`, `equals()`, and `ok()`
functions have been removed and some test names have been changed for
clarity.

No functionality has been changed.
2016-01-02 21:30:31 -07:00
Ben Johnson
2c56b2a28a Merge pull request #474 from elithrar/patch-1
[docs] Add table of contents
2015-12-31 11:54:59 -07:00
Matt Silverlock
d6ce6a9a80 [docs] Add table of contents
- Generated and tweaked a TOC using [doctoc](https://github.com/thlorenz/doctoc)
- (removed generated headers and fixed broken ampersand conversion)
2015-12-31 08:04:02 -08:00
Ben Johnson
f1153131c9 Merge pull request #471 from rhcarvalho/patch-1
Update min mmap size in godoc
2015-12-30 08:34:08 -07:00
Ben Johnson
343cdc2b4e Merge pull request #472 from gyuho/initial_mmap
Introduce InitialMmapSize to prevent deadlock
2015-12-30 08:33:30 -07:00
Gyu-Ho Lee
082efcc23e Introduce InitialMmapSize to prevent deadlock
InitialMmapSize is the initial mmap size of the database in bytes.
Read transaction won't block write transaction if InitialMmapSize
is large enough to handle mmap size.

Copied from https://github.com/boltdb/bolt/pull/432.
2015-12-21 15:36:00 -08:00
Rodolfo Carvalho
b766067f68 Update min mmap size in godoc 2015-12-17 00:19:41 +01:00
Ben Johnson
827f56dfb2 Merge pull request #470 from ReadmeCritic/master
Update README URLs based on HTTP redirects
2015-12-14 09:52:45 -07:00
ReadmeCritic
6179274f76 Update README URLs based on HTTP redirects 2015-12-14 07:44:42 -08:00
Ben Johnson
6d4e6a3ead Merge branch 'rhcarvalho-db-open-errors' 2015-12-10 21:37:07 -07:00
Rodolfo Carvalho
058a7ab347 Make bolt.Open return the documented errors
- ErrInvalid is returned when a data file is not a Bolt-formatted
  database.
- ErrVersionMismatch is returned when the data file was created with a
  different version of Bolt.
- ErrChecksum is returned when either meta page checksum does not match.

Also:
- Do not wrap errors from os.Stat, so that a caller could handle os.Stat
  errors just like it can handle errors from os.Open that bolt.Open
  might return.
- Name tests consistently, following the pattern "TestOpen_*".
- Remove deferred calls to `os.Remove(path)`.
  The calls are not only unnecessary, but also in all cases `os.Remove`
  returns an error that is ignored. All those calls are meant to remove
  a file that was already removed by `tmpfile()`.
- Combine "bad path" tests and use filepath.Join to build the path.
2015-12-10 18:39:03 +01:00
Ben Johnson
b34b35ea8d Merge pull request #467 from boltdb/readme-coalescer
README
2015-12-05 20:28:01 -07:00
Ben Johnson
f27abf2cc7 README
Replace reference to the coalescer with a reference to `DB.Batch()`.

Fixes #465.
2015-12-05 20:27:15 -07:00
Ben Johnson
0dfebeb660 Merge pull request #463 from rhcarvalho/fix-stats
Fix `bolt stats` output
2015-12-05 14:03:15 -07:00
Rodolfo Carvalho
10b100fe0f Fix bolt stats output 2015-12-05 19:56:31 +01:00
Ben Johnson
7bf163794f Merge pull request #462 from rhcarvalho/patch-readme
Put backticks around function name in description
2015-12-05 11:43:10 -07:00
Rodolfo Carvalho
a2144ebbf1 Put backticks around function name in description 2015-12-05 19:00:07 +01:00
Ben Johnson
6e1ca38c6a Merge pull request #461 from mark-rushakoff/doc-iterate-buckets
Document iterating over buckets
2015-11-22 20:06:43 -07:00
Mark Rushakoff
9ee1aea61b Fix typo in comment 2015-11-22 18:20:48 -08:00
Mark Rushakoff
e991375cad Explain iterating over sub-buckets in README 2015-11-22 18:20:48 -08:00
Ben Johnson
0b00effdd7 Merge pull request #455 from gyuho/boltdb_unix_map_populate
Add MmapFlags option for MAP_POPULATE (unix)
2015-11-12 08:10:49 -07:00
Ben Johnson
d359c78f40 Merge pull request #452 from benbjohnson/empty-seek
Skip empty pages during cursor seek
2015-11-09 09:36:12 -07:00
Gyu-Ho Lee
d97579c399 Add MmapFlags option for MAP_POPULATE (unix)
This adds MmapFlags to DB.Options in case we need syscall.MAP_POPULATE
flag in Linux 2.6.23+ to do the sequential read-ahead, as discussed in [1].

---

[1]: https://github.com/coreos/etcd/issues/3786
2015-11-08 18:07:10 -08:00
Ben Johnson
81db89446c Merge branch 'xiang90-tx_write' 2015-11-06 13:20:48 -07:00
Ben Johnson
6b1bbf0ab4 update WriteTo() docs
This commit updates and revises some of the documentation around
Tx.WriteTo() and how O_DIRECT is no longer the default.
2015-11-06 13:18:58 -07:00
Xiang Li
b986966361 add WriteToFlag to Tx
For in memory workload, it does not make sense to use
o_direct to copy the file. Adding a option to clear out
o_direct and for other future cases.
2015-11-06 11:03:28 -08:00
Luke Champine
852d3024fa skip empty pages during cursor seek
This commit fixes an issue where keys are skipped by cursors after
deletions occur in a bucket. This occurred because the cursor seeks
to the leaf page but does not check if it is empty.

Fixes #429, #450
2015-11-05 22:39:15 -07:00
Ben Johnson
47d80ed8a4 Merge pull request #451 from Charlesworth/master
updated README.md to fix typo
2015-11-03 09:07:54 -07:00
Charlie Cochrane
13944fb3e3 updated README.md to fix typo 2015-11-03 14:04:31 +00:00
Ben Johnson
119858097e Merge pull request #419 from raggi/windows-flock
windows: implement file locking
2015-10-28 12:21:53 -06:00
Ben Johnson
b95be7b997 Merge pull request #447 from benbjohnson/max-value-size
Lower MaxValue to 2GB
2015-10-28 12:20:47 -06:00
Ben Johnson
1786b6ae2f lower MaxValue to 2GB
This commit changes the maximum value size to 2GB so that tests can
run on 32-bit machines. There's really no reason to write a 2GB+
value to Bolt. It's not terribly efficient for large values.
2015-10-28 12:16:16 -06:00
Ben Johnson
a54ef72d71 Merge branch 'hvnsweeting-hvn-fix-doc' 2015-10-28 12:00:09 -06:00
Hung Nguyen Viet
40aeece092 typo and highlight 2015-10-28 11:59:29 -06:00
Ben Johnson
54e1e44866 Merge pull request #441 from pmezard/document-put-constraint
bucket: document Put() value must remain valid for the transaction
2015-10-28 11:54:20 -06:00
Ben Johnson
b4e20916f6 Merge pull request #445 from benbjohnson/reading
README: Add 'Reading the Source' section
2015-10-27 15:35:26 -06:00
Ben Johnson
54254e97b9 README: add 'Reading the Source' section
This commit adds a section to help people understand the
source better while reading it.
2015-10-24 13:31:18 -06:00
Ben Johnson
ee716d1410 Merge pull request #431 from brahmaroutu/support_power_z
adding seperate files to compile on IBM Power and Z
v1.1.0
2015-10-21 15:23:03 -06:00
Ben Johnson
12af751e86 Merge pull request #444 from pmezard/doc-bucket-lifetime
bucket: document buckets are valid only during the transaction
2015-10-21 09:30:33 -06:00
Patrick Mezard
e05e34c332 bucket: document buckets are valid only during the transaction
Issue #313
2015-10-21 10:55:50 +02:00
Ben Johnson
09dda9940c Merge pull request #442 from pmezard/mention-address-space-consumption
README: mention the memory map consumes a lot of address space
2015-10-20 12:05:15 -06:00
Patrick Mezard
b7f23b8e55 README: mention the memory map consumes a lot of address space
I have been bitten by this when running a simple application on a
Raspberry Pi 2. It had 3 stores: two 512M stores and one 128M. The
application refused to start the moment the first index grew from 512M
to 1G.

Bolt is really nice but it is easy to overlook this limitation,
especially with the note about supporting stores much larger than
*physical* memory.
2015-10-20 14:08:43 +02:00
Ben Johnson
07070579bd Merge pull request #439 from MJDSys/speed_up_test
In TestBucket_Delete_FreelistOverflow, use Cursor.Delete to remove records.
2015-10-19 08:38:39 -06:00
Ben Johnson
449a2c249d Merge pull request #440 from rogierlommers/master
Add example of NextSequence() usage to readme
2015-10-19 08:35:24 -06:00
Patrick Mezard
f8d7ef20e6 bucket: document Put() value must remain valid for the transaction
Issue #324
2015-10-19 10:42:28 +02:00