| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
| |
(#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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* SERVER-26753 Don't spin on a read-lock in a tight loop.
We could be starving a thread that we are waiting on of CPU.
* Switch to yielding on rwlocks rather than sleeping.
* Revert the attempt to be clever when spinning on rwlocks.
* Spin getting a read lock while it is available to readers.
|
| |
|
| |
|
|
|
|
| |
writing (#3096)
|
|
|
| |
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.
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* WT-2942 Verbose messages should not have newlines.
* Fix another set of ERR/RET macros and __wt_verbose calls including newline
characters.
|
| |
|
|
|
|
|
|
|
| |
Having _FAST_ macros gives an impression that when we use them,
we are collecting fast statistics only, which is not true.
Except when statistics=none is set, we collect all the stats.
This change removes _FAST_ macros and modifies the basic macros
to only collect stats when statistics=none is not set.
|
|
|
|
|
|
|
|
|
| |
Some workloads create "deserts" within a tree where no good eviction
candidates can be found (e.g., zipfian distributions, append-only
workloads, etc.). Rather than walking all the way through such
regions, give up and try in the opposite direction next time.
Also add a statistic for the eviction empty score.
|
|
|
|
| |
Also avoid eviction of dirty pages entirely in the eviction server if
worker threads are configured.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add --enable-crc32-hardware configuration option (configured on by default), which allows CRC32 hardware support to be turned off.
* Move the CRC32 implementation in software from the x86-specific code to software/checksum.c, leave the x86-specific code in x86/crc32-x86.c.
* Move the pointer to the checksum function from a file static to the WT_PROCESS.cksum field, change the __wt_cksum_init() function to set that field.
* WT-2882 Create CRC32 Hardware implementation for ARM8
* Change "cksum" to "checksum" everywhere (hopefully) no semantic changes.
|
|
|
| |
Some functions return an error code even though they don't need to. That adds complexity to our code. Switch to returning a void.
|
|
|
|
|
| |
The only thing that stops us from turning on the clang -Wpedantic flag
is passing pointers of various types to printf(3) functions, using the
%p format -- cast the arguments.
|
|
|
| |
Remove the GCC "cold" attribute from __wt_verbose(), it includes the flag test and so has to always be called. Instead, set the GCC cold attribute for the __wt_eventv() function which __wt_verbose() calls, so we get good branch prediction, the verbose flag test will almost always fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#2993)
* SERVER-25846 Coverity analysis defect 99861: Dereference after null check
Now the __wt_cond_alloc, __wt_cond_wait_signal and __wt_cond_signal
functions can panic on failure, they potentially indirect through the
WT_SESSION handle to panic the WT_CONNECTION structure. Fortunately,
they should not be called with a NULL WT_SESSION handle, remove the
tests for that condition, making Coverity happy.
* Missed a call to __wt_cond_wait that passed an explicit NULL WT_SESSION;
replace the NULL with the existing session handle.
* minor whitespace cleanup during condition variable review.
|
| |
|
|
|
|
|
|
| |
* It isn't safe to assert that a lock isn't held before acquiring it.
* Signal the eviction server to speed up connection close.
|
|
|
|
|
|
|
|
|
|
| |
A set of changes to the eviction algorithm including:
* Fix a bug in how many items can be added to the urgent queue
* Have the eviction server sleep less so it recovers from disruptions faster.
* Only have application threads evict dirty pages if they are blocked on the dirty trigger.
* Swap eviction queues when one becomes empty.
* Have the eviction server populate the "other" queue whenever it notices that it isn't full.
|
|
|
|
| |
group. (#2983)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix bugs related to reconfiguring eviction settings.
The code to support reconfiguring eviction worker threads had
several bugs. Implemented an abstracted utility thread group API
and switch eviction workers over to using the new abstraction.
* Remove unused function from new thread group API.
* Commit auto-generated files.
* Be more careful cleaning up on error in thread group code.
* Fix uninitialized variable.
* Ensure thread group structures are cleared after destruction.
This is necessary since the structure is re-used for eviction workers
when recovery is run.
* Remove util and worker as notions from thread group as per review feedback.
Implement other feedback review as well.
* Fix a bug where application threads could attempt to help with eviction
before the server is setup.
Happens if using a shared cache so the cache size starts out at 0.
* Remove _util_ prefix from thread group functions.
* Add session name to thread group. Fix some comments and whitespace.
* Restore error return path.
|
|
|
|
|
|
|
|
| |
In some patterns of index lookups, we don't want the second cursor in a
session to attempt forced eviction: it will just stall itself to no
purpose.
Expand test case added testutil_assert for failure condition and reduced test run length. Also cosmetic changes: remove unneeded vars, var declaration reordering, var renaming.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2847 Merge fair locks into read/write locks.
Merge the fair-lock implementation into the read/write lock implementation
(fair locks were the same as the read/write lock's write lock), add a new
read/write "is locked?" function for diagnostic tests.
* Rename the WT_RWLOCK "users" field to be "next", it makes the code
easier to read (and we already depend on "next" not being a keyword,
WT_CURSOR.next).
* Extend a comment.
* aspell does not know amongst!
|
|
|
|
|
|
|
|
|
|
| |
* The pthread mutex implementation of spinlocks lock/unlock functions didn't check the underlying pthread_mutex functions for failure. Panic if pthreads fails.
* Change condition mutex functions to not return errors.
* Change __wt_verbose() to not return errors.
* Make a final panic check before writing anything.
|
|
|
|
|
|
|
| |
* Add the gcc "cold" attribute to the verbose, message, and assorted error functions (informs the compiler that the function is unlikely to be executed).
* Add the WT_IGNORE_RET() macro that ignores return values in the handfull of places we want to ignore return values.
* Replace calls to fprintf() in the utility with calls to util_err(), replace local variable names in error messages with class names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, get multi-threaded writes by dialling down the eviction dirty trigger.
Change eviction_dirty_* defaults (to 20/5).
Make sure all files are available for eviction before starting fsync.
Take more care excluding clean files from checkpoints.
Only use scrubbing mode when there is minimal cache pressure.
Avoid penalizing read-only operations with dirty eviction targets.
Enable scrubbing when eviction is keeping space available in cache.
Add stats for checkpoint scrubbing phase.
Improve cache scrubbing with big caches and slow I/O.
Use the rate of bytes written from cache to decide how long to wait for
the dirty bytes to come down.
|
|
|
|
| |
Schema operations for this purpose are table level methods on WT_SESSION handles.
|
|
|
|
| |
Previously, if both a custom and the default error streams failed to
write it caused infinite recursion.
|
|
|
|
|
|
|
|
| |
* WT-2793 Remove very long running config. Rename the one we run.
* Fix overflow stats. Make 130K overflow test use btree.
* Add line to upgrading doc stating stat field removed.
|
|
|
| |
Separate cache write statistics into checkpoint and non-checkpoint I/O.
|
|
|
|
| |
The increment and decrement were backward, so they never reported positive values.
While I was there make the statistics macros consistent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a statistic for the amount of cache used for page images vs other objects
* Reset the "maximum page size" statistic each checkpoint
* Add a separate queue for urgent eviction, replaces existing WOULD_BLOCK eviction mode
Until now, the eviction server has had to walk the cache to find pages that
would otherwise block application threads. This change allows threads to put
those pages directly on a queue that is checked before ordinary LRU eviction.
* Don't queue pages for urgent eviction when eviction is disabled in a tree.
Decouple evict_queue_lock and the individual queue's evict_lock in
__evict_get_ref. Don't block the eviction server if there are many
application threads waiting on a queue.
* Take care with the urgent queue.
Entries in the urgent queue cannot be skipped or they will not be considered again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Randomize visits to trees that use a tiny fraction of the cache.
Other general eviction optimizations.
Now that we are queuing more entries (potentially), make sure enough of
them become candidates. Previously, a skewed distribution of read
generations could mean that only 10% of queue entries were considered.
Improve the efficiency of sorting the queue by calculating the score
once when pages are added to the queue.
Add a workload to exercise differential eviction from trees.
In order to do that, add range partitioning to wtperf.
Don't override icount in wtperf workloads with random_range set.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build a Windows-to-POSIX/ANSI error translation layer.
Replace the read-only error mapping to WT_NOTFOUND and WT_PERM_DENIED
with EACCES and ENOENT.
Windows no longer needs its own version of __wt_strerror(), move the POSIX implementation from os_posix/os_errno.c to os_common/os_errno.c. Rename os_win/os_errno.c to os_win/os_winerr.c to avoid a collision.
Windows now has DWORD types in prototypes, split the Windows/POSIX extern.h files. (This actually cleans up some noise, previously we had to sort the OS prototypes to remove duplicates, which wasn't trivial.)
Add the WT_EXTENSION_API.map_windows_error method to map Windows system codes to POSIX/ANSI system codes.
|
|
|
|
|
| |
gcc 4.7, clang 3.4 and clang 3.8 all complain about different things;
cast the arguments to our new wrapper functions, hopefully that makes
all of the complaints go away.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cast arguments for ctype functions to avoid sign extension errors.
Create __wt_* versions of all ctype functions, and use them whenever
wt_internal.h is available. Add check to prevent direct use of ctype functions
from core source.
* Change wrappers to use u_char arguments, and return bool.
Remove unused wrappers.
* Use u_char in preference to unsigned char.
* Examples do not have u_char defined on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2541 Add stats showing active readers and writers
* Fix use of RET_MSG instead of ERR_MSG
* Change where we increment the active r/w stats
* Add "active fsync" stat
* Add new "Thread State" stat section, add fsync_io stat
* KNF
* Make thread stats not backwards breaking. Add atomic stat functions
* Add ThreadState stats to system and evict groups
* KNF
|