Commit Graph

27 Commits

Author SHA1 Message Date
Susan LoVerso
5229ef8d6b WT-2437 Adjust expected error messages to support Windows.
Look for WT-specific portion of the message or detect Posix/Windows.
2016-03-01 12:50:15 -05:00
Susan LoVerso
c09b6acc7a WT-2349 Add test testing methods not supported.
Added error message to unsupported options and fixed several tests to
check for that message.
2016-02-10 13:15:44 -05:00
Michael Cahill
a03e095827 WT-2387 Fix the error string we test for next_random on column stores. 2016-02-09 12:46:22 +11:00
Keith Bostic
344a714c3d Upgrade copyright notices from 2015 to 2016. 2016-01-01 16:37:39 -05:00
Keith Bostic
f38bd7a327 Change the parameter to be called "sample_size" and to be a count of the
number of samples the application will perform (which might be 1000, or 0.1%).
2015-12-12 10:34:59 -05:00
Keith Bostic
2d2456b373 WT-2262: Add the new next_random_sample_percent configuration that
specifies a percentage of the tree to skip over before retrieving each
new record.  If next_random_sample_percent is configured, we first
retrieve a random record from the tree as a whole, and on subsequent
retrievals, skip forward the specified percentage of the tree; if
next_random_sample_percent is not configured, we use the previous method
of choosing a new leaf page from the entire tree on each retrieval.

Clarify bulk and next-random cursor documentation: there are several
methods allowed on bulk and next-random cursors (for example, reset,
reconfigure and close), don't try to list them. Instead reference the
principle method the application is expected to use (insert for bulk
cursors, next for next-random cursors).

Make cursor-open with next_random configured fail for column-store
objects, waiting until the next method is called seems unkind.

Rework the static random-cursor tests to smoke-test both forms of random
cursors.
2015-12-11 10:37:58 -05:00
Keith Bostic
5f0820c536 Assert cursor.next(random) always returns a key/value pair. 2015-12-05 16:05:56 -05:00
Keith Bostic
30f47ab983 WT-2032: WT_CURSOR.next configured with next_random=true, on pages that
only have inserted items (that is, just a big skip list), always return
the middle item of the list. Change it so we return a random entry in a
large skiplist, and update our test suite to test both cases. (I bet
this mostly just fixes application unit tests, mostly, but that's a few
less support calls, regardless.)
2015-08-05 18:16:55 -04:00
Michael Cahill
674170067c Add a __setitem__ to cursors in the Python API, remove lots of boilerplate c.set_key ... c.set_value ... c.insert code. 2015-03-31 14:26:00 +11:00
Michael Cahill
0fb9c1d89f Check that every scenario has a unique name within its test.
refs #1813
2015-03-25 14:00:57 +11:00
Keith Bostic
1f9098871a Copyright notices: add MongoDB, update to 2015. 2015-01-04 14:07:56 -05:00
Keith Bostic
be41686762 update a comment. 2014-06-14 13:23:19 -04:00
Keith Bostic
e5e3b013d4 Change WT_CURSOR.next-random to handle insert lists where the updates
aren't visible to the running thread; admittedly an edge case, but it
seems best if cursor calls don't return references to updates that may
subsequently disappear.

This change should close issue #1064.
2014-06-14 13:20:26 -04:00
Keith Bostic
38523f8741 Confirm WT_CURSOR.next_random works for both in-memory and on-disk
formats.
2014-06-14 12:45:34 -04:00
Keith Bostic
f54c79d89e Use self.reopen_conn() instead of rolling our own. 2014-06-14 12:33:11 -04: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
7b8e1086a8 If the default leaf/internal page size is 4KB, then setting it to
something smaller requires setting the allocation size as well,
because page sizes must be multiples of the allocation size.
2013-05-23 12:32:21 -04:00
Keith Bostic
99ca9955f1 Typo, two tests with the same name. 2013-02-13 10:45:23 -05:00
Keith Bostic
963d37a4e6 Update copyright notice to 2013. 2013-01-01 09:45:50 +00:00
Keith Bostic
016a035d3a Having a next-random cursor open could block transactions or checkpoints
because the cursor.reset method failed with not-supported.   Two fixes:
explicitly change next-random cursors to call the underlying reset method,
they're btree handles so it makes sense for them.  Additionally, make the
default cursor.reset method be a no-op rather than a not-supported error,
bulk cursors don't want to block transactions/checkpoints either.
2012-09-13 17:00:37 +00:00
Keith Bostic
6d3dc3c6b8 Now that we export cursor.compare; move the cursor positioning for
session.truncate back out of the cursor layer and into the session
layer (ref #314).

Change session.truncate to support any cursor position for range
truncation, not just keys that are known to exist.  This also
allows us to simplify the testing, because row-store can now deal
with "implicit" keys.

This is an API change, note in the "Upgrading" section of the docs.
2012-09-07 20:54:19 +00:00
Keith Bostic
7a3b1353f0 We're sending a mixed message -- remove the copyright notices from files
where we've placed our content in the public domain.
2012-08-15 17:46:54 +00:00
Keith Bostic
aa1b8bb078 Remove the cursor.reconfigure method, and replace it with documentation
showing how to "reconfigure" cursors using the session.open_cursor
method to duplicate them with different configuration strings.
Close #282.
2012-08-03 18:43:03 +00:00
Keith Bostic
e43ca0ac63 replace tabs with spaces. 2012-07-28 12:06:01 +00:00
Keith Bostic
71442cc95f Change cursor.equals to return a standard error value and store the cursor
equality result in a separate argument: close #274.

Add connection.is_new to the list of methods in the SWIG file that don't
require error handling, add a connection.is_new smoke test to the test
suite.

Add a connection.get_home smoke test to the test suite.
2012-07-28 11:56:53 +00:00
Keith Bostic
593431a4d2 review/rework cursor next-random test. 2012-07-27 21:40:13 +00:00
Keith Bostic
755b6cbfc2 Lightly modified diff from Rolf's random-cursor test pull request. 2012-07-27 16:12:22 +00:00