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.
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.
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.
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.
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.
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.
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.
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.