Commit Graph

32 Commits

Author SHA1 Message Date
Alex Gorrod
ec9a451025 WT-2405 Switch test/format to use shared testutil_die 2016-02-19 01:44:58 +00:00
Keith Bostic
344a714c3d Upgrade copyright notices from 2015 to 2016. 2016-01-01 16:37:39 -05:00
Keith Bostic
ca7a3de5eb Rework test/format to use the WiredTiger RNG, not rand.
Give every thread its own RNG state so there's no competition for the
cache lines.

Initialize the random-number generator early so we catch all possible
configuration uses.

Remove duplicates of WiredTiger's macros.
2015-05-09 11:15:59 -04:00
Keith Bostic
a1ef7c4f38 Simplify Berkeley DB configuration, don't try and optimize for read-only
workloads.
2015-03-05 16:12:18 -05:00
Keith Bostic
1f9098871a Copyright notices: add MongoDB, update to 2015. 2015-01-04 14:07:56 -05:00
Keith Bostic
c2cb2d418a Simplify gcc.h, don't repeat the GCC atomic builtins, just use one version.
Break hardware.h up into gcc.h and lint.h (hardware.h is still there,
but it's mostly empty).
Remove need for gcc.h from various benchmarking/test programs.
2014-10-04 12:10:17 -04:00
Keith Bostic
fe644a307a Merge branch 'develop' into helium
Conflicts:
	test/format/bdb.c
2014-01-13 06:56:00 -05:00
Michael Cahill
3620321041 Maintain compatibility with older versions of BDB.
refs #841
2014-01-13 11:24:08 +11:00
Keith Bostic
e663539544 The BerkeleyDB 6.0 btree comparison function takes an additional argument,
a size_t reference, currently unused.
2014-01-11 15:24:24 -05:00
Keith Bostic
0841e6f19d Berkeley DB 6.X's application-comparison function takes a size_t reference
as an additional, 4th argument.
2014-01-10 12:12:30 -05:00
Keith Bostic
5b509b7220 Update copyright notices for 2014.
Move lang/java and lang/python into the public domain.
2014-01-07 10:30:12 -05:00
Keith Bostic
9aa469e13e Better/fixed support for huge keys/values.
Change the WT_ITEM::size field from type uint32_t to size_t.

Change test/format configuration to support large key/value items.

Ref: #808 and #70.
2013-12-16 12:55:50 -05:00
Keith Bostic
bdb57e3df6 Add support for a -h home argument so can easily run in a target directory. 2013-12-06 11:54:43 -05:00
Keith Bostic
9be66e1d26 Rework WT_UNUSED/WT_UNUSED_RET slightly: move GNUC macros out of misc.h
into their own include file "gcc.h", change the test programs to include
and use the definitions from that file.
2013-11-06 09:18:50 -05:00
Keith Bostic
963d37a4e6 Update copyright notice to 2013. 2013-01-01 09:45:50 +00:00
Keith Bostic
45c1e2a5a3 Move test program software into the public domain, if anyone wants to
cut-and-paste from it, that's fine with us.
2012-10-26 13:22:45 +00:00
Keith Bostic
90fc313f76 Don't use chdir(2), use an open argument to wiredtiger_open instead (using
chdir makes gdb unhappy).
2012-09-16 13:03:09 +00:00
Keith Bostic
e05164927c Make data_source and file_type constant, create a new field g.uri that's
the combination of the two.
2012-09-16 13:03:08 +00:00
Keith Bostic
376c7f71ed Move test/format runs into the subdirectory RUNDIR.
Turn on LSM runs but then #ifdef them out, they don't currently work.
2012-09-16 13:03:08 +00:00
Keith Bostic
e079a691c0 Minor renaming to better match the underlying cursor operations. 2012-04-10 08:42:37 +00:00
Michael Cahill
cf0bda6c9e Cleanup various build warnings with test/format. 2012-03-15 12:37:53 +11:00
Keith Bostic
402f8ff377 Cleanup pass: simplify the world and quit passing errors back through
the stack, just die if we find a problem.
2012-03-14 11:05:20 -04:00
Keith Bostic
ad0b442bcc BDB comparison code is always single-threaded, no reason to have multiple
key/value items, and we were inconsistent in how we declared them.
2012-03-14 11:05:19 -04:00
Keith Bostic
b3a8ff9589 Get rid of the global WT_ITEM key, every thread of control has to have
its own buffer.
2012-03-14 11:05:19 -04:00
Michael Cahill
12e95a3fa7 Apply style scripts to the test sources. 2012-02-24 20:41:03 +11:00
Keith Bostic
4879e63e5b More copyright cleanup. 2012-02-01 15:32:36 +00:00
Keith Bostic
bdc2635380 lint. 2011-10-07 17:37:31 +00:00
Michael Cahill
2856fecda7 Add a "reverse" collator extension, primarily intended for testing.
refs #118
2011-10-07 16:42:39 +11:00
Keith Bostic
098568563b Intermediate commit of new cursor code: this commit has mostly working
row-store cursor code, but completely broken column-store cursors (I
haven't done any work on them yet).  I'm about to try and re-work the
general-purpose walk code, and I want to have a solid reference point
to revert to.  Here's the laundry list:

Re-write the row-store cursor-next/cursor-prev functions to interact
cleanly with the other cursor functions, specifically after any cursor
operation returns successfully, a subsequent cursor-next/prev call is
supported.  The fundamental trick here is choosing the fields that a
cursor-search call sets, and then filling in the rest of the fields a
traversal requires as soon as cursor-next/prev is called.  The state of
a cursor is set in the WT_CURSOR_BTREE->iter_state field.  There's a new
"walk" function that fills in the walk stack from the root to a
specified page.  As part of this, the SESSION.srch structure will go
away, replaced by the WT_CURSOR_BTREE structure.

Implement cursor semantics for row-store: update fails if the key
doesn't exist, otherwise overwrites the value; insert fails if the key
exists, otherwise inserts a new record, unless the configuration boolean
"overwrite" is set, in which case insert inserts a new record if the
record doesn't exist, and overwrites any existing record; remove fails
if the key doesn't exist, otherwise removes the record.  Fail in all
cases if the application hasn't yet set a cursor key.

Flush memory after reading the page's write-generation value to ensure
that we do the read before reading anything from the page.  This is
necessary but not sufficient: the page's write-generation value could
still be cache, and that would be bad.  We need to either do an
additional memory flush before the read, in order to flush our
registers, or mark the write-generation field volatile.

Cursors now hold hazard references across calls (the page cannot be
discarded if a cursor references it).   This is necessary for the future
change where cursor will return pointers to in-memory page data.

The __wt_walk_first/__wt_walk_last functions no longer support starting
at a random page, no current callers of those functions used that
feature.

Write versions of the serial insert/update functions that don't take
SESSION.srch pointers, instead, they pass the specific fields they need,
in some cases taken from the WT_CURSOR_BTREE structure.

Write a version of the return-value function to use information from the
WT_CURSOR_BTREE structure instead of information from the SESSION.srch
structure.

Delete the WT_CURSOR structure WT_CURSTD_POSITIONED flag (never used),
add the WT_CURSTD_OVERWRITE flag to support the cursor->insert boolean
"overwrite".

Delete the WT_TOOSMALL error, no longer used by compression.

Add support to the format test program to test prev/next cursor
movements after operations.

Configure the format test program to configure the boolean "overwrite"
value on its cursors, that matches the old BDB DB.put semantics the test
program wants.

Change the format test program to close its cursor before calling
WT_SESSION.sync, now that cursors hold hazard references across calls,
WT_SESSION.sync will hang.

Add statistics to track read-next/read-prev calls, separate from read
(search-near) calls.

--HG--
extra : rebase_source : a7b386152cef2a2744df26121b06536e7066fc95
2011-08-26 15:08:10 +00:00
Keith Bostic
d43f543cfe Regularize naming -- everything is __XXX now.
Clean up at the start of every run, except for the __rand file.
Add a die() function, simplifies some error handling.
2011-07-31 11:39:54 -04:00
Keith Bostic
d5bbf29b59 Rename wts.h to be format.h, it's a general header, not a WiredTiger header.
--HG--
rename : test/format/wts.h => test/format/format.h
2011-07-29 11:59:47 -04:00
Keith Bostic
0d1b47a34e Rename test/bt to be test/format, give it a verbose error message,
automatically rebuild the CONFIG.example file so it stays up to date.

--HG--
rename : test/bt/CONFIG.base => test/format/CONFIG.example
rename : test/bt/Makefile => test/format/Makefile
rename : test/bt/bdb.c => test/format/bdb.c
rename : test/bt/config.c => test/format/config.c
rename : test/bt/config.h => test/format/config.h
rename : test/bt/s_dumpcmp => test/format/s_dumpcmp
rename : test/bt/t.c => test/format/t.c
rename : test/bt/util.c => test/format/util.c
rename : test/bt/vt => test/format/vt
rename : test/bt/vt.suppress => test/format/vt.suppress
rename : test/bt/wts.c => test/format/wts.c
rename : test/bt/wts.h => test/format/wts.h
2011-07-29 10:44:12 -04:00