diff options
author | Luke Chen <luke.chen@mongodb.com> | 2021-01-27 13:28:13 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-27 03:07:52 +0000 |
commit | 77d134c7a2bab846aaaa056b0883888a8219da2a (patch) | |
tree | 8caac27a3573139d221fdf93ba9c99b3e042bc78 /src/third_party/wiredtiger/src/conn/conn_dhandle.c | |
parent | 5fad1f69662696c5b789392622aa34d370fb4825 (diff) | |
download | mongo-77d134c7a2bab846aaaa056b0883888a8219da2a.tar.gz |
Import wiredtiger: a52cd5a47a7e9af9e2c341e66f0ffdd9bc977930 from branch mongodb-4.4
ref: ef1f2937c3..a52cd5a47a
for: 4.4.4
WT-6309 Add support for start/stop arguments to wt printlog command
WT-6866 Refactor python backup tests initial base class
WT-6924 Queue history store pages for urgent eviction when cache pressure is high
WT-6946 Adding test tags to an initial set of test programs
WT-7068 Add column store support to test_hs03
WT-7084 Fix assert in test code and a comment error
WT-7109 Retain no longer supported configuration options for backward compatibility
WT-7113 Integrate prototype tiered storage code into WT
WT-7114 Revert Makefile code to always run the prototype script
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_dhandle.c')
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_dhandle.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c index 44b2d86f7c5..b9302ccb602 100644 --- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c +++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c @@ -99,6 +99,9 @@ __conn_dhandle_config_set(WT_SESSION_IMPL *session) case WT_DHANDLE_TYPE_TABLE: WT_ERR(__wt_strdup(session, WT_CONFIG_BASE(session, table_meta), &dhandle->cfg[0])); break; + case WT_DHANDLE_TYPE_TIERED: + WT_ERR(__wt_strdup(session, WT_CONFIG_BASE(session, tiered_meta), &dhandle->cfg[0])); + break; } dhandle->cfg[1] = metaconf; dhandle->meta_base = base; @@ -127,6 +130,9 @@ __conn_dhandle_destroy(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle) case WT_DHANDLE_TYPE_TABLE: ret = __wt_schema_close_table(session, (WT_TABLE *)dhandle); break; + case WT_DHANDLE_TYPE_TIERED: + ret = __wt_tiered_close(session, (WT_TIERED *)dhandle); + break; } __wt_rwlock_destroy(session, &dhandle->rwlock); @@ -150,6 +156,7 @@ __wt_conn_dhandle_alloc(WT_SESSION_IMPL *session, const char *uri, const char *c WT_DATA_HANDLE *dhandle; WT_DECL_RET; WT_TABLE *table; + WT_TIERED *tiered; uint64_t bucket; /* @@ -165,6 +172,10 @@ __wt_conn_dhandle_alloc(WT_SESSION_IMPL *session, const char *uri, const char *c WT_RET(__wt_calloc_one(session, &table)); dhandle = (WT_DATA_HANDLE *)table; dhandle->type = WT_DHANDLE_TYPE_TABLE; + } else if (WT_PREFIX_MATCH(uri, "tiered:")) { + WT_RET(__wt_calloc_one(session, &tiered)); + dhandle = (WT_DATA_HANDLE *)tiered; + dhandle->type = WT_DHANDLE_TYPE_TIERED; } else WT_RET_PANIC(session, EINVAL, "illegal handle allocation URI %s", uri); @@ -364,6 +375,9 @@ __wt_conn_dhandle_close(WT_SESSION_IMPL *session, bool final, bool mark_dead) case WT_DHANDLE_TYPE_TABLE: WT_TRET(__wt_schema_close_table(session, (WT_TABLE *)dhandle)); break; + case WT_DHANDLE_TYPE_TIERED: + WT_TRET(__wt_tiered_close(session, (WT_TIERED *)dhandle)); + break; } /* @@ -519,6 +533,9 @@ __wt_conn_dhandle_open(WT_SESSION_IMPL *session, const char *cfg[], uint32_t fla case WT_DHANDLE_TYPE_TABLE: WT_ERR(__wt_schema_open_table(session)); break; + case WT_DHANDLE_TYPE_TIERED: + WT_ERR(__wt_tiered_open(session, cfg)); + break; } /* |