diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2017-10-27 00:36:23 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-10-27 15:36:23 +1100 |
commit | b59b8856c040531ef883b6e68010ff1f47ce1495 (patch) | |
tree | 1db9915ab24cea9115be900b3aca2f38b47a0b64 /src/include/btmem.h | |
parent | 4ff5d172ed42bbc703bc8d80d6f5642acbe7d777 (diff) | |
download | mongo-b59b8856c040531ef883b6e68010ff1f47ce1495.tar.gz |
WT-3652 Skip unnecessary lookaside reads / writes. (#3744)
Also fix reads during checkpoint so the expected read generation is
set, and checkpoint can attempt to clean up after itself.
Add a "lookaside_score" measuring the proportion of unstable updates in
cache (those required for historic reads), use that to determine when
to use the lookaside table rather than waiting for the cache to become
stuck.
Instead of discarding updates as part of restoring a page, including the original value in the update list if the on-page update is a modify. This removes some problematic code that was inconsistent about removing updates. Also, if we need to restore updates earlier than the on-page version, the previous code was incorrect.
Disable checkpoint skipping lookaside pages for now: always visit every page until we are tracking the correct IDs and timestamps to skip properly.
Ensure all trees with lookaside pages must stay dirty.
Diffstat (limited to 'src/include/btmem.h')
-rw-r--r-- | src/include/btmem.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/btmem.h b/src/include/btmem.h index 158fcf87d29..8662c40c635 100644 --- a/src/include/btmem.h +++ b/src/include/btmem.h @@ -242,6 +242,7 @@ struct __wt_page_modify { /* The page has lookaside entries. */ uint64_t las_pageid; + uint64_t las_max_txn; WT_DECL_TIMESTAMP(las_min_timestamp) } r; #undef mod_replace @@ -250,6 +251,8 @@ struct __wt_page_modify { #define mod_disk_image u1.r.disk_image #undef mod_replace_las_pageid #define mod_replace_las_pageid u1.r.las_pageid +#undef mod_replace_las_max_txn +#define mod_replace_las_max_txn u1.r.las_max_txn #undef mod_replace_las_min_timestamp #define mod_replace_las_min_timestamp u1.r.las_min_timestamp @@ -298,6 +301,7 @@ struct __wt_page_modify { uint32_t checksum; uint64_t las_pageid; + uint64_t las_max_txn; WT_DECL_TIMESTAMP(las_min_timestamp) } *multi; uint32_t multi_entries; /* Multiple blocks element count */ @@ -726,6 +730,8 @@ struct __wt_page_deleted { */ struct __wt_page_lookaside { uint64_t las_pageid; /* Page ID in lookaside */ + uint64_t las_max_txn; /* Maximum transaction ID in + lookaside */ WT_DECL_TIMESTAMP(min_timestamp) /* Oldest timestamp in lookaside for the page */ }; |