summaryrefslogtreecommitdiff
path: root/src/include/txn.i
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade copyright notices from 2015 to 2016.Keith Bostic2016-01-011-1/+1
|
* Merge branch 'develop' into wt-2073-metadata-cleanupKeith Bostic2015-12-011-58/+59
|\
| * WT-2241 Use a lock to protect transaction ID allocation.Michael Cahill2015-11-251-10/+5
| | | | | | | | | | | | | | We still need to make sure that transaction IDs are published in the state table before the current ID is incremented so that snapshot reads don't see uncommitted updates. However, a lock simplifies the code and performs better in testing than the initial fix.
| * WT-2337 Avoid yields if we race allocating transaction IDs.Michael Cahill2015-11-251-5/+9
| | | | | | | | It had a major perf impact on parallel populate workloads including YCSB.
| * LintAlex Gorrod2015-11-241-16/+16
| |
| * WT-2237 Have threads publish unique transaction IDs so that updates always ↵Michael Cahill2015-11-241-58/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | become visible immediately on commit. Previously, WiredTiger avoided locking in the transaction subsystem by having threads race to allocate transaction IDs. Only one thread wins the race, but losing threads could temporarily leave a transaction ID published in the global state table. If the winning thread completed its transaction quickly enough, its changes may not become visible immediately to readers (until the losing threads have woken up and allocated a new ID). This change separates ID allocation from the notion of a shared "current" value. Every thread gets a unique transaction ID, and spins to update the current value.
* | Merge branch 'develop' into wt-2073-metadata-cleanupKeith Bostic2015-11-071-15/+17
|\ \ | |/
| * WT-2170 Restore visible_all semantics if we try to check visibility without ↵Michael Cahill2015-10-301-3/+4
| | | | | | | | | | | | | | | | a snapshot. There are various internal checks (e.g., checking tombstone visibility during tree walks, and during eviction of dirty trees prior to an exclusive operation like drop) where we don't have a transactional snapshot, but the isolation level may be set read-committed or higher. The isolation level is irrelevant to these checks: we used to have a special "eviction" isolation level to avoid these issues. This change restores that semantic: if we attempt a visibilty check without a snapshot, fall back to only making stable updates visible.
| * whitespaceMichael Cahill2015-10-291-4/+4
| |
| * WT-2170 Clarify a comment.Susan LoVerso2015-10-281-2/+5
| |
| * WT-2170 Add a macro perfom an operation at an isolation level.Michael Cahill2015-10-281-4/+13
| | | | | | | | Lock down visibility checks so we never try to use a snapshot without one being allocated.
| * WT-2170 Move commentSusan LoVerso2015-10-261-7/+0
| |
| * WT-2170 Only have read uncommitted visible for metadata_search.Susan LoVerso2015-10-261-2/+1
| |
* | WT-2073: cache a metadata WT_CURSOR in the WT_SESSION, rather than aKeith Bostic2015-10-201-7/+8
|/ | | | WT_DATA_HANDLE.
* WT-2139 update a commentMichael Cahill2015-10-121-10/+11
|
* whitespaceMichael Cahill2015-10-091-3/+3
|
* WT-2139 At read-uncommitted isolation, keep the same ID pinned while cursors ↵Michael Cahill2015-10-091-7/+4
| | | | are positioned.
* Boolean conversion for the rest of the btree code.Keith Bostic2015-09-231-2/+2
|
* WT-2093 Use the C99 bool type to clarify when functions return true/false.Michael Cahill2015-09-081-16/+16
|
* Revert "Change __wt_txn_oldest_id to test for the lookaside table so all"Keith Bostic2015-08-271-4/+0
| | | | This reverts commit b3fc5e0afaae87376a4a8b16a241a4e9c221623a.
* Change __wt_txn_oldest_id to test for the lookaside table so allKeith Bostic2015-08-271-0/+4
| | | | | | | | visibility checks consider the lookaside table as a special case (where we know there aren't any "older" readers in the system, every thread reading from the lookaside table wants current data). This means the special-case code in reconciliation is no longer needed.
* Merge branch 'develop' into wt-1967-evict-anyKeith Bostic2015-08-191-4/+4
|\
| * Rename atomic functions from number of bytes to number of bits.Keith Bostic2015-08-131-2/+2
| |
| * Use cpp to generate the inline functions we need, add a volatileKeith Bostic2015-08-061-5/+4
| | | | | | | | versions of the int32_t, uint32_t, int64_t and uint64_t variants.
| * WT-2025: Inline the gcc/lint (but not the Windows) atomic functions soKeith Bostic2015-08-061-3/+4
| | | | | | | | we get type checking and arguments are never evaluated more than once.
| * whitespaceMichael Cahill2015-07-301-1/+1
| |
| * WT-1967 Don't allow last_running to move past a running transaction.Michael Cahill2015-07-301-1/+2
| |
* | whitespaceMichael Cahill2015-07-301-1/+1
| |
* | WT-1967 Don't allow last_running to move past a running transaction.Michael Cahill2015-07-301-1/+2
| |
* | WT-1967: creating a lookaside table to hold updates which are no longerKeith Bostic2015-07-191-7/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | useful, but which still might be required by current readers. When reconciling pages with updates which still might be read by existing snapshot readers, write the updates into a lookaside table. When those pages are read back into the cache, any still-relevant updates are read back from the lookaside table and attached to the page. Add a new on-disk page-header flag, WT_PAGE_LAS_UPDATE, set when a page has records in the look-aside table. Remove the __wt_evict_page() code, replace with calls to __wt_evict(), and add testing in reconciliation to only write committed updates. As part of that change, remove the WT_ISO_EVICTION transaction isolation configuration, it's no longer used (WT_ISO_READ_UNCOMMITTED is used instead). Delete the WT_PAGE_MODIFY.rec_max_txn field (no longer needed after reconciliation is changed to return EBUSY if a page wasn't marked clean, replacing the test of WT_PAGE_MODIFY.rec_max_txn __evict_review). Delete the test for all updates being globally visible when a page is discarded from the cache, that's no longer true. Delete the WT_SESSION_DISCARD_FORCE flag, used to turn off that check when forcibly discarding a page.
* whitespaceMichael Cahill2015-07-081-4/+4
|
* WT-1982 Avoid unnecessary read barriers in transaction code. Fix a ↵Michael Cahill2015-07-071-6/+7
| | | | 64-to-32-bit conversion warning while in the area.
* WT-1982 Fix a window where reconciliation could go back in transaction time.Michael Cahill2015-07-011-8/+6
|
* whitespaceMichael Cahill2015-06-301-2/+2
|
* WT-1982 Track down cached overflow items that are being freed too early, ↵Michael Cahill2015-06-301-17/+15
| | | | leading to reconciliation failing with WT_NOTFOUND.
* WT-1977: To defer the equality comparison until outside the binary searchKeith Bostic2015-06-251-2/+1
| | | | | | | | | | | | | | | loop, you have to reduce the search regardless of the comparison's return, otherwise you'll move past the match. Since we're comparing integers and the comparison is cheap, I'm adding an equality comparison inside the loop. This makes it harder to generalize this macro (so we may want to go back to deferring the equality comparison until outside the loop, which only requires a single test of less-than or greater-than, but as noted, you have to reduce the search regardless of the test result, which means a different kind of wrapping loop). One other fix, test for n == 0 before setting limit to (n - 1) and testing it against 0.
* SERVER-18875 Track the checkpoint's session ID (rather than the transaction ↵Michael Cahill2015-06-251-2/+3
| | | | ID): changing visibility broke an assertion when releasing the checkpoint's transaction snapshot.
* SERVER-18875 During a checkpoint, don't keep data alive if the checkpoint is ↵Michael Cahill2015-06-251-6/+13
| | | | | | the only reader. In particular, if we see pages marked deleted at the beginning of a capped collection, don't cache those pages if there are no possible readers other than the checkpoint itself.
* Merge pull request #2013 from wiredtiger/evict-clean-throttleMichael Cahill2015-06-251-2/+2
|\ | | | | Throttle worker threads based on eviction targets.
| * Merge branch 'develop' into evict-clean-throttleKeith Bostic2015-06-231-1/+1
| |\
| * | Split __wt_cache_full_check into two parts, a set of inline checks andKeith Bostic2015-06-081-2/+2
| | | | | | | | | | | | | | | the worker code that evicts pages, rename to __wt_cache_eviction_check and __wt_cache_eviction_worker.
| * | Merge __wt_eviction_check, __wt_cache_full_check and __wt_cache_waitKeith Bostic2015-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into __cache_check (a simple cache-size helper function), and a worker function, __wt_cache_full_check. Add a new parameter to __wt_cache_full_check, set if the caller is "busy". It's set for callers stalling for some reason (for example, waiting on a disk read). If the caller is busy, we only use it for a single page eviction before returning it to its previous task. Change the page-in function to check on the cache when a thread is about to stall, and evict a page instead of sleeping. The way this used to work was a thread would start evicting pages if the cache was > 95% full or there were eviction target values we wanted to reach, but would evict a single page and quit evicting as soon as the cache was < 100% full, regardless of eviction target values. Now we continue working until we both reach < 95% and the eviction target values, that is, we'll throttle threads unless they're currently "busy". Reference WT-1744.
* | | WT-1977 Improve the performance of getting snapshots with many sessions.Michael Cahill2015-06-241-2/+4
| |/ |/|
* | There's a macro to get the global transaction state, use it everywhere.Keith Bostic2015-06-131-1/+1
|/
* Merge pull request #1839 from wiredtiger/named-snapshotsMichael Cahill2015-05-221-1/+13
|\ | | | | Add an initial implementation of named, in-memory snapshots
| * Rename the "upto" drop snapshot config "before".Michael Cahill2015-05-221-0/+7
| |
| * Fix how named snapshots are allocated on begin_transaction.Alex Gorrod2015-05-201-1/+6
| | | | | | | | | | Used to be that a new snapshot was allocated over the top of the named snapshot in begin_txn.
* | Export a function to get the oldest transaction ID that needs to be tracked ↵Michael Cahill2015-05-211-6/+21
|/ | | | | | for a given tree. Managing cached overflow items was using the oldest transaction ID, but the meaning of that field changed. This fixes a bug that was introduced by WT-1745, that requires a combination of many overflow values, eviction and checkpoints, but can lead to unexpected WT_NOTFOUND errors during reconciliation.
* Add a "WT_" prefix to the many TXN_* macros in use inside WiredTiger.Michael Cahill2015-05-111-30/+30
| | | | | | Now that test/format mixes wt_internal.h with Berkeley DB's db.h, we were seeing conflicts over TXN_RUNNING. Try to fix that problem in general, at least for "TXN" macros. refs WT-1925
* Merge branch 'develop' into txn-refreshMichael Cahill2015-05-041-0/+7
|\ | | | | | | | | Conflicts: src/include/txn.i