diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-01-31 15:11:38 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-31 04:40:06 +0000 |
commit | f185cc7c5e508acc29761cb205604b079e897afe (patch) | |
tree | c971f90ba8bb4cb7e9bce9a1f1b43a0a4b17e327 /src/third_party/wiredtiger | |
parent | d726a1820bef623a3220bf69bb77d8c5be069f42 (diff) | |
download | mongo-f185cc7c5e508acc29761cb205604b079e897afe.tar.gz |
Import wiredtiger: 7d9e5e10a507fb943e76925717a7f49eed82a673 from branch mongodb-master
ref: 11338fc0ed..7d9e5e10a5
for: 5.3.0
WT-8691 Remove key_consistent timestamp usage flags
Diffstat (limited to 'src/third_party/wiredtiger')
-rw-r--r-- | src/third_party/wiredtiger/dist/api_data.py | 27 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/config/config_def.c | 54 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_dhandle.c | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/dhandle.h | 19 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/txn.h | 49 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/txn_inline.h | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/wiredtiger.in | 42 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn.c | 7 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/format/wts.c | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_assert04.py | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/suite/test_assert06.py | 6 |
12 files changed, 100 insertions, 116 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py index b0b6917d792..f5792a646e2 100644 --- a/src/third_party/wiredtiger/dist/api_data.py +++ b/src/third_party/wiredtiger/dist/api_data.py @@ -50,10 +50,10 @@ common_runtime_config = [ type='category', subconfig= [ Config('commit_timestamp', 'none', r''' this option is no longer supported, retained for backward compatibility''', - choices=['always', 'key_consistent', 'never', 'none'], undoc=True), + choices=['always', 'never', 'none'], undoc=True), Config('durable_timestamp', 'none', r''' this option is no longer supported, retained for backward compatibility''', - choices=['always', 'key_consistent', 'never', 'none'], undoc=True), + choices=['always', 'never', 'none'], undoc=True), Config('read_timestamp', 'none', r''' verify that timestamps should \c always or \c never be used on reads with this table. Verification should be set to \c none @@ -75,18 +75,17 @@ common_runtime_config = [ corresponding \c write_timestamp configuration under the \c assert and \c verbose options to provide logging and assertions for incorrect timestamp usage. The choices are \c always which ensures a timestamp is - used for every operation on a table, \c key_consistent to ensure that - once timestamps are used for a key, they are always used, \c ordered is - like \c key_consistent except it also enforces that subsequent updates - to each key must use increasing timestamps, \c mixed_mode is like - \c ordered except that updates with no timestamp are allowed and have - the effect of resetting the chain of updates once the transaction ID - based snapshot is no longer relevant, \c never enforces that timestamps - are never used for a table and \c none does not enforce any expectation - on timestamp usage meaning that no log message or assertions will be - produced regardless of the corresponding \c assert and \c verbose - settings''', - choices=['always', 'key_consistent', 'mixed_mode', 'never', 'none', 'ordered']), + used for every operation on a table, \c ordered which ensures that + once timestamps are used for a key, they are always used, and also + that subsequent updates to each key must use increasing timestamps, + \c mixed_mode is like \c ordered except that updates with no timestamp + are allowed and have the effect of resetting the chain of updates + once the transaction ID based snapshot is no longer relevant, \c + never enforces that timestamps are never used for a table and \c + none does not enforce any expectation on timestamp usage meaning + that no log message or assertions will be produced regardless of the + corresponding \c assert and \c verbose settings''', choices=['always', + 'mixed_mode', 'never', 'none', 'ordered']), ] # Metadata shared by all schema objects diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index aebaa2d5757..46f6fd5581e 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "11338fc0ed96da84ebefd66d3cccdf04dcaa0357" + "commit": "7d9e5e10a507fb943e76925717a7f49eed82a673" } diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c index 15bd9c16153..8894ff6cd55 100644 --- a/src/third_party/wiredtiger/src/config/config_def.c +++ b/src/third_party/wiredtiger/src/config/config_def.c @@ -191,14 +191,8 @@ static const WT_CONFIG_CHECK confchk_WT_CURSOR_reconfigure[] = { {"prefix_search", "boolean", NULL, NULL, NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; static const WT_CONFIG_CHECK confchk_WT_SESSION_create_assert_subconfigs[] = { - {"commit_timestamp", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"never\"," - "\"none\"]", - NULL, 0}, - {"durable_timestamp", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"never\"," - "\"none\"]", - NULL, 0}, + {"commit_timestamp", "string", NULL, "choices=[\"always\",\"never\",\"none\"]", NULL, 0}, + {"durable_timestamp", "string", NULL, "choices=[\"always\",\"never\",\"none\"]", NULL, 0}, {"read_timestamp", "string", NULL, "choices=[\"always\",\"never\",\"none\"]", NULL, 0}, {"write_timestamp", "string", NULL, "choices=[\"off\",\"on\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -218,8 +212,8 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_alter[] = { {"tiered_object", "boolean", NULL, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -343,8 +337,8 @@ static const WT_CONFIG_CHECK confchk_WT_SESSION_create[] = { {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -451,8 +445,8 @@ static const WT_CONFIG_CHECK confchk_colgroup_meta[] = { {"source", "string", NULL, NULL, NULL, 0}, {"type", "string", NULL, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -500,8 +494,8 @@ static const WT_CONFIG_CHECK confchk_file_config[] = { {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -553,8 +547,8 @@ static const WT_CONFIG_CHECK confchk_file_meta[] = { {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -569,8 +563,8 @@ static const WT_CONFIG_CHECK confchk_index_meta[] = { {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -620,8 +614,8 @@ static const WT_CONFIG_CHECK confchk_lsm_meta[] = { {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -674,8 +668,8 @@ static const WT_CONFIG_CHECK confchk_object_meta[] = { {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -688,8 +682,8 @@ static const WT_CONFIG_CHECK confchk_table_meta[] = { {"value_format", "format", __wt_struct_confchk, NULL, NULL, 0}, {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -743,8 +737,8 @@ static const WT_CONFIG_CHECK confchk_tier_meta[] = { {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; @@ -798,8 +792,8 @@ static const WT_CONFIG_CHECK confchk_tiered_meta[] = { {"verbose", "list", NULL, "choices=[\"write_timestamp\"]", NULL, 0}, {"version", "string", NULL, NULL, NULL, 0}, {"write_timestamp_usage", "string", NULL, - "choices=[\"always\",\"key_consistent\",\"mixed_mode\"," - "\"never\",\"none\",\"ordered\"]", + "choices=[\"always\",\"mixed_mode\",\"never\",\"none\"," + "\"ordered\"]", NULL, 0}, {NULL, NULL, NULL, NULL, NULL, 0}}; diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c index efe3a852ef7..ac3b4b3b584 100644 --- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c +++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c @@ -497,8 +497,6 @@ __conn_dhandle_config_parse(WT_SESSION_IMPL *session) WT_RET(__wt_config_gets(session, cfg, "write_timestamp_usage", &cval)); if (WT_STRING_MATCH("always", cval.str, cval.len)) FLD_SET(dhandle->ts_flags, WT_DHANDLE_TS_ALWAYS); - else if (WT_STRING_MATCH("key_consistent", cval.str, cval.len)) - FLD_SET(dhandle->ts_flags, WT_DHANDLE_TS_KEY_CONSISTENT); else if (WT_STRING_MATCH("mixed_mode", cval.str, cval.len)) FLD_SET(dhandle->ts_flags, WT_DHANDLE_TS_MIXED_MODE); else if (WT_STRING_MATCH("never", cval.str, cval.len)) diff --git a/src/third_party/wiredtiger/src/include/dhandle.h b/src/third_party/wiredtiger/src/include/dhandle.h index d4e23e52c8f..c649f747446 100644 --- a/src/third_party/wiredtiger/src/include/dhandle.h +++ b/src/third_party/wiredtiger/src/include/dhandle.h @@ -129,15 +129,14 @@ struct __wt_data_handle { uint32_t flags; /* AUTOMATIC FLAG VALUE GENERATION START 0 */ -#define WT_DHANDLE_ASSERT_TS_READ_ALWAYS 0x001u /* Assert read always checking. */ -#define WT_DHANDLE_ASSERT_TS_READ_NEVER 0x002u /* Assert read never checking. */ -#define WT_DHANDLE_ASSERT_TS_WRITE 0x004u /* Assert write checking. */ -#define WT_DHANDLE_TS_ALWAYS 0x008u /* Handle using always checking. */ -#define WT_DHANDLE_TS_KEY_CONSISTENT 0x010u /* Handle using key consistency checking. */ -#define WT_DHANDLE_TS_MIXED_MODE 0x020u /* Handle using mixed mode timestamps checking. */ -#define WT_DHANDLE_TS_NEVER 0x040u /* Handle never using timestamps checking. */ -#define WT_DHANDLE_TS_ORDERED 0x080u /* Handle using ordered timestamps checking. */ -#define WT_DHANDLE_VERB_TS_WRITE 0x100u /* Handle verbose logging for timestamps usage. */ - /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ +#define WT_DHANDLE_ASSERT_TS_READ_ALWAYS 0x01u /* Assert read always checking. */ +#define WT_DHANDLE_ASSERT_TS_READ_NEVER 0x02u /* Assert read never checking. */ +#define WT_DHANDLE_ASSERT_TS_WRITE 0x04u /* Assert write checking. */ +#define WT_DHANDLE_TS_ALWAYS 0x08u /* Handle using always checking. */ +#define WT_DHANDLE_TS_MIXED_MODE 0x10u /* Handle using mixed mode timestamps checking. */ +#define WT_DHANDLE_TS_NEVER 0x20u /* Handle never using timestamps checking. */ +#define WT_DHANDLE_TS_ORDERED 0x40u /* Handle using ordered timestamps checking. */ +#define WT_DHANDLE_VERB_TS_WRITE 0x80u /* Handle verbose logging for timestamps usage. */ + /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ uint32_t ts_flags; }; diff --git a/src/third_party/wiredtiger/src/include/txn.h b/src/third_party/wiredtiger/src/include/txn.h index b0ecaf8c0a8..127ae0c2835 100644 --- a/src/third_party/wiredtiger/src/include/txn.h +++ b/src/third_party/wiredtiger/src/include/txn.h @@ -322,31 +322,30 @@ struct __wt_txn { */ /* AUTOMATIC FLAG VALUE GENERATION START 0 */ -#define WT_TXN_AUTOCOMMIT 0x0000001u -#define WT_TXN_ERROR 0x0000002u -#define WT_TXN_HAS_ID 0x0000004u -#define WT_TXN_HAS_SNAPSHOT 0x0000008u -#define WT_TXN_HAS_TS_COMMIT 0x0000010u -#define WT_TXN_HAS_TS_DURABLE 0x0000020u -#define WT_TXN_HAS_TS_PREPARE 0x0000040u -#define WT_TXN_IGNORE_PREPARE 0x0000080u -#define WT_TXN_PREPARE 0x0000100u -#define WT_TXN_PREPARE_IGNORE_API_CHECK 0x0000200u -#define WT_TXN_READONLY 0x0000400u -#define WT_TXN_RUNNING 0x0000800u -#define WT_TXN_SHARED_TS_DURABLE 0x0001000u -#define WT_TXN_SHARED_TS_READ 0x0002000u -#define WT_TXN_SYNC_SET 0x0004000u -#define WT_TXN_TS_READ_BEFORE_OLDEST 0x0008000u -#define WT_TXN_TS_ROUND_PREPARED 0x0010000u -#define WT_TXN_TS_ROUND_READ 0x0020000u -#define WT_TXN_TS_WRITE_ALWAYS 0x0040000u -#define WT_TXN_TS_WRITE_KEY_CONSISTENT 0x0080000u -#define WT_TXN_TS_WRITE_MIXED_MODE 0x0100000u -#define WT_TXN_TS_WRITE_NEVER 0x0200000u -#define WT_TXN_TS_WRITE_ORDERED 0x0400000u -#define WT_TXN_UPDATE 0x0800000u -#define WT_TXN_VERB_TS_WRITE 0x1000000u +#define WT_TXN_AUTOCOMMIT 0x000001u +#define WT_TXN_ERROR 0x000002u +#define WT_TXN_HAS_ID 0x000004u +#define WT_TXN_HAS_SNAPSHOT 0x000008u +#define WT_TXN_HAS_TS_COMMIT 0x000010u +#define WT_TXN_HAS_TS_DURABLE 0x000020u +#define WT_TXN_HAS_TS_PREPARE 0x000040u +#define WT_TXN_IGNORE_PREPARE 0x000080u +#define WT_TXN_PREPARE 0x000100u +#define WT_TXN_PREPARE_IGNORE_API_CHECK 0x000200u +#define WT_TXN_READONLY 0x000400u +#define WT_TXN_RUNNING 0x000800u +#define WT_TXN_SHARED_TS_DURABLE 0x001000u +#define WT_TXN_SHARED_TS_READ 0x002000u +#define WT_TXN_SYNC_SET 0x004000u +#define WT_TXN_TS_READ_BEFORE_OLDEST 0x008000u +#define WT_TXN_TS_ROUND_PREPARED 0x010000u +#define WT_TXN_TS_ROUND_READ 0x020000u +#define WT_TXN_TS_WRITE_ALWAYS 0x040000u +#define WT_TXN_TS_WRITE_MIXED_MODE 0x080000u +#define WT_TXN_TS_WRITE_NEVER 0x100000u +#define WT_TXN_TS_WRITE_ORDERED 0x200000u +#define WT_TXN_UPDATE 0x400000u +#define WT_TXN_VERB_TS_WRITE 0x800000u /* AUTOMATIC FLAG VALUE GENERATION STOP 32 */ uint32_t flags; diff --git a/src/third_party/wiredtiger/src/include/txn_inline.h b/src/third_party/wiredtiger/src/include/txn_inline.h index baf2c5b0a35..798818d7dab 100644 --- a/src/third_party/wiredtiger/src/include/txn_inline.h +++ b/src/third_party/wiredtiger/src/include/txn_inline.h @@ -87,8 +87,6 @@ __wt_txn_timestamp_flags(WT_SESSION_IMPL *session) if (FLD_ISSET(dhandle->ts_flags, WT_DHANDLE_TS_ALWAYS)) F_SET(session->txn, WT_TXN_TS_WRITE_ALWAYS); - if (FLD_ISSET(dhandle->ts_flags, WT_DHANDLE_TS_KEY_CONSISTENT)) - F_SET(session->txn, WT_TXN_TS_WRITE_KEY_CONSISTENT); if (FLD_ISSET(dhandle->ts_flags, WT_DHANDLE_TS_MIXED_MODE)) F_SET(session->txn, WT_TXN_TS_WRITE_MIXED_MODE); if (FLD_ISSET(dhandle->ts_flags, WT_DHANDLE_TS_NEVER)) diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in index 29db28a0b69..4b0934af0fc 100644 --- a/src/third_party/wiredtiger/src/include/wiredtiger.in +++ b/src/third_party/wiredtiger/src/include/wiredtiger.in @@ -1079,17 +1079,16 @@ struct __wt_session { * modifications to the table. This option should be used in conjunction with the * corresponding \c write_timestamp configuration under the \c assert and \c verbose options * to provide logging and assertions for incorrect timestamp usage. The choices are \c - * always which ensures a timestamp is used for every operation on a table\, \c - * key_consistent to ensure that once timestamps are used for a key\, they are always used\, - * \c ordered is like \c key_consistent except it also enforces that subsequent updates to - * each key must use increasing timestamps\, \c mixed_mode is like \c ordered except that - * updates with no timestamp are allowed and have the effect of resetting the chain of - * updates once the transaction ID based snapshot is no longer relevant\, \c never enforces - * that timestamps are never used for a table and \c none does not enforce any expectation - * on timestamp usage meaning that no log message or assertions will be produced regardless - * of the corresponding \c assert and \c verbose settings., a string\, chosen from the - * following options: \c "always"\, \c "key_consistent"\, \c "mixed_mode"\, \c "never"\, \c - * "none"\, \c "ordered"; default \c none.} + * always which ensures a timestamp is used for every operation on a table\, \c ordered + * which ensures that once timestamps are used for a key\, they are always used\, and also + * that subsequent updates to each key must use increasing timestamps\, \c mixed_mode is + * like \c ordered except that updates with no timestamp are allowed and have the effect of + * resetting the chain of updates once the transaction ID based snapshot is no longer + * relevant\, \c never enforces that timestamps are never used for a table and \c none does + * not enforce any expectation on timestamp usage meaning that no log message or assertions + * will be produced regardless of the corresponding \c assert and \c verbose settings., a + * string\, chosen from the following options: \c "always"\, \c "mixed_mode"\, \c "never"\, + * \c "none"\, \c "ordered"; default \c none.} * @configend * @errors */ @@ -1365,17 +1364,16 @@ struct __wt_session { * modifications to the table. This option should be used in conjunction with the * corresponding \c write_timestamp configuration under the \c assert and \c verbose options * to provide logging and assertions for incorrect timestamp usage. The choices are \c - * always which ensures a timestamp is used for every operation on a table\, \c - * key_consistent to ensure that once timestamps are used for a key\, they are always used\, - * \c ordered is like \c key_consistent except it also enforces that subsequent updates to - * each key must use increasing timestamps\, \c mixed_mode is like \c ordered except that - * updates with no timestamp are allowed and have the effect of resetting the chain of - * updates once the transaction ID based snapshot is no longer relevant\, \c never enforces - * that timestamps are never used for a table and \c none does not enforce any expectation - * on timestamp usage meaning that no log message or assertions will be produced regardless - * of the corresponding \c assert and \c verbose settings., a string\, chosen from the - * following options: \c "always"\, \c "key_consistent"\, \c "mixed_mode"\, \c "never"\, \c - * "none"\, \c "ordered"; default \c none.} + * always which ensures a timestamp is used for every operation on a table\, \c ordered + * which ensures that once timestamps are used for a key\, they are always used\, and also + * that subsequent updates to each key must use increasing timestamps\, \c mixed_mode is + * like \c ordered except that updates with no timestamp are allowed and have the effect of + * resetting the chain of updates once the transaction ID based snapshot is no longer + * relevant\, \c never enforces that timestamps are never used for a table and \c none does + * not enforce any expectation on timestamp usage meaning that no log message or assertions + * will be produced regardless of the corresponding \c assert and \c verbose settings., a + * string\, chosen from the following options: \c "always"\, \c "mixed_mode"\, \c "never"\, + * \c "none"\, \c "ordered"; default \c none.} * @configend * @errors */ diff --git a/src/third_party/wiredtiger/src/txn/txn.c b/src/third_party/wiredtiger/src/txn/txn.c index a9e8748be23..5b4fd6e80d8 100644 --- a/src/third_party/wiredtiger/src/txn/txn.c +++ b/src/third_party/wiredtiger/src/txn/txn.c @@ -887,7 +887,7 @@ __txn_commit_timestamps_usage_check(WT_SESSION_IMPL *session, WT_TXN_OP *op, WT_ * Exit abnormally as the key consistency mode dictates all updates must use timestamps once * they have been used. */ - if (FLD_ISSET(ts_flags, WT_DHANDLE_TS_KEY_CONSISTENT) && prev_op_durable_ts != WT_TS_NONE && + if (FLD_ISSET(ts_flags, WT_DHANDLE_TS_ORDERED) && prev_op_durable_ts != WT_TS_NONE && !txn_has_ts) { __wt_verbose_error(session, WT_VERB_TRANSACTION, "%s", WT_COMMIT_TS_VERB_PREFIX @@ -1430,7 +1430,7 @@ __txn_commit_timestamps_assert(WT_SESSION_IMPL *session) /* * If we're not doing any key consistency checking, we're done. */ - if (!F_ISSET(txn, WT_TXN_TS_WRITE_KEY_CONSISTENT)) + if (!F_ISSET(txn, WT_TXN_TS_WRITE_ORDERED)) return (0); /* @@ -1523,8 +1523,7 @@ __txn_commit_timestamps_assert(WT_SESSION_IMPL *session) * comparing commit timestamps would be. */ WT_ASSERT(session, txn->durable_timestamp >= op_ts && prev_op_durable_ts >= prev_op_ts); - if (F_ISSET(txn, WT_TXN_TS_WRITE_KEY_CONSISTENT) && - txn->durable_timestamp < prev_op_durable_ts) + if (F_ISSET(txn, WT_TXN_TS_WRITE_ORDERED) && txn->durable_timestamp < prev_op_durable_ts) WT_ERR_MSG(session, EINVAL, "out of order commit timestamps"); } diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c index 1f1ccd4fef4..1c4325aac91 100644 --- a/src/third_party/wiredtiger/test/format/wts.c +++ b/src/third_party/wiredtiger/test/format/wts.c @@ -379,7 +379,7 @@ create_object(TABLE *table, void *arg) p, ",assert=(read_timestamp=%s)", g.transaction_timestamps_config ? "always" : "never"); if (GV(ASSERT_WRITE_TIMESTAMP)) CONFIG_APPEND(p, ",assert=(write_timestamp=on),write_timestamp_usage=%s", - g.transaction_timestamps_config ? "key_consistent" : "never"); + g.transaction_timestamps_config ? "always" : "never"); /* Configure LSM. */ if (DATASOURCE(table, "lsm")) { diff --git a/src/third_party/wiredtiger/test/suite/test_assert04.py b/src/third_party/wiredtiger/test/suite/test_assert04.py index 46d8c0f08c9..4f20dd7ff0c 100644 --- a/src/third_party/wiredtiger/test/suite/test_assert04.py +++ b/src/third_party/wiredtiger/test/suite/test_assert04.py @@ -45,7 +45,7 @@ class test_assert04(wttest.WiredTigerTestCase, suite_subprocess): def test_timestamp_alter(self): base = 'assert04' uri = 'file:' + base - cfg_on = 'write_timestamp_usage=key_consistent,assert=(write_timestamp=on)' + cfg_on = 'write_timestamp_usage=ordered,assert=(write_timestamp=on)' cfg_off = 'assert=(write_timestamp=off)' msg_ooo='/out of order/' msg_usage='/used inconsistently/' @@ -185,7 +185,7 @@ class test_assert04(wttest.WiredTigerTestCase, suite_subprocess): # That checking will verify any individual key is always or never # used with a timestamp. And if it is used with a timestamp that # the timestamps are in increasing order for that key. - self.session.create(uri, 'key_format={},value_format=S,write_timestamp_usage=key_consistent,assert=(write_timestamp=on)'.format(self.key_format)) + self.session.create(uri, 'key_format={},value_format=S,write_timestamp_usage=ordered,assert=(write_timestamp=on)'.format(self.key_format)) key_nots = 'key_nots' if self.usestrings else 5 key_ts1 = 'key_ts1' if self.usestrings else 16 diff --git a/src/third_party/wiredtiger/test/suite/test_assert06.py b/src/third_party/wiredtiger/test/suite/test_assert06.py index 4223f53669b..942bd4bc84a 100644 --- a/src/third_party/wiredtiger/test/suite/test_assert06.py +++ b/src/third_party/wiredtiger/test/suite/test_assert06.py @@ -27,7 +27,7 @@ # OTHER DEALINGS IN THE SOFTWARE. # # test_assert06.py -# Timestamps: verify key consistent setting for durable timestamps +# Timestamps: verify ordered setting for durable timestamps # from suite_subprocess import suite_subprocess @@ -53,7 +53,7 @@ class test_assert06(wttest.WiredTigerTestCase, suite_subprocess): def test_timestamp_alter(self): base = 'assert06' uri = 'file:' + base - cfg_on = 'write_timestamp_usage=key_consistent,assert=(write_timestamp=on)' + cfg_on = 'write_timestamp_usage=ordered,assert=(write_timestamp=on)' cfg_off = 'write_timestamp_usage=never,assert=(write_timestamp=off)' msg_ooo='/out of order/' msg_usage='/used inconsistently/' @@ -203,7 +203,7 @@ class test_assert06(wttest.WiredTigerTestCase, suite_subprocess): # That checking will verify any individual key is always or never # used with a timestamp. And if it is used with a timestamp that # the timestamps are in increasing order for that key. - self.session.create(uri, 'key_format={},value_format=S,verbose=(write_timestamp),write_timestamp_usage=key_consistent,assert=(write_timestamp=on)'.format(self.key_format)) + self.session.create(uri, 'key_format={},value_format=S,verbose=(write_timestamp),write_timestamp_usage=ordered,assert=(write_timestamp=on)'.format(self.key_format)) # Insert a data item at timestamp 2. c = self.session.open_cursor(uri) |