summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/conn/conn_dhandle.c
diff options
context:
space:
mode:
authorChenhao Qu <chenhao.qu@mongodb.com>2021-01-25 10:17:02 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-25 11:01:39 +0000
commit62c3f69e2b2d2e805bb609edce01736f8ffa389b (patch)
tree314ef6ba4b2e51631d4d189207fca355eda49d27 /src/third_party/wiredtiger/src/conn/conn_dhandle.c
parent4a262f6844b3a054f4d89c8d7dc802e263dbdfc1 (diff)
downloadmongo-62c3f69e2b2d2e805bb609edce01736f8ffa389b.tar.gz
Import wiredtiger: e39ffb554160de902060cd063c4b1547ff6d5e1e from branch mongodb-5.0
ref: 1e9c8aed12..e39ffb5541 for: 4.9.0 WT-6309 Add support for start/stop arguments to wt printlog command WT-6866 Refactor python backup tests initial base class WT-6946 Adding test tags to an initial set of test programs 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.c17
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;
}
/*