Commit Graph

9840 Commits

Author SHA1 Message Date
Alex Gorrod
578a856c19 Merge pull request #2156 from wiredtiger/WT-2066
WT-2066 - Update the oldest transaction ID from eviction
(cherry picked from commit 8f42f02d3c)
2015-08-28 11:47:56 +10:00
Alex Gorrod
a85c5cda41 Merge pull request #2152 from wiredtiger/WT-2062
WT-2062 Try harder to make progress on in-memory splits
(cherry picked from commit 3e0c7bfa3a)
2015-08-28 11:47:30 +10:00
Michael Cahill
af5ce54fe8 WT-2051 Add a long message if the metadata can't be opened. 2015-08-26 16:40:46 +10:00
Michael Cahill
3613dedcd8 Merge branch 'develop' into wt-1822-encryption 2015-08-26 16:12:13 +10:00
Michael Cahill
33f5597916 SERVER-20008 Acquire the handle list lock when clearing walks to avoid a race with sweep. 2015-08-26 13:52:52 +10:00
Keith Bostic
55110bae04 Make the generated code a little easier to read, don't split lines
unless we need to.
2015-08-25 13:02:13 -04:00
Keith Bostic
57d9822481 The stats aggregation function is internal, it doesn't need to know that
the external statistics type is a uint64_t.
2015-08-25 12:57:29 -04:00
Michael Cahill
c5fc05b843 Merge branch 'develop' into WT-2059 2015-08-25 17:26:46 +10:00
Michael Cahill
d8ae532acc WT-2059 Include non-aggregated stats in cursor results. 2015-08-25 15:37:43 +10:00
Michael Cahill
0719dbad7d SERVER-20008 Don't fail if stepping past the last page in a file. 2015-08-25 14:32:43 +10:00
Michael Cahill
e796ca9280 SERVER-20008 Don't reset eviction walks when hitting a busy page.
Also, when clearing eviction walk points before the eviction server goes to sleep, clear *all* walks, not just ones that sessions are waiting to be have cleared.
2015-08-25 14:19:16 +10:00
Michael Cahill
470648d1fe SERVER-19990 Don't assert on eviction of live updates from dead trees. 2015-08-25 09:54:26 +10:00
Keith Bostic
f663696a6f Output an error message if we're unable to read the file when first
opening it (we're turning off the underlying error messages, but we
should write something into the error logs).
2015-08-24 17:02:52 -04:00
Keith Bostic
957daed3f7 WT-2052: Fix the atomic size_t type functions for MSVC. 2015-08-24 15:47:53 -04:00
Keith Bostic
c1e2f4cf72 Fix a bug introduced in 705ff3f; discard duplicate structure declarations so 2015-08-24 15:40:26 -04:00
Keith Bostic
7102623e02 gcc complaint: bt_io.c:154:4: error: format not a string literal and no
format arguments [-Werror=format-security]
2015-08-24 13:13:33 -04:00
Keith Bostic
4749b07703 Don't discard the return error from the decryption/compression functions,
they may be returning something in their own error space we don't want to
overwrite. (We do overwrite the user's error return in the case of a panic,
but I think that's the correct thing to do.)
2015-08-24 12:57:51 -04:00
Keith Bostic
8969ddea9f WT-1822, WT-2051
Rename WT_SESSION_SALVAGE_CORRUPT_OK flag to WT_SESSION_QUIET_CORRUPT_FILE,
it's no longer salvage only.

Set/clear WT_SESSION_QUIET_CORRUPT_FILE around the initial read and verify
of the root page when the file is opened so we don't output scary messages
into the MongoDB log ("item XX on page at YY is a corrupted cell").
2015-08-24 12:48:12 -04:00
Keith Bostic
7ff1293d25 WT-1822, WT-2051: unify corruption error messages into a single
structure. This actually makes WT-2051 worse, and test_encrypt04
(at least) starts panicing in cases where we didn't before.
2015-08-24 11:15:00 -04:00
Keith Bostic
0957ce7ea9 Now that we verify the root page when we open the file, we don't expect
a decryption error because of configuration, fix up a comment.
2015-08-24 10:22:17 -04:00
Michael Cahill
2a89b8b983 Merge pull request #2140 from wiredtiger/wt-2052
WT-2052: OS X clang compiler warnings.
2015-08-24 17:29:24 +10:00
Michael Cahill
41b6fb879e Merge pull request #2142 from wiredtiger/wt-2058
WT-2058: Fix mutex and log-slot alignment.
2015-08-24 17:27:37 +10:00
Michael Cahill
f7cbba35ab typo 2015-08-24 17:17:20 +10:00
Michael Cahill
9d0c61f2f4 WT_LSM_CHUNK doesn't need alignment: we only allocate one at a time 2015-08-24 17:16:55 +10:00
Keith Bostic
4e9b4646d3 The WT_PAGE_LOCKS macro doesn't need to take an argument, simplify it. 2015-08-22 19:40:25 -04:00
Keith Bostic
5c06f5d87f WT_PAGE_LOCKS is a hash, switch it to a prime number so we involve all
the bits in a mod.
2015-08-22 19:39:24 -04:00
Keith Bostic
de26670daa Assert the WT_CONNECTION.page_lock, WT_CONNECTION.sessions,
WT_TXN_GLOBAL.states and WT_LOG.slot_pool arrays are aligned.
2015-08-22 19:37:24 -04:00
Keith Bostic
ec70ff6fe0 Clarify a comment. 2015-08-22 19:37:13 -04:00
Keith Bostic
d82f76ef5b Update auto-generated typedefs. 2015-08-22 19:34:49 -04:00
Keith Bostic
1fe61efde7 Fix the WT_LOGSLOT declaration for alignment.
Remove a few places where typedef's weren't needed, they'll be automatically
generated by the dist scripts.
Minor whitespace cleanups.
2015-08-22 19:33:46 -04:00
Keith Bostic
705ff3f91c Fix the WT_SPINLOCK structure declaration for alignment.
Switch to a structure for gcc spinlocks, I couldn't figure out any way
to get alignment for an int. (The structure only has a single field, a
volatile int, so I don't think the code will be any slower).

Remove the typedef on the declaration, it's not needed, the dist scripts
with automatically generate it.
2015-08-22 19:29:21 -04:00
Keith Bostic
638d5e7253 WT-2057: The verbose configuration is being written to the base
configuration file, which means all subsequent runs (including wt
command runs), inherit the verbose flags from the initial run.

Strip the verbose configuration as part of writing the base
configuration file.
2015-08-21 11:57:29 -04:00
Keith Bostic
e09a213e80 Fix calls to the __wt_cache_decr_check_XXX functions, pass the address,
not the value.
2015-08-21 09:52:34 -04:00
Keith Bostic
1aed8da85f WT-2052: Add atomic functions for size_t type, rework btree.i to
use size_t functions when updating WT_PAGE.memory_footprint and
WT_PAGE_MODIFY.bytes_dirty.
2015-08-21 09:33:55 -04:00
Michael Cahill
89a97428ba Tweak line wrapping. 2015-08-21 17:06:10 +10:00
David Hows
fe4034d697 WT-2050 - switch PRIu64 with WT_SIZET_FMT 2015-08-21 15:27:40 +10:00
David Hows
88e3072ba2 WT-2050 - when memory allocation fails, say how much memory we were trying to allocate 2015-08-21 12:36:18 +10:00
Keith Bostic
3218d9c554 Rename "addr" to "tag". The argument is not necessarily a block-manager
"address", it's really a string identifying where the block came from
(which might be a block-manager address, in printable format), but might
also be something else entirely.
2015-08-20 15:30:26 -04:00
Keith Bostic
338d449f9b Remove unnecessary cast. 2015-08-20 15:26:36 -04:00
Keith Bostic
c9c261d990 WT-2053: __wt_verify_dsk takes a string to tag error messages, not an
actual block-manager address.
2015-08-20 15:21:13 -04:00
Michael Cahill
b83b901de7 Merge pull request #2129 from wiredtiger/SERVER-18356
SERVER-18356 - Avoid reading baseconfig file when config_base is false
2015-08-20 13:32:30 +10:00
Michael Cahill
6665618149 Merge pull request #2128 from wiredtiger/WT-2046
WT-2046 - Add a counter for search restarts
2015-08-20 13:23:32 +10:00
Michael Cahill
6cffaf62f5 Minor cleanup of documentation changes. 2015-08-20 13:22:03 +10:00
Michael Cahill
5777eb8ba1 Cosmetic change: handle WT_RESTART consistently with "goto retry" 2015-08-20 13:10:25 +10:00
Michael Cahill
aec6668829 Merge pull request #2132 from wiredtiger/wt-2048
WT-2048 Quiet a Coverity complaint.
2015-08-20 11:20:24 +10:00
Keith Bostic
1dda755c48 WT-2048
Coverity complains:
CID 1316612 (#1 of 1): Data race condition (MISSING_LOCK)
1. missing_lock: Accessing stats->allocation_size without holding lock
WT_SPINLOCK.lock. Elsewhere, "__wt_dsrc_stats.allocation_size" is
accessed with WT_SPINLOCK.lock held 1 out of 2 times (1 of these
accesses strongly imply that it is necessary).

We're locking around filling in the block manager statistics because
some values are read from the live system which is generally locked.
However, there isn't any reason to lock these reads (they're 8B memory
reads), they're not going to see corruption.
2015-08-19 16:12:02 -04:00
Keith Bostic
eaf3a58ae9 The __wt_random code to handle an uninitialized random state is broken,
if you don't initialize the random number state, you get 0 as your
random number forever.

I don't think this is a problem because the WiredTiger library always
initializes its random number generation, I noticed because the
mongodb-3.0 branch's test/format code doesn't initialize its random
number generator.
2015-08-19 12:46:12 -04:00
David Hows
cea2c7df19 SERVER-18356 - Update documentation 2015-08-19 16:06:57 +10:00
David Hows
029c17c414 SERVER-18356 - change if statment per CR 2015-08-19 15:29:55 +10:00
David Hows
7ef65f4fcc WT-2046 - Change wording of counter 2015-08-19 14:06:30 +10:00