Commit Graph

4674 Commits

Author SHA1 Message Date
Keith Bostic
f1977bb374 WT-2316: WT_CURSOR.prev out-of-order returns, fix a split race.
Simplify the __page_descend() function, it only needs a WT_PAGE, it
doesn't need the WT_REF for the page, hopefully that makes it easier
to understand.

Add comments to each of the races we have to address, try and describe
the case each check is intended to fix.
2016-01-11 17:13:21 -05:00
Keith Bostic
70c8b7816c WT-2316: WT_CURSOR.prev out-of-order returns, fix a split race.
Add diagnostic next/previous key order checking after calls to
WT_CURSOR.{search,search-near}.
2016-01-11 11:54:08 -05:00
Keith Bostic
045fe19284 WT-2314: review comments, integrate the notfound-ok and restart-ok
booleans into the list of standard __wt_page_swap/__wt_page_in flags,
clarify a comment, the error returns come from page-in.
2016-01-04 18:53:51 -05:00
Keith Bostic
e4d8a1732b WT-2314: better error handling in the page-swap function and callers. 2016-01-02 17:04:39 -05:00
Keith Bostic
344a714c3d Upgrade copyright notices from 2015 to 2016. 2016-01-01 16:37:39 -05:00
Keith Bostic
63938fdd99 Merge branch 'develop' into wt-2073-metadata-cleanup 2015-12-30 15:35:10 -05:00
sueloverso
44463c5f9e Merge pull request #2386 from wiredtiger/wt-2276-checkpoint-decode
WT-2276 decode checkpoints via 'wt list -c' and via standalone Python utility.
2015-12-30 14:23:57 -05:00
Keith Bostic
f48819c746 whitespace 2015-12-29 17:27:19 -05:00
Mark Benvenuto
7974068e21 WT-2311 Support Sparc 2015-12-29 16:17:24 -05:00
Keith Bostic
6df6c29e77 WT-2307: add HAVE_DIAGNOSTIC checks for cursors not returning keys
out-of-order.
2015-12-28 17:10:05 -05:00
Keith Bostic
9f593e581e Set the cursor last-operation value to reset when we reach not-found on
a cursor movement.
2015-12-28 15:36:23 -05:00
Alex Gorrod
afb0edb67c WT-2307 workaround for cursor next bug.
Detect when a cursor next returned an invalid result and retry
the next operation. Horrible since it adds a comparison into each
cursor next, but fixes the symptom until we can fix the underlying bug.
2015-12-28 15:36:22 -05:00
Keith Bostic
66d20d9423 WT-2299: clean up a couple of places where upper-level WiredTiger code is
reaching into the block manager.
2015-12-20 13:27:22 -05:00
Keith Bostic
9b9ada00bd whitespace 2015-12-20 12:45:55 -05:00
Keith Bostic
967751cb0e Merge pull request #2390 from wiredtiger/wt-2281-os-page-size
WT-2281: Dynamically query OS for VM page size
2015-12-19 16:01:06 -05:00
Keith Bostic
3e083d409c Rename "get_pagesize" to "get_vm_pagesize", WiredTiger has too many
"page" things already, avoid confusion.

Minor whitespace.
2015-12-19 15:56:31 -05:00
Keith Bostic
12b76d6ad8 Whitespace, spelling update. 2015-12-19 15:45:31 -05:00
Andrew Morrow
86fc77c2da WT-2279 Add barrier and spinlock ops for s390x 2015-12-18 18:40:11 -05:00
Keith Bostic
52defc697d Remove WT_SESSION.compaction, replaced by WT_SESSION.compact_state. 2015-12-16 13:36:17 -05:00
Keith Bostic
6c144b89c5 WT-2290: when re-writing a multi-block page for compaction, with
the goal of moving the block to a new location in the file, the
reconciliation code to avoid writing blocks that already exist on
disk was working correctly, and we were skipping writes, causing
the compaction to fail.

Turn the compaction success/failure boolean into three states:
not-running, running, and running-successfully, then change
reconciliation to ignore block reuse if compaction is running.
2015-12-16 12:37:37 -05:00
Mark Benvenuto
8bc1ff0a58 WT-2281: Dynamically query OS for VM page size 2015-12-14 18:02:30 -05:00
Keith Bostic
dd13b348ad Add counts of the pages reviewed, skipped and written during a compaction
pass, report those statistics and the overall state of the file when the
compaction pass completes.
2015-12-14 16:59:52 -05:00
Keith Bostic
1bac36c577 __wt_ref_info() and __ref_is_lef() no longer need a WT_SESSION_IMPL
argument, remove it.
2015-12-14 14:52:43 -05:00
Keith Bostic
baf847016b gcc47 with [-Werror=maybe-uninitialized] reports we can end up with type
uninitialized in __ref_is_leaf() (based on a call to __wt_ref_info()).
It's not really possible because the path where type isn't set is a path
where we panic because the WT_ADDR structure has an impossible type.

We already ignore the __wt_ref_info() error return in one path, and
there are only two paths that care about the returned type; remove the
error check from __wt_ref_info() and set type to 0 in the failing case
(the same value we use when there's no WT_REF addr to check), the code
that calls this function already checks addr on return.

This simplifies __ref_is_leaf() slightly, it now returns a boolean
instead of an error code with a boolean pointer argument.
2015-12-14 09:18:06 -05:00
Alex Gorrod
8677edeed2 WT-2262 Split btree walk into separate walk functions.
Allow a value of 0 to next_random_sample_size, it's the default so
it doesn't make sense to disallow it.
2015-12-14 04:53:23 +00: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
e6550aed80 Change WT_READ_SKIP_LEAF to skip all leaf pages; rename the ignoreleafcntp
variable to be skipleafcntp, and it continues to skip some number of leaf
pages (but is no longer dependent on WT_READ_SKIP_LEAF being set).
2015-12-12 07:54:28 -05:00
Keith Bostic
f36f48b330 Merge branch 'develop' into WT-2262 2015-12-12 07:37:02 -05:00
Keith Bostic
e76f660ece Instead of creating a fake WT_BLOCK structure, drive the allocation-size
argument all the way down the function stack, that way we won't break if
the WT_BLOCK structure changes.

Flip the argument order for __wt_block_ckpt_decode() to match the other
functions.

Have __wt_block_ckpt_decode() take a WT_SESSION, rather that doing that
cast outside of the WiredTiger library itself.

Lint: cast szvalue.val in util_list.c to be a size_t, convert to a uint32_t
when we get into the WiredTiger library.
2015-12-11 17:42:39 -05:00
Don Anderson
de1a69503d WT-2276. Make a public function for converting cookies that does not
rely on WT_BLOCK.
2015-12-11 16:05:31 -05:00
Keith Bostic
8cd9203056 WT-2279: whitespace consistency. 2015-12-11 14:28:27 -05:00
Mark Benvenuto
6699ba76b6 WT-2265: Correct PPC64 barriers
Use the cheaper lwsync for read and write barriers. lwsync only allows
store#load re-ordering.
2015-12-11 10:47:16 -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
018824630c Merge branch 'develop' into WT-2262 2015-12-11 07:52:46 -05:00
Keith Bostic
f46de1498b WT-2284: macro error, #define should have been #undef. 2015-12-11 06:46:21 -05:00
Michael Cahill
bf3deca2d2 Merge pull request #2368 from wiredtiger/wt-2246-faster-column-appends
WT-2246: faster column appends
2015-12-11 17:01:53 +11:00
Alex Gorrod
4bba3a3865 Merge pull request #2366 from wiredtiger/wt-2060-statistics
WT-2060: minor statistics cleanup.
2015-12-11 16:01:24 +11:00
Keith Bostic
c747910391 Review comment from Michael: I'd prefer a macro called WT_SESSION_META_DHANDLE
that takes a session and looks up the data handle session->meta_cursor to find
the data handle for this one case. This only works on btree cursors (so the
name is misleading) and is only ever used on session->meta_cursor.
2015-12-10 16:07:26 -05:00
Keith Bostic
2dee94f2d2 Merge branch 'develop' into wt-2073-metadata-cleanup 2015-12-10 15:33:44 -05:00
Keith Bostic
4631ec39c3 WT-2246: Don't use the maximum record number (UINT64_MAX) to flag an
append search, use WT_RECNO_OOB instead, UINT64_MAX is a valid record
number, we could theoretically legitimately want to search for it.

Add tests that basic CRUD operations work on the maximum possible record
number.

Fix overflow bugs in the variable-length column-store page-search and
append-list reconciliation.
2015-12-10 15:00:50 -05:00
Keith Bostic
ae4784f948 Merge branch 'develop' into wt-2246-faster-column-appends 2015-12-10 09:51:54 -05:00
Keith Bostic
0fa23caa1d WT-2262: don't overload the __wt_tree_walk walkcntp variable, use a new
variable in order to skip some number of leaf pages.
2015-12-10 09:20:36 -05:00
Keith Bostic
bab2c74925 Merge branch 'WT-2262' into WT-2262-keith 2015-12-10 08:59:06 -05:00
Keith Bostic
7a7b361bd6 Merge branch 'develop' into WT-2262 2015-12-10 08:55:25 -05:00
Keith Bostic
47e4025375 WT-2177: Don't ignore error return from __wt_epoch(), fix types across
assignment, long to uint32_t.
2015-12-10 07:23:46 -05:00
Alex Gorrod
114626e7e2 Merge pull request #2375 from wiredtiger/wt-2177-rand-seed
WT-2177 Add an optional random seed to WiredTiger rand implementation
2015-12-10 14:34:17 +11:00
sueloverso
8d4e75d1d0 Merge pull request #2371 from wiredtiger/wt-2235-printlog-hex
WT-2235. Changes to wt printlog to add -x option and remove -p.
2015-12-09 13:24:59 -05:00
Don Anderson
4a225dd68a WT-2235. Share an array used for converted binary to hex. 2015-12-09 12:04:41 -05:00
Keith Bostic
ccb3274781 Merge branch 'develop' into wt-2073-metadata-cleanup 2015-12-09 09:45:00 -05:00
Keith Bostic
609a8c444a Merge branch 'develop' into wt-2060-statistics 2015-12-09 09:43:05 -05:00