summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-14Merge branch 'develop' into mongodb-3.6mongodb-3.5.9Alex Gorrod
2017-06-14WT-3369 WT_CURSOR->uri should always match the URI used to open the cursor ↵Don Anderson
(#3464)
2017-06-08WT-3362 Checkpoints shouldn't block drops. (#3459)Michael Cahill
Testing has uncovered another case where drops can spin trying to lock a checkpoint handle until a checkpoint completes. This change fixes that in two ways: attempting to lock (but not open) a handle won't spin, and drop will always attempt to lock the live tree before locking any checkpoint handles.
2017-06-08WT-3346 create JSON output for latency sampling. (#3450)Don Anderson
Added a script to merge workgen and WT outputs. Make workgen_stat.sh script agnostic as to what analyze tool to run.
2017-06-08WT-3326 Enhance workload generator to support wtperf config files (#3433)Don Anderson
Added wtperf.py script to run wtperf files. Added some supporting functions in the runner module to used by programs created by this tool.
2017-06-08WT-2596 Document behavior after a crash with a backup cursor open (#3455)David Hows
2017-06-07WT-3361 Resolve Windows build warnings, build more test programs on Windows ↵Keith Bostic
(#3456) * WT-3361 Resolve Windows build warnings, build more test programs on Windows. Update SConstruct with entries for all test programs (not all build and/or run yet). Replace all references to pthread_create, pthread_join and pthread_t with __wt_thread_create, __wt_thread_join and wt_thread_t, that is, use the WiredTiger versions for Windows portability. * Don't try and smoke-test bloom as part of the pull builds, it won't necessarily run. * Make WT's thread create / join functions visible for ex_thread. * Build all test programs with shim and wtlibs, it's simpler and allows for future changes without touching the SConstruct file.
2017-06-07WT-3349 Add rwlock statistics (#3457)Sulabh Mahajan
2017-06-07WT-3169 Add verbose messages regarding lookaside file usage (#3425)David Hows
* Verbose messages for lookaside activity are generated once-per-checkpoint.
2017-06-07WT-3332 Add per-connection stats for update transaction conflicts (#3448)David Hows
2017-06-07Merge branch 'develop' into mongodb-3.6Alex Gorrod
2017-06-06WT-3356 Use atomic reads of rwlocks. (#3454)Michael Cahill
* WT-3356 Use atomic reads of rwlocks. Previously we had some conditions that checked several fields within a rwlock by indirecting to the live structure. Switch to always doing a read of the full 64-bit value, then using local reads from the copy. Otherwise, we're relying on the compiler and the memory model to order the structure accesses in "code execution order". That could explain assertion failures and/or incorrect behavior with the new rwlock implementation. * Change all waits to 10ms. Previously when stalling waiting to get into the lock we would wait for 1ms, but once queued we waited forever. The former is probably too aggressive (burns too much CPU when we should be able to wait for a notification), and the latter is dangerous if a notification is ever lost (a thread with a ticket may never wake up).
2017-06-02WT-3351 Fix assertion condition. (#3452)sueloverso
2017-06-02WT-3354 Fix bugs found by Coverity. (#3451)Michael Cahill
* WT-3354 Fix bugs found by Coverity. * two cases where error checking for rwlocks should goto the error label for cleanup. * LSM code not restoring isolation if a checkpoint fails part way through * Take care with ordering an assertion after a read barrier. We just had an assertion failure on PPC, and from inspection it looks like read in the assertion could be scheduled before read that sees the ticket allocated. We have a read barrier in this path to protect against exactly that kind of thing happening to application data, move the assertion after it so our diagnostics are also safe.
2017-06-02WT-3345 Tune WiredTiger's read/write locks. (#3446)Michael Cahill
* Add a workload that stresses rwlock performance under various conditions (including `threads >> cores`), tune read and write lock operations to only spin when it is likely to help, and to back off to a condition variable when there is heavy contention. * New rwlock implementation: queue readers and writers separately, don't enforce fairness among readers or if the lock is overwhelmed. * Switch to a spinlock whenever we need to lock a page. Previously we had a read/write lock in the __wt_page structure that was only ever acquired in write mode, plus a spinlock in the page->modify structure. Switch to using the spinlock for everything. One slight downside of this change is that we can no longer precisely determine whether a page is locked based on the status of the spinlock (since another page sharing the same lock could be holding it in the places where we used to check). Since that was only ever used for diagnostic / debugging purposes, I think the benefit of the change outweighs this issue. * Fix a bug where a failure during `__wt_curfile_create` caused a data handle to be released twice. This is caught by the sanity checking assertions in the new read/write lock code. * Split may be holding a page lock when restoring update. Tell the restore code we have the page exclusive and no further locking is required. * Allocate a spinlock for each modified page. Using shared page locks for mulitple operations that need to lock a page (including inserts and reconciliation) resulted in self-deadlock when the lookaside table was used. That's because reconciliation held a page lock, then caused inserts to the lookaside table, which acquired the page lock for a page in the lookaside table. With a shared set of page locks, they could both be the same lock. Switch (back?) to allocating a spinlock per modified page. Earlier in this ticket we saved some space in __wt_page, so growing __wt_page_modify is unlikely to be noticeable. * Tweak padding and position of the spinlock in WT_PAGE_MODIFY to claw back some bytes. Move evict_pass_gen to the end of WT_PAGE: on inspection, it should be a cold field relative to the others, which now fit in one x86 cache line.
2017-06-02WT-3348 Lint, Windows warnings. (#3449)Keith Bostic
* Simplify Windows include files, clean up Windows warnings. * Remove incorrect path from copyright skip list. * Clean up a set of places where an operation could potentially truncate a value by performing the operation at the larger size and then casting the result.
2017-06-01WT-3307 Close btree/dhandle properly when handling __wt_checkpoint_close ↵Sulabh Mahajan
failure (#3445) * WT-3307 Close btree/dhandle when error handling __wt_checkpoint_close failure * Let EBUSY be returned immediately without further processing dhandles. * Minor KNF
2017-05-26WT-3248 Mark reconciliation a success if no skipped updates (#3441)Sulabh Mahajan
Only give up on update/restore if we don't use any updates. Previously, we were tracking the size of saved updates vs the size of uncommitted updates: renamed the variables for clarity. Only give up on update/restore eviction if (1) the page doesn't split and (2) all updates are saved -- i.e., we're not applying anything.
2017-05-27WT-3342 Fixup release notes to render in doxygen.Alex Gorrod
2017-05-27Bump version string on develop after release.Alex Gorrod
2017-05-27Merge branch 'master' into developAlex Gorrod
Pulling in the 2.9.2 release notes
2017-05-26WT-3342 Cut a WiredTiger 2.9.2 release (#3440)Alex Gorrod
2017-05-26WT-3343 WiredTiger database close can attempt unlock of a lock that's not ↵Keith Bostic
held. (#3443) Closing the file handles that remain open at database close will attempt to unlock a lock that's not currently held.
2017-05-26WT-3258 Add timers tracking time spent on failed evictions of large p… (#3428)David Hows
2017-05-25WT-3333 Fixes for zero length strings packed/unpacked in a 'u' format via ↵Don Anderson
Python. (#3432)
2017-05-25WT-2972 Add interface allowing partial updates to existing values (#3435)Alex Gorrod
2017-05-24WT-3339 The CURSOR_UPDATE_API_CALL macro will dump core on a NULL btree ↵Keith Bostic
handle (#3436) This is a problem for LSM or any non-standard data source that calls CURSOR_UPDATE_API_CALL with an in-memory configuration and a NULL btree handle. Split CURSOR_UPDATE_API_CALL into two versions, one of which expects a btree handle, one of which doesn't. Rename the argument to TXN_API_CALL_NOCONF from "bt" to "dh", it's a data handle in that macro, not a btree handle.
2017-05-24Revert "WT-2972 Add interface allowing partial updates to existing values ↵Alex Gorrod
(#3406)" (#3434) This reverts commit a3073be71b1406c7eef60e35fcf2cdc1174e752b.
2017-05-24WT-2972 Add interface allowing partial updates to existing values (#3406)Keith Bostic
Document and implement a WT_CURSOR.modify API
2017-05-24WT-3334 fix python test suite's BaseDataSet class for 'u' format (#3431)Keith Bostic
2017-05-23WT-3331 Get time into a local variable so we can read and use a consistent ↵sueloverso
time (#3430)
2017-05-22WT-3264 Fix log file cleanup when toggling logging. (#3419)sueloverso
* WT-3264 Fix log file cleanup when toggling logging. * whitespace * Fix test loop bug * Remove debugging. Test fixes. Reset slot. * Update comments. Remove unused var. * Rename goto label
2017-05-19WT-3327 Check for system clock ticking backwards (#3427)sueloverso
2017-05-19WT-3303 Deadlock during first access to lookaside table (#3426)Keith Bostic
Don't acquire the eviction walk-lock when releasing exclusive eviction access to a file, it can deadlock. Instead, atomically decrement the counter.
2017-05-17WT-3313 Replace calls to the deprecated LZ4_compress function (#3423)David Hows
2017-05-16WT-3314 clarify WT_PANIC error handling (#3418)Keith Bostic
A correctly-written WiredTiger application will have an error handler for WT_PANIC, and that isn't explicit in the documentation.
2017-05-16WT-3142 Check if C++ works in autoconf, not just if a variable is set. (#3421)Michael Cahill
2017-05-16WT-3142 Add a workload generator application (#3420)Keith Bostic
Fix up some copyright notices.
2017-05-15WT-3142 Add a workload generator application (#3408)Alex Gorrod
2017-05-16WT-3158 Fix structure layout on Windows. (#3417)mongodb-3.5.8Keith Bostic
Use awk instead of wc to get a count of lines, awk never includes whitespace in the output.
2017-05-16WT-3158 Fix structure layout on Windows. (#3416)Michael Cahill
We use a pragma on Windows to force a struct to be packed, but were missing the "end" pragma that restores normal layout. The result was that most structs were being packed, leading to poor performance for workloads (particularly when accessing session structures).
2017-05-12WT-3158 Fix structure layout on Windows. (#3417)Keith Bostic
Use awk instead of wc to get a count of lines, awk never includes whitespace in the output.
2017-05-11WT-3158 Fix structure layout on Windows. (#3416)Michael Cahill
We use a pragma on Windows to force a struct to be packed, but were missing the "end" pragma that restores normal layout. The result was that most structs were being packed, leading to poor performance for workloads (particularly when accessing session structures).
2017-05-11WT-3312 encryption btree configuration test (#3413)Keith Bostic
* WT-3312 encryption btree configuration test Don't check for the metadata file explicitly (it implies we should check other special files too, like the LAS file). If there's no explicit encryption argument, default to the connection's value, that includes the metadata file and the LAS file. * Remove my added line in the comment, it didn't add anything useful.
2017-04-28Revert "WT-3142 Add a workload generator application. (#3255)" (#3407)Alex Gorrod
This reverts commit 48c7cf59ccf583369fa98733b388983bd4abb70e.
2017-04-28WT-3142 Add a workload generator application. (#3255)Michael Cahill
The workload generator runs core workloads in C++, which directly calls the C API and thus minimizes the overhead of the test program. The workload setup is done in Python to allow for an expressive workload definition language. Initial commit has a number of example workloads that match equivalent wtperf workloads.
2017-04-28WT-3296 LAS table fixes/improvements (#3397)Keith Bostic
* Changes for SERVER-28166: Assess effects of pinning a lot of content in storage engine cache Instead of counting the update chains we skip/don't-skip, calculate the memory held in the update chain. Then if there are skipped updates in the chain, count that memory as memory we won't get back if we rewrite the page, else count it as memory we will recover. Change the test for rewriting a page in memory from a percentage of the update chains that we skipped/didn't-skip to whether or not we'll recover at least 2KB from rewriting the page. This change should avoid rewriting pages in memory where we're just wasting time, that is, tiny pages or pages without any updates on them. Reconciliation has a test in __rec_write_check_complete() of whether an update-restore page reconciliation should fail because there aren't enough updates being discarded that it's worth rewriting the page in memory. That test incorrectly used the count of currently allocated boundary structures in its calculations, not the count of boundary structures used in a specific reconciliation. That bug led to eviction repeatedly doing update-restore reconciliation and rewriting pages in memory, to little or no gain, instead of switching to the LAS table. Further, the test was intended to be if 10% of the update chains won't have to be re-instantiated when the page is rewritten. I think the test was wrong, but regardless, implementing the test correctly doesn't help with the test load I'm using. (My test is creating a snapshot and then inserting records until the cache is full.) Re-instantiating the page in memory stalls in that test case, which makes sense because rewriting a page in memory isn't evicting anything, it's just shrinking the memory being pinned down. Change the test: if we can discard a chunk of the original page, rewrite the page in memory. Else, fallback to the lookaside table if we think lookaside will work. * Try to shorten update chains during eviction. * The memory in the update chain should include memory held by aborted transactions. Rather than put another test inside the loop, split the loop into two parts, eviction and checkpoint. Checkpoint doesn't need to calculate the memory in the update chain, nor does it have to track the minimum transaction ID. * Add a smoke test for the LAS table. * Skip reserved items when inserting update records into the LAS table, they're never restored. * Don't fall back to the LAS table when configured for in-memory eviction. * Replace __wt_evict's test of WT_EVICT_IN_MEMORY in with a test of WT_CONN_IN_MEMORY, there's no reason to further complicate the pass-back of the flags value to that function. * Ignore lookaside table collision tests and checks to avoid rewriting pages in memory for little gain, when configured in-memory. The former isn't an issue for in-memory configurations, and small caches with in-memory configurations can force us to rewrite every possible page.
2017-04-28WT-3297 support the gcc/clang -fvisibility=hidden flag (#3404)Keith Bostic
2017-04-28WT-3302 Introduce a thread struct with a member telling if thread created ↵Sulabh Mahajan
successfully (#3405) * Introduce a thread stuct with a member denoting if thread got created * Change windows thread create in accordance to new thread struct * Fix build error
2017-04-25SERVER-28820 Add a few error path messages in logging. (#3402)sueloverso