| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dumping with a projection, the dumped metadata associated with the
table is modified so that the list of columns matches the list from the
projection, and the value format corresponds to projected format. We use an
open cursor using the projection to obtain the value format to show, that
requires a slight reordering of when cursors are opened in the dump utility.
Also fix a problem in the JSON dump cursor which did not handle projections.
Added tests for dump with projections, including tables and indices using
the normal dump formats, and tables dumped using JSON dump format. Tables
are also dumped with projections and then loaded into the modified table
format to be checked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-283 Add WT_SESSION:alter method
* Add new method to ex_all.c
* Typo
* Add testing and fixes for LSM, column groups and indexes for alter.
* Fix WITH_*_LOCK macro usage.
* Whitespace
* Change table alter to not walk down into column groups and indexes.
* Whitespace
* Use base file meta config and compare strings.
* Add skip stat
* Add alter support to wt command.
* Add util_alter.c to SConstruct
* Fix subsection in doc.
* Add alter thread to test/format
* Swap the value we send into alter in test/format.
* Add data-source alter support
* Only alter access pattern hint in test/format.
* Make LSM alter not exclusive.
* Whitespace
* Use access_pattern_hint in example.
* Include base lsm metadata configuration.
* Fix text/comment.
* Minor changes from review comments.
* Unused variable warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2402 Pad structures to avoid cache line sharing.
We previously used compiler alignment to avoid cache line sharing, which
is problematic because we don't allocate memory with the necessary
alignment, so some behavior is undefined. Instead, this change merely
pads structs to ensure they won't share a cache line when allocated in
an array.
* Add some #if barriers around the new union's
* Change where CACHE_LINE_PAD defines live and rename _START to _BEGIN
* Add ax_check_compile_flag to aclocal
* Lint
* Allocate the TINFO structures separately to minimize false sharing.
* Comment cleanup to make spell happy.
* Pad the read-write locks to avoid false sharing.
* Add a comment as to why we're adding -std=c11 to the compile.
* whitespace
* Add asserts that we're padding the structures we intended to pad.
Minor cleanup, don't use #defines outside of the WiredTiger namespace.
|
|
|
|
|
|
|
|
|
|
| |
* Default to an initial 250 hazard slots and grow from there.
* Make hazard_max undocumented, add an internal limit of 1000 eviction walks.
* If we grow the hazard pointer array, schedule the original to be freed when the database is closed.
* Update test_bug011 back to stress eviction with the hard-coded limit of 1000 active trees. Only run during "long" tests.
|
| |
|
|
|
|
| |
(#3181)
|
|
|
|
|
| |
* After a split, child references in an internal page can end up in a different location in the index array. WiredTiger maintains a hint of the expected offset, and searches if the expected reference is not found at the location of the hint. We now search in both directions starting at the hint: the old hint can be wrong in either direction but usually not by much.
* Mark the index hint volatile: it would be incorrect if the compiler read it multiple times rather than using a single copy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inserting multi-megabyte values (#3171)
Don't configure the lookaside table as soon as eviction is stuck, only
configure the lookaside table if update/restore reconciliation fails and
there's reason to believe the lookaside table will be effective, based
on the updates that were skipped during the update/restore reconciliation.
The evaluation of whether an update/restore reconciliation would make
progress was a check for a single block rewrite with no updates to
restore or at least one update chain without a skipped entry. Check
more deeply, if there's any block without updates to be restored or at
least 10% of the update chains didn't have skipped entries, assume we're
making progress.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change compaction to use database-wide checkpoints: rather than processing each file separately and checkpointing after each time we compact a file, do a compaction pass over all of the files then database-wide checkpoints.
* Save/restore the WT_SESSION_CAN_WAIT, WT_SESSION_NO_EVICTION flags set during checkpoint, the session handle may be used for other tasks in the future.
* There's no need to hold the checkpoint lock while opening the metadata cursor.
* When adc1cfb went in (WT-2394, gather handles for compaction first, before doing the actual compaction), we broke data-source support for compaction. Add back in data-source support and simplify the __wt_schema_worker() code, it no longer needs to know about LSM or data-source compaction.
* Disallow LSM compaction in an existing transaction (LSM didn't check, but there's no reason to special case LSM compaction so it can run in an existing transaction, and it's potentially confusing, or fragile if LSM compaction some day requires checkpoints).
* Do a checkpoint after removing the key/value pairs, otherwise we might not find anything to work with in our compaction pass.
* Replace WT_SESSION_LOCK_NO_WAIT with per-lock operation flags. If we set WT_SESSION_LOCK_NO_WAIT and the lock is acquired, then the underlying operation eventually needs to acquire its own locks, having the WT_SESSION_LOCK_NO_WAIT flag set in the session may not be correct.
|
|
|
|
| |
(#3178)
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-3053 Python and Java support use internal WiredTiger functions
Remove calls to internal WiredTiger functions from the Java and Python
APIs, meaning we no longer need to expose a few more internal WiredTiger
functions.
* Try using SWIGWIN instead of _MSC_VER for the swig windows #ifdef.
* Another try at a Windows #ifdef in the SWIG code.
|
| |
|
|
|
|
|
| |
* Rewrite the demo file system example to not require internal WiredTiger functions.
* Replace calls to __wt_calloc/__wt_free with C library calloc/free/calls, avoid using internal WiredTiger functions.
|
| |
|
|
|
| |
This supports a model where one session performs updates in a transaction after creating a named snapshot and other sessions can use that snapshot and read the updates. In other words, they see exactly what the updating session sees.
|
|
|
|
|
|
| |
Also force the type of WT_BTREE_MAX_OBJECT_SIZE, there's no guarantee all
systems will consistently declare UINT32_MAX.
|
|
|
|
|
|
|
| |
* Don't check for blocked eviction with in-memory workloads. The cache can become full of clean pages so eviction can't make progress, but application threads are not blocked. We shouldn't fail in this case.
* Directly track if reconciliation makes progress. Give up on page rewrites that don't use any updates.
|
| |
|
|
|
|
|
|
| |
* We still want to get aggressive and/or "stuck" if all we do is rewrite pages over and over.
* Reset the eviction skip count in tiny trees: we may never have enough pages to hit the target.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2984 Keep sufficient history in the metadata for queries.
Since we treat the checkpoint transaction specially, we also have to
track the amount of history required for the metadata specially.
Previously, there was a window where a query started while a checkpoint
was running could fail to see the results of the checkpoint when it
queried the metadata.
* Remove the unused "session" argument to WT_IS_METADATA.
|
|
|
| |
While in the area, fix sending "config={values}" to extensions: just the values should be passed in.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* WT-3004 lint: declare functions that don't return a value as void
__wt_txn_get_snapshot() no longer returns a value, which means
__wt_txn_cursor_op() and __curds_txn_enter() no longer return values.
* Run s_void by default, enhance the output to make it clear where to
add false positives.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-3002 Allow applications to exempt threads from eviction.
* Update wiredtiger.in.
* Rename config key, make WT_SESSION::reconfigure only apply to passed-in values.
Add a basic smoke test of WT_SESSION::reconfigure.
* whitespace
* Update.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2968 Don't open file handles on backup.
* whitespace, KNF
* Add timing to test and populate with thousands of tables.
* Remove macro and meta function. Add schema backup check function.
* Refactor new function per review.
* Remove cursor backup entry data structure. Simplify test a bit.
* Schema ops walk file list in memory instead of on-disk file.
* Set connection list entry to NULL before freeing memory.
* Remove call to backup_stop on error. Errors are handled above.
* Add comment
* Fix test description.
* Fix new test to use new DataSet code.
|
|
|
|
|
| |
* Add a write barrier in front of __wt_cond_signal() to ensure the caller's flags meant to cause a thread to exit are seen by the thread.
* Make the LSM start/stop worker thread loops look the same.
|
|
|
|
| |
filter. (#3099)
|
|
|
| |
Eviction tuning to help improve the workload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix a bug found by inspection in LZ4 code: we're going to offset the destination buffer by sizeof(LZ4_PREFIX), so we need to offset the destination buffer length by the same amount.
* Prettiness pass through the snappy driver so it and the zstd driver look the same, minor cleanup in zlib.
* Add the compression_level configuration option to the zstd extension initialization function so it's possible to set the compression level from an application.
* Fix a bug in zlib raw compression: the destination buffer size (dst_len), can be smaller than the target page size (page_max), use the smaller of the two values to set the target compression size.
* The zlib raw compression function could return without calling deflateEnd on its z_stream structures, potentially leaking memory and scratch buffers.
* If the default reserved bytes for zlib raw compression isn't sufficient, we fail on compression of what might be very large blocks. We don't have information on how many bytes need to be reserved in order to know the final deflate() will succeed, and the default value was experimentally derived, for all we know there are workloads where the default will fail
a lot. Add a fallback before failing hard, try with 2x the default reserved space.
|
|
|
|
|
|
| |
* Checkpoint must not skip writing a leaf page that's never been written before.
* Split out the code to make a tree dirty: checkpoint needs it, and it's relatively expensive to dirty a page.
|
|
|
|
| |
writing (#3096)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__evict_stat_walk(), __wt_curstat_cache_walk(), query_docs() don't
return error values, switch to void declarations.
__evict_stat_walk() unused variable, bytes_inmem.
WT_CURSOR.{get_key,get_value} and pthread_join can all return errors,
assert they don't fail.
KNF, whitespace
Update spelling list.
Add a new test utility macro, testutil_assertfmt(), so it's possible
to assert with more expansive error messages.
|
|
|
| |
Exposed via a new 'cache_walk' statistics configuration option.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
high level locks (#3086)
* WT-2955 Add statistics tracking the amount of time threads spend waiting for high level locks
Sort the statistics categories so it's easier to find stuff, no real change.
* Add counters and usec wait times to long-term locks (currently the
checkpoint, handle-list, metadata, schema and table locks).
* mutex.i:295:26: error: conversion to int64_t {aka long int} from long
unsigned int may change the sign of the result [-Werror=sign-conversion]
[t->slot_usecs] += WT_TIMEDIFF_US(leave, enter);
* Rename the lock statistics so they group together.
Split lock wait times between internal and application threads.
* Separate the connection's dummy session initialization out into its own
function, that way it's clear what we're doing.
* The session's connection statistics are fixed when the session ID is
allocated, so we can cache a pointer to them and avoid u_int divisions
(which are currently about the slowest thing you can do on a modern
architecture).
* A slightly different change: instead of caching a reference to the
connection statistics, cache the offset into the array of statistics
pointers, that way we can avoid the integer division when updating
almost all statistics.
* Review comments:
Add comments describing the use of statistics array offsets in lock
tracking.
Rename WT_STATS_FIELD_TO_SLOT to WT_STATS_FIELD_TO_OFFSET.
Whitespace cleanup.
* __wt_cache_create() doesn't need to call __wt_cache_destroy() explicitly,
if the connection open fails at any point, __wt_cache_destroy() will be
called as part of that cleanup.
* Append the suffix "_off" to the spinlock structure statistics field
names, clarify they're offsets into the statistics structures.
|
|
|
| |
This is not a bug fix, it's a change to make the code safer against future misuse.
|
|
|
|
|
|
|
|
|
|
|
| |
is stuck (#3088)
Try to evict pages that exceed memory_page_max even if the transaction ID isn't increasing.
Workloads that insert large values checking only for the transaction ID moving forward can lead to very large in-memory pages. Allow the page to exceed the split size, but not the configured maximum.
Skipping such pages is a performance optimization - allow the optimization to work as long as pages are between split size and maximum size.
Also don't require so many entries on a leaf page to trigger a split when there are large values.
|
|
|
|
|
|
|
| |
(#3069)
Only available for in-memory configurations, designed to be used for
applications that maintain a small amount of content that is required
for correctness.
|
|
|
| |
If a system call to retrieve a timestamp fails it will now result in a panic. We couldn't find any case where that's a real possibility.
|
|
|
| |
This saves locking and scanning the list of active handles for read-only workloads, which can be time consuming when there are many tables.
|
|
|
|
|
|
|
|
|
| |
* WT-2920 New eviction statistics
Add "application_eviction" statistic, the usecs application threads
spent doing eviction.
* Add a finer grained timer around eviction as well.
|