| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
It had a major perf impact on parallel populate workloads including YCSB.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Lock down visibility checks so we never try to use a snapshot without one being allocated.
|
| | |
|
| | |
|
|/
|
|
| |
WT_DATA_HANDLE.
|
| |
|
| |
|
|
|
|
| |
are positioned.
|
| |
|
| |
|
|
|
|
| |
This reverts commit b3fc5e0afaae87376a4a8b16a241a4e9c221623a.
|
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
versions of the int32_t, uint32_t, int64_t and uint64_t variants.
|
| |
| |
| |
| | |
we get type checking and arguments are never evaluated more than once.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
64-to-32-bit conversion warning while in the area.
|
| |
|
| |
|
|
|
|
| |
leading to reconciliation failing with WT_NOTFOUND.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ID): changing visibility broke an assertion when releasing the checkpoint's transaction snapshot.
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Throttle worker threads based on eviction targets.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | | |
the worker code that evicts pages, rename to __wt_cache_eviction_check
and __wt_cache_eviction_worker.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
|/| |
|
|/ |
|
|\
| |
| | |
Add an initial implementation of named, in-memory snapshots
|
| | |
|
| |
| |
| |
| |
| | |
Used to be that a new snapshot was allocated over the top of the
named snapshot in begin_txn.
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| | |
Conflicts:
src/include/txn.i
|