diff options
Diffstat (limited to 'src/third_party/wiredtiger/src')
11 files changed, 31 insertions, 30 deletions
diff --git a/src/third_party/wiredtiger/src/block/block_mgr.c b/src/third_party/wiredtiger/src/block/block_mgr.c index 6cba094aefe..433d7342295 100644 --- a/src/third_party/wiredtiger/src/block/block_mgr.c +++ b/src/third_party/wiredtiger/src/block/block_mgr.c @@ -443,7 +443,7 @@ __bm_stat(WT_BM *bm, WT_SESSION_IMPL *session, WT_DSRC_STATS *stats) * Modify the tiered object. */ static int -__bm_switch_object(WT_BM *bm, WT_SESSION_IMPL *session, uint64_t object_id, uint32_t flags) +__bm_switch_object(WT_BM *bm, WT_SESSION_IMPL *session, uint32_t object_id, uint32_t flags) { return (__wt_block_switch_object(session, bm->block, object_id, flags)); } @@ -453,7 +453,7 @@ __bm_switch_object(WT_BM *bm, WT_SESSION_IMPL *session, uint64_t object_id, uint * Modify the tiered object; readonly version. */ static int -__bm_switch_object_readonly(WT_BM *bm, WT_SESSION_IMPL *session, uint64_t object_id, uint32_t flags) +__bm_switch_object_readonly(WT_BM *bm, WT_SESSION_IMPL *session, uint32_t object_id, uint32_t flags) { WT_UNUSED(object_id); WT_UNUSED(flags); diff --git a/src/third_party/wiredtiger/src/block/block_open.c b/src/third_party/wiredtiger/src/block/block_open.c index 4483b67ab13..355226789dc 100644 --- a/src/third_party/wiredtiger/src/block/block_open.c +++ b/src/third_party/wiredtiger/src/block/block_open.c @@ -185,8 +185,7 @@ __wt_block_open(WT_SESSION_IMPL *session, const char *filename, WT_BLOCK_FILE_OP block->allocfirst = WT_STRING_MATCH("first", cval.str, cval.len); block->has_objects = (opener != NULL); if (block->has_objects) - /* FIXME-WT-7588 fix 32 bit vs 64 bit mismatch. */ - block->objectid = (uint32_t)opener->current_object_id(opener); + block->objectid = opener->current_object_id(opener); /* Configuration: optional OS buffer cache maximum size. */ WT_ERR(__wt_config_gets(session, cfg, "os_cache_max", &cval)); diff --git a/src/third_party/wiredtiger/src/block/block_tiered.c b/src/third_party/wiredtiger/src/block/block_tiered.c index 4ed0d49811a..ffc3a35a147 100644 --- a/src/third_party/wiredtiger/src/block/block_tiered.c +++ b/src/third_party/wiredtiger/src/block/block_tiered.c @@ -13,7 +13,7 @@ * Switch a new writeable object. */ static int -__block_switch_writeable(WT_SESSION_IMPL *session, WT_BLOCK *block, uint64_t object_id) +__block_switch_writeable(WT_SESSION_IMPL *session, WT_BLOCK *block, uint32_t object_id) { WT_DECL_RET; @@ -73,7 +73,7 @@ err: */ int __wt_block_switch_object( - WT_SESSION_IMPL *session, WT_BLOCK *block, uint64_t object_id, uint32_t flags) + WT_SESSION_IMPL *session, WT_BLOCK *block, uint32_t object_id, uint32_t flags) { WT_UNUSED(flags); diff --git a/src/third_party/wiredtiger/src/btree/bt_handle.c b/src/third_party/wiredtiger/src/btree/bt_handle.c index 4e5afd92148..81a580e9829 100644 --- a/src/third_party/wiredtiger/src/btree/bt_handle.c +++ b/src/third_party/wiredtiger/src/btree/bt_handle.c @@ -1018,7 +1018,7 @@ __wt_btree_immediately_durable(WT_SESSION_IMPL *session) * Switch to a writeable object for a tiered btree. */ int -__wt_btree_switch_object(WT_SESSION_IMPL *session, uint64_t object_id, uint32_t flags) +__wt_btree_switch_object(WT_SESSION_IMPL *session, uint32_t object_id, uint32_t flags) { WT_BM *bm; WT_DECL_RET; diff --git a/src/third_party/wiredtiger/src/conn/conn_tiered.c b/src/third_party/wiredtiger/src/conn/conn_tiered.c index 295d94783b1..ecdf10d34c3 100644 --- a/src/third_party/wiredtiger/src/conn/conn_tiered.c +++ b/src/third_party/wiredtiger/src/conn/conn_tiered.c @@ -228,7 +228,7 @@ __wt_tier_do_flush( * Given an ID generate the URI names and call the flush code. */ int -__wt_tier_flush(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t id) +__wt_tier_flush(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id) { WT_DECL_RET; const char *local_uri, *obj_uri; diff --git a/src/third_party/wiredtiger/src/include/block.h b/src/third_party/wiredtiger/src/include/block.h index 5ce6c364ae9..cd6cf3e662e 100644 --- a/src/third_party/wiredtiger/src/include/block.h +++ b/src/third_party/wiredtiger/src/include/block.h @@ -196,7 +196,7 @@ struct __wt_bm { int (*salvage_valid)(WT_BM *, WT_SESSION_IMPL *, uint8_t *, size_t, bool); int (*size)(WT_BM *, WT_SESSION_IMPL *, wt_off_t *); int (*stat)(WT_BM *, WT_SESSION_IMPL *, WT_DSRC_STATS *stats); - int (*switch_object)(WT_BM *, WT_SESSION_IMPL *, uint64_t, uint32_t); + int (*switch_object)(WT_BM *, WT_SESSION_IMPL *, uint32_t, uint32_t); int (*sync)(WT_BM *, WT_SESSION_IMPL *, bool); int (*verify_addr)(WT_BM *, WT_SESSION_IMPL *, const uint8_t *, size_t); int (*verify_end)(WT_BM *, WT_SESSION_IMPL *); @@ -325,10 +325,10 @@ struct __wt_block_desc { */ struct __wt_block_file_opener { /* An id to be used with the open call to reference the current object. */ -#define WT_TIERED_CURRENT_ID 0xFFFFFFFFFFFFFFFFULL +#define WT_TIERED_CURRENT_ID 0xFFFFFFFFUL int (*open)( - WT_BLOCK_FILE_OPENER *, WT_SESSION_IMPL *, uint64_t, WT_FS_OPEN_FILE_TYPE, u_int, WT_FH **); - uint64_t (*current_object_id)(WT_BLOCK_FILE_OPENER *); + WT_BLOCK_FILE_OPENER *, WT_SESSION_IMPL *, uint32_t, WT_FS_OPEN_FILE_TYPE, u_int, WT_FH **); + uint32_t (*current_object_id)(WT_BLOCK_FILE_OPENER *); void *cookie; /* Used in open call */ }; diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h index 92cdcdbf733..43f844e4f2f 100644 --- a/src/third_party/wiredtiger/src/include/extern.h +++ b/src/third_party/wiredtiger/src/include/extern.h @@ -200,7 +200,7 @@ extern int __wt_block_salvage_valid(WT_SESSION_IMPL *session, WT_BLOCK *block, u size_t addr_size, bool valid) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_block_size_alloc(WT_SESSION_IMPL *session, WT_SIZE **szp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_block_switch_object(WT_SESSION_IMPL *session, WT_BLOCK *block, uint64_t object_id, +extern int __wt_block_switch_object(WT_SESSION_IMPL *session, WT_BLOCK *block, uint32_t object_id, uint32_t flags) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_block_tiered_fh(WT_SESSION_IMPL *session, WT_BLOCK *block, uint32_t object_id, WT_FH **fhp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -304,7 +304,7 @@ extern int __wt_btree_open(WT_SESSION_IMPL *session, const char *op_cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_btree_stat_init(WT_SESSION_IMPL *session, WT_CURSOR_STAT *cst) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_btree_switch_object(WT_SESSION_IMPL *session, uint64_t object_id, uint32_t flags) +extern int __wt_btree_switch_object(WT_SESSION_IMPL *session, uint32_t object_id, uint32_t flags) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_btree_tree_open(WT_SESSION_IMPL *session, const uint8_t *addr, size_t addr_size) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1456,7 +1456,7 @@ extern int __wt_thread_group_resize(WT_SESSION_IMPL *session, WT_THREAD_GROUP *g WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_tier_do_flush(WT_SESSION_IMPL *session, WT_TIERED *tiered, const char *local_uri, const char *obj_uri) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_tier_flush(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t id) +extern int __wt_tier_flush(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_tiered_bucket_config(WT_SESSION_IMPL *session, const char *cfg[], WT_BUCKET_STORAGE **bstoragep) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); @@ -1464,16 +1464,16 @@ extern int __wt_tiered_close(WT_SESSION_IMPL *session, WT_TIERED *tiered) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_tiered_conn_config(WT_SESSION_IMPL *session, const char **cfg, bool reconfig) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_tiered_name(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle, uint64_t id, +extern int __wt_tiered_name(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle, uint32_t id, uint32_t flags, const char **retp) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_tiered_open(WT_SESSION_IMPL *session, const char *cfg[]) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_tiered_opener(WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle, WT_BLOCK_FILE_OPENER **openerp, const char **filenamep) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_tiered_put_drop_local(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t id) +extern int __wt_tiered_put_drop_local(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -extern int __wt_tiered_put_drop_shared(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t id) +extern int __wt_tiered_put_drop_shared(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); extern int __wt_tiered_put_flush(WT_SESSION_IMPL *session, WT_TIERED *tiered) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); diff --git a/src/third_party/wiredtiger/src/include/tiered.h b/src/third_party/wiredtiger/src/include/tiered.h index d4b973da98c..31fcdf3f9b3 100644 --- a/src/third_party/wiredtiger/src/include/tiered.h +++ b/src/third_party/wiredtiger/src/include/tiered.h @@ -64,7 +64,7 @@ struct __wt_tiered_work_unit { uint32_t type; /* Type of operation */ uint64_t op_val; /* A value for the operation */ WT_TIERED *tiered; /* Tiered tree */ - uint64_t id; /* Id of the object */ + uint32_t id; /* Id of the object */ /* AUTOMATIC FLAG VALUE GENERATION START */ #define WT_TIERED_WORK_FORCE 0x1u /* Force operation */ #define WT_TIERED_WORK_FREE 0x2u /* Free data after operation */ @@ -113,8 +113,8 @@ struct __wt_tiered { WT_BLOCK_FILE_OPENER opener; - uint64_t current_id; /* Current object id number */ - uint64_t next_id; /* Next object number */ + uint32_t current_id; /* Current object id number */ + uint32_t next_id; /* Next object number */ WT_COLLATOR *collator; /* TODO: handle custom collation */ /* TODO: What about compression, encryption, etc? Do we need to worry about that here? */ @@ -125,6 +125,7 @@ struct __wt_tiered { uint32_t flags; }; +/* FIXME: Currently the WT_TIERED_OBJECT data structure is not used. */ /* * WT_TIERED_OBJECT -- * Definition of a tiered object. This is a single object in a tiered tree. @@ -149,6 +150,7 @@ struct __wt_tiered_object { uint32_t flags; }; +/* FIXME: Currently the WT_TIERED_TREE data structure is not used. */ /* * WT_TIERED_TREE -- * Definition of the shared tiered portion of a tree. diff --git a/src/third_party/wiredtiger/src/tiered/tiered_handle.c b/src/third_party/wiredtiger/src/tiered/tiered_handle.c index e9fd555b2ef..007f8f5de39 100644 --- a/src/third_party/wiredtiger/src/tiered/tiered_handle.c +++ b/src/third_party/wiredtiger/src/tiered/tiered_handle.c @@ -275,7 +275,7 @@ __tiered_update_metadata(WT_SESSION_IMPL *session, WT_TIERED *tiered, const char newconfig = NULL; WT_RET(__wt_scr_alloc(session, 0, &tmp)); - WT_RET(__wt_buf_fmt(session, tmp, "last=%" PRIu64 ",tiers=(", tiered->current_id)); + WT_RET(__wt_buf_fmt(session, tmp, "last=%" PRIu32 ",tiers=(", tiered->current_id)); for (i = 0; i < WT_TIERED_MAX_TIERS; ++i) { if (tiered->tiers[i].name == NULL) { __wt_verbose(session, WT_VERB_TIERED, "TIER_UPDATE_META: names[%" PRIu32 "] NULL", i); @@ -404,7 +404,7 @@ __wt_tiered_switch(WT_SESSION_IMPL *session, const char *config) */ int __wt_tiered_name( - WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle, uint64_t id, uint32_t flags, const char **retp) + WT_SESSION_IMPL *session, WT_DATA_HANDLE *dhandle, uint32_t id, uint32_t flags, const char **retp) { WT_DECL_ITEM(tmp); WT_DECL_RET; @@ -429,12 +429,12 @@ __wt_tiered_name( if (LF_ISSET(WT_TIERED_NAME_PREFIX)) WT_ERR(__wt_buf_fmt(session, tmp, "file:%s-", name)); else - WT_ERR(__wt_buf_fmt(session, tmp, "file:%s-%010" PRIu64 ".wtobj", name, id)); + WT_ERR(__wt_buf_fmt(session, tmp, "file:%s-%010" PRIu32 ".wtobj", name, id)); } else if (LF_ISSET(WT_TIERED_NAME_OBJECT)) { if (LF_ISSET(WT_TIERED_NAME_PREFIX)) WT_ERR(__wt_buf_fmt(session, tmp, "object:%s-", name)); else - WT_ERR(__wt_buf_fmt(session, tmp, "object:%s-%010" PRIu64 ".wtobj", name, id)); + WT_ERR(__wt_buf_fmt(session, tmp, "object:%s-%010" PRIu32 ".wtobj", name, id)); } else { WT_ASSERT(session, !LF_ISSET(WT_TIERED_NAME_PREFIX)); WT_ASSERT(session, LF_ISSET(WT_TIERED_NAME_SHARED)); @@ -504,7 +504,7 @@ __tiered_open(WT_SESSION_IMPL *session, const char *cfg[]) WT_ERR(__wt_strndup(session, cval.str, cval.len, &tiered->value_format)); WT_ERR(__wt_config_getones(session, config, "last", &cval)); - tiered->current_id = (uint64_t)cval.val; + tiered->current_id = (uint32_t)cval.val; tiered->next_id = tiered->current_id + 1; __wt_verbose(session, WT_VERB_TIERED, "TIERED_OPEN: current %d, next %d", (int)tiered->current_id, (int)tiered->next_id); diff --git a/src/third_party/wiredtiger/src/tiered/tiered_opener.c b/src/third_party/wiredtiger/src/tiered/tiered_opener.c index 66b07713822..0e28bcdcbcb 100644 --- a/src/third_party/wiredtiger/src/tiered/tiered_opener.c +++ b/src/third_party/wiredtiger/src/tiered/tiered_opener.c @@ -13,7 +13,7 @@ * Open an object by number. */ static int -__tiered_opener_open(WT_BLOCK_FILE_OPENER *opener, WT_SESSION_IMPL *session, uint64_t object_id, +__tiered_opener_open(WT_BLOCK_FILE_OPENER *opener, WT_SESSION_IMPL *session, uint32_t object_id, WT_FS_OPEN_FILE_TYPE type, u_int flags, WT_FH **fhp) { WT_BUCKET_STORAGE *bstorage; @@ -53,7 +53,7 @@ err: * __tiered_opener_current_id -- * Get the current writeable object id. */ -static uint64_t +static uint32_t __tiered_opener_current_id(WT_BLOCK_FILE_OPENER *opener) { WT_TIERED *tiered; diff --git a/src/third_party/wiredtiger/src/tiered/tiered_work.c b/src/third_party/wiredtiger/src/tiered/tiered_work.c index 728a7a0b3b2..69104fddd33 100644 --- a/src/third_party/wiredtiger/src/tiered/tiered_work.c +++ b/src/third_party/wiredtiger/src/tiered/tiered_work.c @@ -98,7 +98,7 @@ __wt_tiered_get_drop_shared(WT_SESSION_IMPL *session, WT_TIERED_WORK_UNIT **entr * Add a drop local work unit for the given ID to the queue. */ int -__wt_tiered_put_drop_local(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t id) +__wt_tiered_put_drop_local(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id) { WT_TIERED_WORK_UNIT *entry; uint64_t now; @@ -120,7 +120,7 @@ __wt_tiered_put_drop_local(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t * Add a drop shared work unit for the given ID to the queue. */ int -__wt_tiered_put_drop_shared(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint64_t id) +__wt_tiered_put_drop_shared(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id) { WT_TIERED_WORK_UNIT *entry; |