diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-11-23 15:42:18 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-23 05:09:49 +0000 |
commit | fe210fd8f82261094d2bd95b5dbf4f77081986ef (patch) | |
tree | a430fa015c433e1833c8504cf52419bffd32576e /src/third_party/wiredtiger/src/cursor/cur_std.c | |
parent | 3637210a683c8f264c334efd246228d217508cd1 (diff) | |
download | mongo-fe210fd8f82261094d2bd95b5dbf4f77081986ef.tar.gz |
Import wiredtiger: cc40649fdc8d4b715476971f750eb496602709ca from branch mongodb-4.4
ref: 1ba1d9bab8..cc40649fdc
for: 4.4.3
WT-6563 Create a reproducer for invalid modification application
WT-6672 Don't increase the writegen number until RTS cleans up the checkpoint
WT-6859 Implement search_near method for the history store cursor
Reverted ticket(s):
WT-6712 Allow RTS to operate when stable timestamp is not set
Diffstat (limited to 'src/third_party/wiredtiger/src/cursor/cur_std.c')
-rw-r--r-- | src/third_party/wiredtiger/src/cursor/cur_std.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/cursor/cur_std.c b/src/third_party/wiredtiger/src/cursor/cur_std.c index 364a6dffbdb..92b8e5c5b3e 100644 --- a/src/third_party/wiredtiger/src/cursor/cur_std.c +++ b/src/third_party/wiredtiger/src/cursor/cur_std.c @@ -979,6 +979,33 @@ err: } /* + * __cursor_config_debug -- + * Set configuration options for debug category. + */ +static int +__cursor_config_debug(WT_CURSOR *cursor, const char *cfg[]) +{ + WT_CONFIG_ITEM cval; + WT_DECL_RET; + WT_SESSION_IMPL *session; + + session = (WT_SESSION_IMPL *)cursor->session; + + /* + * Debug options. Special handling for options that aren't found - since reconfigure passes in + * just the single configuration string, not the stack. + */ + if ((ret = __wt_config_gets_def(session, cfg, "debug.release_evict", 0, &cval)) == 0) { + if (cval.val) + F_SET(cursor, WT_CURSTD_DEBUG_RESET_EVICT); + else + F_CLR(cursor, WT_CURSTD_DEBUG_RESET_EVICT); + } else + WT_RET_NOTFOUND_OK(ret); + return (0); +} + +/* * __wt_cursor_reconfigure -- * Set runtime-configurable settings. */ @@ -988,6 +1015,7 @@ __wt_cursor_reconfigure(WT_CURSOR *cursor, const char *config) WT_CONFIG_ITEM cval; WT_DECL_RET; WT_SESSION_IMPL *session; + const char *cfg[] = {config, NULL}; CURSOR_API_CALL(cursor, session, reconfigure, NULL); @@ -1018,6 +1046,8 @@ __wt_cursor_reconfigure(WT_CURSOR *cursor, const char *config) } else WT_ERR_NOTFOUND_OK(ret, false); + WT_ERR(__cursor_config_debug(cursor, cfg)); + err: API_END_RET(session, ret); } @@ -1110,6 +1140,7 @@ __wt_cursor_init( cursor->update = __wt_cursor_notsup; F_CLR(cursor, WT_CURSTD_CACHEABLE); } + WT_RET(__cursor_config_debug(cursor, cfg)); /* * dump If an index cursor is opened with dump, then this function is called on the index files, |