Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Add RWTransaction.Put(). #5

Merged
merged 1 commit into from
Feb 1, 2014
Merged

Add RWTransaction.Put(). #5

merged 1 commit into from
Feb 1, 2014

Conversation

benbjohnson
Copy link
Member

@snormore I have RWTransaction.Put() working and it's running with testing/quick so it's doing some sweet randomized black box testing.

You can change the parameters of the quick tests with some command line arguments:

-quickchecks     The number of iterations to perform.
-quick.seed      The seed to use for randomizing.
-quick.maxitems  The maximum number of items to insert into a DB.
-quick.maxksize  The maximum size of a key.
-quick.maxvsize  The maximum size of a value.

It'll just insert randomly generated keys and values into DBs over and over again -- once per quickchecks. There's also a seed value you can use to reproduce a given set of data.

It does an individual write transaction and read transaction for every Put() and Get(), respectively. I ran it with 1M key/values per database and it seemed to be doing fine. I was on the plane while I was running it and it drained my battery extremely fast so I haven't had a chance to try larger DBs.

I also added two functions for copying the database:

(db *DB) Copy(w io.Writer) error
(db *DB) CopyFile(path string) error

benbjohnson added a commit that referenced this pull request Feb 1, 2014
Add RWTransaction.Put().
@benbjohnson benbjohnson merged commit b2a78a2 into boltdb:master Feb 1, 2014
@benbjohnson benbjohnson deleted the put branch February 1, 2014 17:42
heyitsanthony added a commit to heyitsanthony/bolt that referenced this pull request Jul 25, 2017
Writes pgidNoFreelist to the meta freelist page to detect when freelists
haven't been synced down.

Fixes boltdb#5
heyitsanthony added a commit to heyitsanthony/bolt that referenced this pull request Jul 25, 2017
Writes pgidNoFreelist to the meta freelist page to detect when freelists
haven't been synced down.

Fixes boltdb#5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant