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.
it eventually fills up and we never insert another record. Rework append
table processing to be more resiliant, ignore the append table entirely in
the case of row-store objects.
../../../test/format/t.c: In function ‘startup’:
../../../test/format/t.c:204: warning: implicit declaration of function
‘mkdir’
../../../test/format/t.c:204: warning: nested extern declaration of
‘mkdir’
builds cleanly so I'm going to commit it). Change the extension API
handle methods to take the handle as their first argument, get rid of
the WT_EXTENSION_API.default_session method, instead, store a reference
to the enclosing WT_CONNECTION in the extension handle.
This push also includes a few changes that are part of creating a STEC
data source.
a new function wiredtiger_extension_api(WT_EXTENSION_API **pp).
Write some WT_EXTENSION_API documentation.
Remove WT_SESSION::msg_printf, add a new msg_printf extension function
instead, convert test/format to use it.
Quit using __UNUSED in the extension code, use explicit (void) casting,
it's cleaner.
working, but column-store still isn't).
Create a new cursor type, the data-source cursor; it has a "child" cursor
that's "owned" by the data-source layer. This means adding a new private
field to the WT_CURSOR structure for a data-source. Implementation is in
cursor/cur_ds.c.
Store the data-source configuration (currently only the key/value_format
strings) in the meta-data file.
Pass simplified configuration strings to the underlying data-source methods
("key_format", "value_format" and "append", so far, probably needs "overwrite"
as well).
Don't pass "owner" to the WT_DATA_SOURCE.open_cursor method, owner is
intended for some of the internal cursor types, like dump.
Some general renaming, use "uri" instead of "name" in the data-source
methods and docs.