191. var_deref_op: Dereferencing null pointer "cursor".
Coverity is concerned we're testing for cursor == NULL and subsequently
not testing, just indirecting through the cursor handle. It can't
happen because there's only one case where it's interesting, when
session_op == cnt, and we catch that case by initializing session_op to 0.
Add some additional code just to ensure it can never happen.
Change compaction to attempt compaction any time it looks likely we can
recover the last 10% of the file, and, for now, to only attempt to
recover that last 10% of the file.
Don't rewrite a block if there isn't a useful available block in the
first 90% of the file. (Previously, compacting the whole file in one
pass could end up re-writing blocks to available blocks at the end of
the file which isn't useful, and, in some cases, even extending the
file.
The reason we're only compacting the last 10% of the file is that we
will need to checkpoint periodically otherwise re-written blocks, which
should be the new, available blocks for compaction, won't be considered
because they're still in use. Doing that automatically will be the next
set of changes.
Change compaction to use first-fit allocation instead of best-fit so
we're always copying to the beginning of the file if at all possible.
Add WT_SESSION::create "block_allocation" configuration string, allows
applications to configure first-fit. Change test/format to use the
first-fit algorithm 20% of the time.
Remove the WT_SESSION.compact "trigger" configuration string, it's no
longer used.
Rename WT_SESSION::create "allocation_size" configuration string to
"block_allocation_size" to match "block_allocation" and
"block_compressor" configuration strings.
Inline the block extension search functions, they get called a lot.
Add "compact" verbose debugging string.
Fix a bug where a spinlock could be left held by compaction.
Now, the database is configured for "none", "fast" or "all" statistics,
and each cursor is configured for "fast" or "all" statistics, with the
additional flag "clear". A cursor's statistics configuration must match
the database statistics cursor, defaulting to the current configuration.
The statistics_log configuration no longer defaults to "fast", it dumps
whatever the database is configured for.
Rename all of the macros from WT_RUNSTAT_XXX to WT_STAT_FAST_XXX.
Reference #715.