diff --git a/src/box/alter.cc b/src/box/alter.cc index a09102be3cee9b99f590e3ebdc3f5390ddb40aa6..89bd4d90839529d9fd8f3a1c26815555d5985bc0 100644 --- a/src/box/alter.cc +++ b/src/box/alter.cc @@ -2065,8 +2065,8 @@ space_check_truncate(struct space *space) /** * Check whether @a old_space holders prohibit alter to @a new_space_def. - * For example if the space becomes temporary, there can be foreign keys - * from non-temporary space, so this alter must not be allowed. + * For example if the space becomes data-temporary, there can be foreign keys + * from non-data-temporary space, so this alter must not be allowed. * Return 0 if allowed, or -1 if not allowed (diag is set). */ static int @@ -2078,9 +2078,11 @@ space_check_alter(struct space *old_space, struct space_def *new_space_def) * required below. */ assert(old_space->def->opts.group_id == new_space_def->opts.group_id); - /* Only alter from non-temporary to temporary can cause problems. */ - if (space_is_temporary(old_space) || - !space_opts_is_temporary(&new_space_def->opts)) + /* Only alter from non-data-temporary to data-temporary can cause + * problems. + */ + if (space_is_data_temporary(old_space) || + !space_opts_is_data_temporary(&new_space_def->opts)) return 0; /* Check for foreign keys that refers to this space. */ struct space_cache_holder *h; @@ -2094,15 +2096,16 @@ space_check_alter(struct space *old_space, struct space_def *new_space_def) space_cache_holder); struct space *other_space = constr->space; /* - * If the referring space is temporary too then the alter + * If the referring space is data-temporary too then the alter * can't break foreign key consistency after restart. */ - if (space_opts_is_temporary(&other_space->def->opts)) + if (space_opts_is_data_temporary(&other_space->def->opts)) continue; diag_set(ClientError, ER_ALTER_SPACE, space_name(old_space), - tt_sprintf("foreign key '%s' from non-temporary space" - " '%s' can't refer to temporary space", + tt_sprintf("foreign key '%s' from non-data-temporary" + " space '%s' can't refer to data-temporary" + " space", constr->def.name, space_name(other_space))); return -1; } @@ -2795,9 +2798,9 @@ on_replace_dd_truncate(struct trigger * /* trigger */, void *event) * box_process1() bypasses the read-only check for the _truncate system * space because there the space that is going to be truncated isn't yet * known. Perform the check here if this statement was issued by this - * replica and the space isn't temporary or local. + * replica and the space isn't data-temporary or local. */ - bool is_temp = space_is_temporary(old_space) || + bool is_temp = space_is_data_temporary(old_space) || space_is_local(old_space); if (!is_temp && stmt->row->replica_id == 0 && box_check_writable() != 0) @@ -2834,7 +2837,7 @@ on_replace_dd_truncate(struct trigger * /* trigger */, void *event) /* * Modify the WAL header to prohibit - * replication of local & temporary + * replication of local & data-temporary * spaces truncation. */ if (is_temp) { diff --git a/src/box/box.cc b/src/box/box.cc index 59ce162b4ddc122e75f3d843c4a51c1c49b22f81..b5614051382dfa2686fbdfe71eebc643426e2ad7 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -3416,23 +3416,24 @@ box_process1(struct request *request, box_tuple_t **result) if (space == NULL) return -1; /* - * Allow to write to temporary and local spaces in the read-only mode. - * To handle space truncation, we postpone the read-only check for the - * _truncate system space till the on_replace trigger is called, when - * we know which space is truncated. + * Allow to write to data-temporary and local spaces in the read-only + * mode. To handle space truncation, we postpone the read-only check for + * the _truncate system space till the on_replace trigger is called, + * when we know which space is truncated. */ if (space_id(space) != BOX_TRUNCATE_ID && - !space_is_temporary(space) && + !space_is_data_temporary(space) && !space_is_local(space) && box_check_writable() != 0) return -1; if (space_is_memtx(space)) { /* * Due to on_init_schema triggers set on system spaces, - * we can insert data during recovery to local and temporary - * spaces. However, until recovery is finished, we can't - * check key uniqueness (since indexes are still not yet built). - * So reject any attempts to write into these spaces. + * we can insert data during recovery to local and + * data-temporary spaces. However, until recovery is finished, + * we can't check key uniqueness (since indexes are still not + * yet built). So reject any attempts to write into these + * spaces. */ if (memtx_space_is_recovering(space)) { diag_set(ClientError, ER_UNSUPPORTED, "Snapshot recovery", diff --git a/src/box/engine.h b/src/box/engine.h index f521c19c31508330d24cfcfbf215568feb08fe19..3462d8647e2f8d4ca15a7d0252a25a50fcca91d8 100644 --- a/src/box/engine.h +++ b/src/box/engine.h @@ -248,8 +248,8 @@ struct engine_vtab { void (*reset_stat)(struct engine *); /** * Check definition of a new space for engine-specific - * limitations. E.g. not all engines support temporary - * tables. + * limitations. E.g. not all engines support data-temporary + * spaces. */ int (*check_space_def)(struct space_def *); }; diff --git a/src/box/lua/space.cc b/src/box/lua/space.cc index e6bb82859adbbdfb17b1911d83790672315cb4d8..953077bde704c312270cde63f007f042bb53fbec 100644 --- a/src/box/lua/space.cc +++ b/src/box/lua/space.cc @@ -306,7 +306,7 @@ lbox_fillspace(struct lua_State *L, struct space *space, int i) /* space.temporary */ lua_pushstring(L, "temporary"); - lua_pushboolean(L, space_is_temporary(space)); + lua_pushboolean(L, space_is_data_temporary(space)); lua_settable(L, i); /* space.type */ diff --git a/src/box/memtx_allocator.h b/src/box/memtx_allocator.h index 464f10682427763daa89a1989fdeeeecf1e2ada4..134b5306228df565c19603add9e79eb52fff97ac 100644 --- a/src/box/memtx_allocator.h +++ b/src/box/memtx_allocator.h @@ -137,9 +137,9 @@ memtx_tuple_rv_version(struct memtx_tuple_rv *rv) * for each type maintain an independent list. */ enum memtx_tuple_rv_type { - /** Tuples from non-temporary spaces. */ + /** Tuples from non-data-temporary spaces. */ memtx_tuple_rv_default, - /** Tuples from temporary spaces. */ + /** Tuples from data-temporary spaces. */ memtx_tuple_rv_temporary, memtx_tuple_rv_type_MAX, }; @@ -221,7 +221,7 @@ class MemtxAllocator { } ReadView *rv = (ReadView *)xcalloc(1, sizeof(*rv)); for (int type = 0; type < memtx_tuple_rv_type_MAX; type++) { - if (!opts->enable_temporary_spaces && + if (!opts->enable_data_temporary_spaces && type == memtx_tuple_rv_temporary) continue; rv->rv[type] = memtx_tuple_rv_new(read_view_version, diff --git a/src/box/memtx_space.c b/src/box/memtx_space.c index 77ead68702b8e42bf6655b7a879e625a82fef8ad..1944cb63a173f75dd0af3f66dd5e2b1eadf927e5 100644 --- a/src/box/memtx_space.c +++ b/src/box/memtx_space.c @@ -1401,9 +1401,11 @@ memtx_space_prepare_alter(struct space *old_space, struct space *new_space) struct memtx_space *new_memtx_space = (struct memtx_space *)new_space; if (old_memtx_space->bsize != 0 && - space_is_temporary(old_space) != space_is_temporary(new_space)) { + space_is_data_temporary(old_space) != + space_is_data_temporary(new_space)) { diag_set(ClientError, ER_ALTER_SPACE, old_space->def->name, - "can not switch temporary flag on a non-empty space"); + "can not change data-temporariness on a non-empty " + "space"); return -1; } diff --git a/src/box/read_view.c b/src/box/read_view.c index 3f5407cd38b0da96185eeb72497cdb22b46a7854..fa12a9ed14df96f382fe81302da6a026b8c2808a 100644 --- a/src/box/read_view.c +++ b/src/box/read_view.c @@ -67,7 +67,7 @@ read_view_opts_create(struct read_view_opts *opts) opts->filter_arg = NULL; opts->enable_field_names = false; opts->enable_space_upgrade = false; - opts->enable_temporary_spaces = false; + opts->enable_data_temporary_spaces = false; opts->disable_decompression = false; } @@ -157,7 +157,8 @@ read_view_add_space_cb(struct space *space, void *arg_raw) struct read_view *rv = arg->rv; const struct read_view_opts *opts = arg->opts; if ((space->engine->flags & ENGINE_SUPPORTS_READ_VIEW) == 0 || - (space_is_temporary(space) && !opts->enable_temporary_spaces) || + (space_is_data_temporary(space) && + !opts->enable_data_temporary_spaces) || !opts->filter_space(space, opts->filter_arg)) return 0; struct space_read_view *space_rv = space_read_view_new(space, opts); diff --git a/src/box/read_view.h b/src/box/read_view.h index 6349deac47f8d6c535094a18492514e646595064..2c6c2f9e10ac493f0efa5f2f6d694b70093b228c 100644 --- a/src/box/read_view.h +++ b/src/box/read_view.h @@ -162,10 +162,10 @@ struct read_view_opts { */ bool enable_space_upgrade; /** - * Temporary spaces aren't included into this read view unless this + * Data-temporary spaces aren't included into this read view unless this * flag is set. */ - bool enable_temporary_spaces; + bool enable_data_temporary_spaces; /** * Memtx-specific. Disables decompression of tuples fetched from * the read view. Setting this flag makes the raw read view methods diff --git a/src/box/space.c b/src/box/space.c index 1a2bbe68e8c51e42751776160dc58a3fe17b9f1a..400cee16396ea4f4776598b77e950a34e366f101 100644 --- a/src/box/space.c +++ b/src/box/space.c @@ -429,7 +429,7 @@ space_new(struct space_def *def, struct rlist *key_list) struct space * space_new_ephemeral(struct space_def *def, struct rlist *key_list) { - assert(space_opts_is_temporary(&def->opts)); + assert(space_opts_is_data_temporary(&def->opts)); assert(def->opts.is_ephemeral); struct space *space = space_new(def, key_list); if (space == NULL) diff --git a/src/box/space.h b/src/box/space.h index d60daa3fa0c059ee2cf2a18b3b67267e3b22d5ea..36cbe1d8481384257629ecf9b704ad34e736b3cc 100644 --- a/src/box/space.h +++ b/src/box/space.h @@ -340,11 +340,11 @@ space_name(const struct space *space) return space->def->name; } -/** Return true if space is temporary. */ +/** Return true if space is data-temporary. */ static inline bool -space_is_temporary(const struct space *space) +space_is_data_temporary(const struct space *space) { - return space_opts_is_temporary(&space->def->opts); + return space_opts_is_data_temporary(&space->def->opts); } /** Return true if space is synchronous. */ diff --git a/src/box/space_def.c b/src/box/space_def.c index 48bc26813a793757cd56e0c0bc31ac3067bba560..b698dd27e9f079cdec6e40c333c29da7db8e0c21 100644 --- a/src/box/space_def.c +++ b/src/box/space_def.c @@ -113,7 +113,7 @@ space_tuple_format_new(struct tuple_format_vtab *vtab, void *engine, return tuple_format_new(vtab, engine, keys, key_count, def->fields, def->field_count, def->exact_field_count, def->dict, - space_opts_is_temporary(&def->opts), + space_opts_is_data_temporary(&def->opts), def->opts.is_ephemeral, def->opts.constraint_def, def->opts.constraint_count); @@ -276,8 +276,7 @@ space_opts_parse_temporary(const char **data, void *vopts, "only one of 'type' or 'temporary' may be specified"); return -1; } - bool is_temporary = mp_decode_bool(data); - opts->type = is_temporary ? + opts->type = mp_decode_bool(data) ? SPACE_TYPE_DATA_TEMPORARY : SPACE_TYPE_NORMAL; return 0; } diff --git a/src/box/space_def.h b/src/box/space_def.h index 2b40585eac5774f78daddc4a0373c61c69d6bac9..e63b3cdf4474c2cf7989211d71dc9d1ec9ebc482 100644 --- a/src/box/space_def.h +++ b/src/box/space_def.h @@ -129,10 +129,10 @@ space_opts_create(struct space_opts *opts) } /** - * Check if the space is temporary. + * Check if the space is data-temporary. */ static inline bool -space_opts_is_temporary(const struct space_opts *opts) +space_opts_is_data_temporary(const struct space_opts *opts) { assert(opts->type != SPACE_TYPE_DEFAULT); return opts->type != SPACE_TYPE_NORMAL; diff --git a/src/box/tuple.h b/src/box/tuple.h index fba748463d44513aae368291f31d8f4be09de6ec..8d985e1829155870a1abc762b2c6eff4d98ca29e 100644 --- a/src/box/tuple.h +++ b/src/box/tuple.h @@ -364,7 +364,7 @@ enum tuple_flag { */ TUPLE_IS_DIRTY = 1, /** - * The tuple belongs to a temporary space so it can be freed + * The tuple belongs to a data-temporary space so it can be freed * immediately while a snapshot is in progress. */ TUPLE_IS_TEMPORARY = 2, diff --git a/src/box/tuple_constraint_fkey.c b/src/box/tuple_constraint_fkey.c index 8d7f0d7d2840550aa54d1ade544e4451932c4902..a1a1209de36301ad02712263391011d1fa2d30c5 100644 --- a/src/box/tuple_constraint_fkey.c +++ b/src/box/tuple_constraint_fkey.c @@ -629,11 +629,12 @@ tuple_constraint_fkey_check_spaces(struct tuple_constraint *constr, struct space *space, struct space *foreign_space) { - if (space_is_temporary(foreign_space) && !space_is_temporary(space)) { + if (space_is_data_temporary(foreign_space) && + !space_is_data_temporary(space)) { diag_set(ClientError, ER_CREATE_FOREIGN_KEY, constr->def.name, constr->space->def->name, - "foreign key from non-temporary space" - " can't refer to temporary space"); + "foreign key from non-data-temporary space" + " can't refer to data-temporary space"); return -1; } if (space_is_local(foreign_space) && !space_is_local(space)) { diff --git a/src/box/tuple_format.h b/src/box/tuple_format.h index 8f320ae737f8031e7a2c97832ff86ad1da46bb4c..5009d7a653aaf045af9e80652137b3de312b6954 100644 --- a/src/box/tuple_format.h +++ b/src/box/tuple_format.h @@ -222,7 +222,7 @@ struct tuple_format { /** Reference counter */ int refs; /** - * Tuples of this format belong to a temporary space and + * Tuples of this format belong to a data-temporary space and * hence can be freed immediately while checkpointing is * in progress. */ @@ -387,7 +387,7 @@ tuple_format_unref(struct tuple_format *format) * @param space_fields Array of fields, defined in a space format. * @param space_field_count Length of @a space_fields. * @param exact_field_count Exact field count for format. - * @param is_temporary Set if format belongs to temporary space. + * @param is_temporary Set if format belongs to data-temporary space. * @param is_reusable Set if format may be reused. * @param constraint_def - Array of constraint definitions. * @param constraint_count - Number of constraints above. diff --git a/src/box/txn.c b/src/box/txn.c index ec42ce5f92613b869f91c0b9b8c8efeaefbf67b6..8a85e0feeac145b8bcf4c6c77f8195e468a47f07 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -618,10 +618,10 @@ txn_commit_stmt(struct txn *txn, struct request *request) /* * Create WAL record for the write requests in - * non-temporary spaces. stmt->space can be NULL for + * non-data-temporary spaces. stmt->space can be NULL for * IRPOTO_NOP or IPROTO_RAFT_CONFIRM. */ - if (stmt->space == NULL || !space_is_temporary(stmt->space)) { + if (stmt->space == NULL || !space_is_data_temporary(stmt->space)) { if (txn_add_redo(txn, stmt, request) != 0) goto fail; assert(stmt->row != NULL); @@ -1317,10 +1317,10 @@ txn_check_space_linearizability(const struct txn *txn, * require checking whether **any** node in the replicaset has * committed something, which's impossible as soon as at least one node * becomes unavailable. - * The only exception are local and temporary spaces, which only store - * updates present on this particular node. + * The only exception are local and data-temporary spaces, which only + * store updates present on this particular node. */ - if (!space_is_sync(space) && !space_is_temporary(space) && + if (!space_is_sync(space) && !space_is_data_temporary(space) && !space_is_local(space)) { diag_set(ClientError, ER_UNSUPPORTED, tt_sprintf("space \"%s\"", space_name(space)), diff --git a/src/box/vinyl.c b/src/box/vinyl.c index ed8118b29d7284090719070896b83953d3da5b94..51bfeb4cbc5cd616319adc167a10f5ebf3ebd5bc 100644 --- a/src/box/vinyl.c +++ b/src/box/vinyl.c @@ -586,9 +586,10 @@ vinyl_engine_check_space_def(struct space_def *def) return -1; } } - if (space_opts_is_temporary(&def->opts)) { + if (space_opts_is_data_temporary(&def->opts)) { diag_set(ClientError, ER_ALTER_SPACE, - def->name, "engine does not support temporary flag"); + def->name, + "engine does not support data-temporary spaces"); return -1; } return 0; diff --git a/src/box/wal.c b/src/box/wal.c index 486c99c0a877270fb9796c2ae76463ad18eccee7..6938b54b565bc0cdaf23044bb8e2ddb46b3f9fa6 100644 --- a/src/box/wal.c +++ b/src/box/wal.c @@ -1046,7 +1046,7 @@ wal_assign_lsn(struct vclock *vclock_diff, struct vclock *base, * instance id. This is also true for * anonymous replicas, since they are * only capable of writing to local and - * temporary spaces. + * data-temporary spaces. */ if ((*row)->group_id != GROUP_LOCAL) (*row)->replica_id = instance_id; diff --git a/test/box-luatest/gh_5616_temp_space_truncate_ro_test.lua b/test/box-luatest/gh_5616_temp_space_truncate_ro_test.lua index 0dd944760fda5109c3760f57bcc3571aee74a90e..e384e2754389ca1106a4a0a59228d15986ef0700 100644 --- a/test/box-luatest/gh_5616_temp_space_truncate_ro_test.lua +++ b/test/box-luatest/gh_5616_temp_space_truncate_ro_test.lua @@ -21,7 +21,7 @@ g_single.after_each(function(cg) end) end) --- Checks that a temporary space can be truncated in the read-only mode. +-- Checks that a data-temporary space can be truncated in the read-only mode. g_single.test_temp_space_truncate_ro = function(cg) cg.server:exec(function() local s = box.schema.create_space('test', {temporary = true}) @@ -89,8 +89,8 @@ g_replication.after_each(function(cg) cg.replica:wait_for_vclock_of(cg.master) end) --- Checks that a truncate operation for a temporary space isn't replicated to --- a read-only replica. +-- Checks that a truncate operation for a data-temporary space isn't replicated +-- to a read-only replica. g_replication.test_temp_space_truncate_ro = function(cg) cg.master:exec(function() local s = box.schema.create_space('test', {temporary = true}) diff --git a/test/box/alter.result b/test/box/alter.result index 8f7eaad52c85d04ee9b073f5755fb886c4005355..295d2729cd68d5074f845967e8edb5c0fb4f7397 100644 --- a/test/box/alter.result +++ b/test/box/alter.result @@ -1399,7 +1399,7 @@ s:alter({format = {{{1, 2, 3, 4}}}}) - error: 'Illegal parameters, format[1]: name (string) is expected' ... -- --- Alter temporary. +-- Alter data-temporary. -- s:alter({temporary = true}) --- diff --git a/test/box/alter.test.lua b/test/box/alter.test.lua index 522d9ea750473400b01f34a43e023cfb36c5c514..9413bf0f6b904e107b0f9277dedc680773c9568b 100644 --- a/test/box/alter.test.lua +++ b/test/box/alter.test.lua @@ -556,7 +556,7 @@ s:alter({format = true}) s:alter({format = {{{1, 2, 3, 4}}}}) -- --- Alter temporary. +-- Alter data-temporary. -- s:alter({temporary = true}) assert(s.temporary) diff --git a/test/box/before_replace.result b/test/box/before_replace.result index 34c94dcb7ee01d1e35def7d99a955e467afdd3ca..be73f6c5062f8d006449eb8fce6e375271f6f8b3 100644 --- a/test/box/before_replace.result +++ b/test/box/before_replace.result @@ -834,7 +834,7 @@ s:drop() --- ... -- --- gh-4266 triggers on temporary space fail +-- gh-4266 triggers on data-temporary space fail -- s = box.schema.space.create('test', {temporary = true}) --- diff --git a/test/box/before_replace.test.lua b/test/box/before_replace.test.lua index a29a0f1e9e0ef1417e6e8ee136f97de3f79fe6b9..9f32f4a974a7ac0c36591581192115331bb08eee 100644 --- a/test/box/before_replace.test.lua +++ b/test/box/before_replace.test.lua @@ -293,7 +293,7 @@ save_type s:drop() -- --- gh-4266 triggers on temporary space fail +-- gh-4266 triggers on data-temporary space fail -- s = box.schema.space.create('test', {temporary = true}) diff --git a/test/box/errinj.result b/test/box/errinj.result index 14d6c9e7066bc94006a5e28a9c006be278283f9b..98b202a647b983bc5e576523223c23e6a8a5b2ed 100644 --- a/test/box/errinj.result +++ b/test/box/errinj.result @@ -1353,7 +1353,7 @@ _ = box.space.test:create_index('pk') for i = 1, 100 do box.space.test:insert{i} end --- ... --- Create a temporary space. +-- Create a data-temporary space. count = 500 --- ... @@ -1380,7 +1380,7 @@ box.error.injection.set('ERRINJ_SNAP_WRITE_DELAY', true) _ = fiber.create(function() box.snapshot() c:put(true) end) --- ... --- Overwrite data stored in the temporary space while snapshot +-- Overwrite data stored in the data-temporary space while snapshot -- is in progress to make sure that tuples stored in it are freed -- immediately. for i = 1, count do box.space.tmp:delete{i} end diff --git a/test/box/errinj.test.lua b/test/box/errinj.test.lua index be351418a750a9b453a0cd1cd15b7b864c320880..9b513a7f735dce3213eaeef2aa0f16bb4a03d38c 100644 --- a/test/box/errinj.test.lua +++ b/test/box/errinj.test.lua @@ -498,7 +498,7 @@ _ = box.schema.space.create('test') _ = box.space.test:create_index('pk') for i = 1, 100 do box.space.test:insert{i} end --- Create a temporary space. +-- Create a data-temporary space. count = 500 pad = string.rep('x', 100 * 1024) _ = box.schema.space.create('tmp', {temporary = true}) @@ -510,7 +510,7 @@ c = fiber.channel(1) box.error.injection.set('ERRINJ_SNAP_WRITE_DELAY', true) _ = fiber.create(function() box.snapshot() c:put(true) end) --- Overwrite data stored in the temporary space while snapshot +-- Overwrite data stored in the data-temporary space while snapshot -- is in progress to make sure that tuples stored in it are freed -- immediately. for i = 1, count do box.space.tmp:delete{i} end diff --git a/test/box/on_replace.result b/test/box/on_replace.result index 35a8422397365f9bd0054616529ddf456e83ecaf..04f7dc541a99e70c2194b785429c7fe8e67159cf 100644 --- a/test/box/on_replace.result +++ b/test/box/on_replace.result @@ -749,7 +749,7 @@ s:drop() --- ... -- --- gh-4266 triggers on temporary space fail +-- gh-4266 triggers on data-temporary space fail -- s = box.schema.space.create('test', {temporary = true}) --- diff --git a/test/box/on_replace.test.lua b/test/box/on_replace.test.lua index 79c828dadb9cfce5100723a2f9d787ab00a39210..e0da1869c3fede688285040aaf93921ed97f87e5 100644 --- a/test/box/on_replace.test.lua +++ b/test/box/on_replace.test.lua @@ -299,7 +299,7 @@ save_type s:drop() -- --- gh-4266 triggers on temporary space fail +-- gh-4266 triggers on data-temporary space fail -- s = box.schema.space.create('test', {temporary = true}) diff --git a/test/box/temp_spaces.result b/test/box/temp_spaces.result index eb4bdb3423a0a1a80f57871e725863e1b5a89ed0..28cb1ded153b23712ce158620ec05b2e71f3c65c 100644 --- a/test/box/temp_spaces.result +++ b/test/box/temp_spaces.result @@ -1,8 +1,8 @@ --- temporary spaces +-- data-temporary spaces _space = box.space._space --- ... --- not a temporary +-- not a data-temporary FLAGS = 6 --- ... @@ -16,7 +16,7 @@ s.temporary s:drop() --- ... --- not a temporary, too +-- not a data-temporary, too s = box.schema.space.create('t', { temporary = false }) --- ... @@ -27,7 +27,7 @@ s.temporary s:drop() --- ... --- not a temporary, too +-- not a data-temporary, too s = box.schema.space.create('t', { temporary = nil }) --- ... @@ -65,14 +65,14 @@ s.temporary ... _ = _space:update(s.id, {{'=', FLAGS, {temporary = false}}}) --- -- error: 'Can''t modify space ''t'': can not switch temporary flag on a non-empty +- error: 'Can''t modify space ''t'': can not change data-temporariness on a non-empty space' ... s.temporary --- - true ... --- check that temporary space can be modified in read-only mode (gh-1378) +-- check that data-temporary space can be modified in read-only mode (gh-1378) box.cfg{read_only=true} --- ... diff --git a/test/box/temp_spaces.test.lua b/test/box/temp_spaces.test.lua index 4d9f680bd7a3a2d18a85cc07866c2b5118c1fcde..0f8d4346ef8c57593857f9a0bf038e2e78ce656e 100644 --- a/test/box/temp_spaces.test.lua +++ b/test/box/temp_spaces.test.lua @@ -1,17 +1,17 @@ --- temporary spaces +-- data-temporary spaces _space = box.space._space --- not a temporary +-- not a data-temporary FLAGS = 6 s = box.schema.space.create('t', { temporary = true }) s.temporary s:drop() --- not a temporary, too +-- not a data-temporary, too s = box.schema.space.create('t', { temporary = false }) s.temporary s:drop() --- not a temporary, too +-- not a data-temporary, too s = box.schema.space.create('t', { temporary = nil }) s.temporary s:drop() @@ -28,7 +28,7 @@ s.temporary _ = _space:update(s.id, {{'=', FLAGS, {temporary = false}}}) s.temporary --- check that temporary space can be modified in read-only mode (gh-1378) +-- check that data-temporary space can be modified in read-only mode (gh-1378) box.cfg{read_only=true} box.cfg.read_only s:insert{2, 3, 4} diff --git a/test/engine-luatest/gh_8936_foreign_key_wrong_reference_test.lua b/test/engine-luatest/gh_8936_foreign_key_wrong_reference_test.lua index 1f2a8bfc2032e0ad47cda616b3430d198531d193..de23bf5f6341497ef39dd842945e38200888df82 100644 --- a/test/engine-luatest/gh_8936_foreign_key_wrong_reference_test.lua +++ b/test/engine-luatest/gh_8936_foreign_key_wrong_reference_test.lua @@ -1,5 +1,5 @@ -- https://github.com/tarantool/tarantool/issues/8936 --- Test foreign keys to temporary and local spaces. +-- Test foreign keys to data-temporary and local spaces. local server = require('luatest.server') local t = require('luatest') @@ -37,7 +37,7 @@ g.after_each(function(cg) end) end) --- Foreign key must not refer to temporary space from normal space. +-- Foreign key must not refer to data-temporary space from normal space. g.test_field_foreign_key_temporary = function(cg) local engine = cg.params.engine local country_is_temporary = cg.params.country_variant @@ -46,7 +46,8 @@ g.test_field_foreign_key_temporary = function(cg) t.skip_if(engine == 'vinyl') cg.server:exec(function(engine, country_is_temporary, city_is_temporary) - -- foreign key must not point for non-temporary to temporary space. + -- foreign key must not point for non-data-temporary to data-temporary + -- space. local must_be_prohibited = country_is_temporary and not city_is_temporary @@ -72,8 +73,8 @@ g.test_field_foreign_key_temporary = function(cg) if must_be_prohibited then t.assert_error_msg_content_equals( "Failed to create foreign key 'country' in space 'city': " .. - "foreign key from non-temporary space " .. - "can't refer to temporary space", + "foreign key from non-data-temporary space " .. + "can't refer to data-temporary space", box.schema.create_space, 'city', city_opts ) return nil @@ -87,8 +88,8 @@ g.test_field_foreign_key_temporary = function(cg) if country_is_temporary and city_is_temporary then t.assert_error_msg_content_equals( "Failed to create foreign key 'country' in space 'city': " .. - "foreign key from non-temporary space " .. - "can't refer to temporary space", + "foreign key from non-data-temporary space " .. + "can't refer to data-temporary space", city.alter, city, {temporary = false} ) country:alter{temporary = false} @@ -97,7 +98,8 @@ g.test_field_foreign_key_temporary = function(cg) if not country_is_temporary and not city_is_temporary then t.assert_error_msg_content_equals( "Can't modify space 'country': foreign key 'country' from " .. - "non-temporary space 'city' can't refer to temporary space", + "non-data-temporary space 'city' can't refer to " .. + "data-temporary space", country.alter, country, {temporary = true} ) city:alter{temporary = true} @@ -142,7 +144,8 @@ g.test_field_foreign_key_local = function(cg) local city_is_local = cg.params.city_variant cg.server:exec(function(engine, country_is_local, city_is_local) - -- foreign key must not point for non-temporary to temporary space. + -- foreign key must not point for non-data-temporary to data-temporary + -- space. local must_be_prohibited = country_is_local and not city_is_local diff --git a/test/replication/local_spaces.result b/test/replication/local_spaces.result index 4855d8a88990fb46ecbd6bca359836504cfeeb6a..0f07cc28a3fa66a83f19783f6d15579821afa415 100644 --- a/test/replication/local_spaces.result +++ b/test/replication/local_spaces.result @@ -55,8 +55,8 @@ box.space._space:insert{9000, 1, 'test', engine, 0, {group_id = 2}, {}} -- error --- - error: Replication group '2' does not exist ... --- Temporary local spaces should behave in the same fashion as --- plain temporary spaces, i.e. neither replicated nor persisted. +-- Data-temporary local spaces should behave in the same fashion as +-- plain data-temporary spaces, i.e. neither replicated nor persisted. s3 = box.schema.space.create('test3', {is_local = true, temporary = true}) --- ... @@ -71,7 +71,7 @@ s3.temporary --- - true ... --- gh-4263 The truncation of the local & temporary space +-- gh-4263 The truncation of the local & data-temporary space -- should not spread among the replicas s4 = box.schema.space.create('test4', {is_local = true}) --- diff --git a/test/replication/local_spaces.test.lua b/test/replication/local_spaces.test.lua index c5e2240302e0a027eec5fdb10f84d2b3da839e9f..6c98bf436f12588e1609aadad2b26bc821145c3d 100644 --- a/test/replication/local_spaces.test.lua +++ b/test/replication/local_spaces.test.lua @@ -26,14 +26,14 @@ box.space._space:update(s2.id, {{'=', 6, {group_id = 0}}}) -- error -- 0 (global) and 1 (local) box.space._space:insert{9000, 1, 'test', engine, 0, {group_id = 2}, {}} -- error --- Temporary local spaces should behave in the same fashion as --- plain temporary spaces, i.e. neither replicated nor persisted. +-- Data-temporary local spaces should behave in the same fashion as +-- plain data-temporary spaces, i.e. neither replicated nor persisted. s3 = box.schema.space.create('test3', {is_local = true, temporary = true}) _ = s3:create_index('pk') s3.is_local s3.temporary --- gh-4263 The truncation of the local & temporary space +-- gh-4263 The truncation of the local & data-temporary space -- should not spread among the replicas s4 = box.schema.space.create('test4', {is_local = true}) _ = s4:create_index('pk') diff --git a/test/sql/misc.result b/test/sql/misc.result index 31324ad0fd405d3aaec90a898f14e023a4cf8cc2..17489f6c21d7a25a492cee33921c0bbf4567137c 100644 --- a/test/sql/misc.result +++ b/test/sql/misc.result @@ -136,7 +136,7 @@ box.execute('SELECT X\'4D6564766564\'') - ['Medved'] ... -- --- gh-4139: assertion when reading a temporary space. +-- gh-4139: assertion when reading a data-temporary space. -- format = {{name = 'id', type = 'integer'}} --- diff --git a/test/sql/misc.test.lua b/test/sql/misc.test.lua index 7ed0b86c39f0d73006138b2a64c1e1da8d519e3a..43098fac6610e6a403ca44dffced5fd3bee48d75 100644 --- a/test/sql/misc.test.lua +++ b/test/sql/misc.test.lua @@ -31,7 +31,7 @@ box.execute('SELECT \'abc\';') box.execute('SELECT X\'4D6564766564\'') -- --- gh-4139: assertion when reading a temporary space. +-- gh-4139: assertion when reading a data-temporary space. -- format = {{name = 'id', type = 'integer'}} s = box.schema.space.create('s',{format=format, temporary=true}) diff --git a/test/unit/memtx_allocator.cc b/test/unit/memtx_allocator.cc index d43852983433151a5b5d3c3a45edd264a0d68b56..1e01bae7dacd6efcf213fc69e7217dd9b3fea121 100644 --- a/test/unit/memtx_allocator.cc +++ b/test/unit/memtx_allocator.cc @@ -316,7 +316,7 @@ test_temp_tuple_gc() struct tuple *tuple12 = alloc_tuple(); struct tuple *tuple13 = alloc_tuple(); struct tuple *tuple14 = alloc_tuple(); - opts.enable_temporary_spaces = false; + opts.enable_data_temporary_spaces = false; memtx_allocators_read_view rv1 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 8, "count after rv1 opened"); free_tuple(temp_tuple11); @@ -327,7 +327,7 @@ test_temp_tuple_gc() struct tuple *tuple22 = alloc_tuple(); struct tuple *tuple23 = alloc_tuple(); struct tuple *tuple24 = alloc_tuple(); - opts.enable_temporary_spaces = true; + opts.enable_data_temporary_spaces = true; memtx_allocators_read_view rv2 = memtx_allocators_open_read_view(&opts); /* temp_tuple11 is freed */ is(alloc_tuple_count(), 13, "count after rv2 opened"); @@ -339,7 +339,7 @@ test_temp_tuple_gc() struct tuple *temp_tuple34 = alloc_temp_tuple(); struct tuple *tuple33 = alloc_tuple(); struct tuple *tuple34 = alloc_tuple(); - opts.enable_temporary_spaces = false; + opts.enable_data_temporary_spaces = false; memtx_allocators_read_view rv3 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 17, "count after rv3 opened"); free_tuple(temp_tuple13); @@ -350,7 +350,7 @@ test_temp_tuple_gc() free_tuple(tuple33); struct tuple *temp_tuple44 = alloc_temp_tuple(); struct tuple *tuple44 = alloc_tuple(); - opts.enable_temporary_spaces = true; + opts.enable_data_temporary_spaces = true; memtx_allocators_read_view rv4 = memtx_allocators_open_read_view(&opts); /* temp_tuple33 is freed */ is(alloc_tuple_count(), 18, "count after rv4 opened"); @@ -400,14 +400,14 @@ test_reuse_read_view() is(alloc_tuple_count(), 0, "count before alloc"); struct tuple *tuple1 = alloc_tuple(); struct tuple *temp_tuple1 = alloc_temp_tuple(); - opts.enable_temporary_spaces = false; + opts.enable_data_temporary_spaces = false; memtx_allocators_read_view rv1 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 2, "count after rv1 opened"); free_tuple(tuple1); free_tuple(temp_tuple1); struct tuple *tuple2 = alloc_tuple(); struct tuple *temp_tuple2 = alloc_temp_tuple(); - opts.enable_temporary_spaces = true; + opts.enable_data_temporary_spaces = true; memtx_allocators_read_view rv2 = memtx_allocators_open_read_view(&opts); /* temp_tuple1 is freed */ is(alloc_tuple_count(), 3, "count after rv2 opened"); @@ -415,21 +415,21 @@ test_reuse_read_view() free_tuple(temp_tuple2); struct tuple *tuple3 = alloc_tuple(); struct tuple *temp_tuple3 = alloc_temp_tuple(); - opts.enable_temporary_spaces = true; + opts.enable_data_temporary_spaces = true; memtx_allocators_read_view rv3 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 5, "count after rv3 opened"); free_tuple(tuple3); free_tuple(temp_tuple3); struct tuple *tuple4 = alloc_tuple(); struct tuple *temp_tuple4 = alloc_temp_tuple(); - opts.enable_temporary_spaces = false; + opts.enable_data_temporary_spaces = false; memtx_allocators_read_view rv4 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 7, "count after rv4 opened"); free_tuple(tuple4); free_tuple(temp_tuple4); struct tuple *tuple5 = alloc_tuple(); struct tuple *temp_tuple5 = alloc_temp_tuple(); - opts.enable_temporary_spaces = false; + opts.enable_data_temporary_spaces = false; memtx_allocators_read_view rv5 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 9, "count after rv5 opened"); free_tuple(tuple5); @@ -437,7 +437,7 @@ test_reuse_read_view() thread_sleep(0.2); struct tuple *tuple6 = alloc_tuple(); struct tuple *temp_tuple6 = alloc_temp_tuple(); - opts.enable_temporary_spaces = true; + opts.enable_data_temporary_spaces = true; memtx_allocators_read_view rv6 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 11, "count after rv6 opened"); free_tuple(tuple6); @@ -445,7 +445,7 @@ test_reuse_read_view() thread_sleep(0.2); struct tuple *tuple7 = alloc_tuple(); struct tuple *temp_tuple7 = alloc_temp_tuple(); - opts.enable_temporary_spaces = false; + opts.enable_data_temporary_spaces = false; memtx_allocators_read_view rv7 = memtx_allocators_open_read_view(&opts); is(alloc_tuple_count(), 13, "count after rv7 opened"); free_tuple(tuple7); diff --git a/test/vinyl/gh.result b/test/vinyl/gh.result index 1cad352789a3c9103d30777bc66c304c6b9f6147..fa75dfd3169825906f3496015cffc22e195d374e 100644 --- a/test/vinyl/gh.result +++ b/test/vinyl/gh.result @@ -72,10 +72,10 @@ s:insert{'a'} s:drop() --- ... --- gh-436: No error when creating temporary vinyl space +-- gh-436: No error when creating data-temporary vinyl space s = box.schema.space.create('tester',{engine='vinyl', temporary=true}) --- -- error: 'Can''t modify space ''tester'': engine does not support temporary flag' +- error: 'Can''t modify space ''tester'': engine does not support data-temporary spaces' ... -- gh-432: ignored limit s = box.schema.space.create('tester',{engine='vinyl'}) diff --git a/test/vinyl/gh.test.lua b/test/vinyl/gh.test.lua index 3a9014e0732cbe4e91061abf57e342aa184b12b7..9c7d7205c6a3e283738e4439ba4ec20b4a83cbe9 100644 --- a/test/vinyl/gh.test.lua +++ b/test/vinyl/gh.test.lua @@ -29,7 +29,7 @@ s:insert{'a'} s:drop() --- gh-436: No error when creating temporary vinyl space +-- gh-436: No error when creating data-temporary vinyl space s = box.schema.space.create('tester',{engine='vinyl', temporary=true})