diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-08-07 17:03:05 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-07 07:22:35 +0000 |
commit | 4073b599b00430c4f0ee775a703ee9f35b10580e (patch) | |
tree | 4ba99290219cc8708de8bd2a07394fd2f26f9374 /src/third_party/wiredtiger/src/include/btree.h | |
parent | 5ce374693fa02d05894f7119b39e11dd352b0d34 (diff) | |
download | mongo-4073b599b00430c4f0ee775a703ee9f35b10580e.tar.gz |
Import wiredtiger: d29619b755d79cb4406349e1309935b8c2fda2c2 from branch mongodb-4.6
ref: 54d5655b43..d29619b755
for: 4.5.1
WT-6274 SESSIONs shouldn't nest calls to get/release hs cursor
WT-6421 Avoid parsing metadata checkpoint for clean files
WT-6466 Don't reset the WT_SESSION timers when HS cursors are closed
WT-6551 Avoid a timing problem at the beginning of a test for log preallocation
Diffstat (limited to 'src/third_party/wiredtiger/src/include/btree.h')
-rw-r--r-- | src/third_party/wiredtiger/src/include/btree.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/include/btree.h b/src/third_party/wiredtiger/src/include/btree.h index ca639abd6ca..8ec0953c378 100644 --- a/src/third_party/wiredtiger/src/include/btree.h +++ b/src/third_party/wiredtiger/src/include/btree.h @@ -203,6 +203,21 @@ struct __wt_btree { */ uint64_t file_max; +/* + * We maintain a timer for a clean file to avoid excessive checking of checkpoint information that + * incurs a large processing penalty. We avoid that but will periodically incur the cost to clean up + * checkpoints that can be deleted. + */ +#define WT_BTREE_CLEAN_CKPT(session, btree, val) \ + do { \ + (btree)->clean_ckpt_timer = (val); \ + WT_STAT_DATA_SET((session), btree_clean_checkpoint_timer, (val)); \ + } while (0) +/* Statistics don't like UINT64_MAX, use INT64_MAX. It's still forever. */ +#define WT_BTREE_CLEAN_CKPT_FOREVER INT64_MAX +#define WT_BTREE_CLEAN_MINUTES 10 + uint64_t clean_ckpt_timer; + /* * We flush pages from the tree (in order to make checkpoint faster), without a high-level lock. * To avoid multiple threads flushing at the same time, lock the tree. |