summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-03-07 13:25:25 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-07 02:57:09 +0000
commitaae30998a8121e62edf1f7a8c92f531129abe3a6 (patch)
treeebf4a297938acb5912843cab6f2ff84029121814 /src/third_party
parent1704f8d36ac80e1fc6475582f7e32fd910f3ea61 (diff)
downloadmongo-aae30998a8121e62edf1f7a8c92f531129abe3a6.tar.gz
Import wiredtiger: 1c6a4c6990c30621dda6d84a773c5ce34c5ef1ae from branch mongodb-master
ref: e9622154bd..1c6a4c6990 for: 6.0.0 WT-7712 commit and durable timestamps should be disallowed at stable timestamp
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py71
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in136
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_timestamp.c29
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs02.py5
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs06.py18
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs07.py5
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs19.py27
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs22.py14
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs24.py13
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs27.py8
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs_evict_race01.py6
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare_hs01.py8
-rw-r--r--src/third_party/wiredtiger/test/suite/test_prepare_hs04.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_rollback_to_stable24.py8
-rw-r--r--src/third_party/wiredtiger/test/suite/test_rollback_to_stable25.py8
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_tiered11.py4
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp09.py7
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_timestamp22.py7
19 files changed, 198 insertions, 180 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index ed63cc0a876..7623c57d8d8 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -542,8 +542,7 @@ connection_runtime_config = [
Config('max_percent_overhead', '10', r'''
maximum tolerated overhead expressed as the number of blocks added
and removed as percent of blocks looked up; cache population
- and eviction will be suppressed if the overhead exceeds the
- supplied threshold''',
+ and eviction will be suppressed if the overhead exceeds the threshold''',
min='1', max='500'),
Config('nvram_path', '', r'''
the absolute path to the file system mounted on the NVRAM device'''),
@@ -1658,7 +1657,7 @@ methods = {
'WT_SESSION.flush_tier' : Method([
Config('flush_timestamp', '', r'''
flush objects to all storage sources using the specified timestamp.
- The supplied value must not be older than the current oldest timestamp and it must
+ The value must not be older than the current oldest timestamp and it must
not be newer than the stable timestamp'''),
Config('force', 'false', r'''
force sharing of all data''',
@@ -1746,7 +1745,7 @@ methods = {
Transactions with higher values are less likely to abort''',
min='-100', max='100'),
Config('read_timestamp', '', r'''
- read using the specified timestamp. The supplied value must not be
+ read using the specified timestamp. The value must not be
older than the current oldest timestamp. See
@ref timestamp_txn_api'''),
Config('roundup_timestamps', '', r'''
@@ -1776,18 +1775,17 @@ methods = {
'WT_SESSION.commit_transaction' : Method([
Config('commit_timestamp', '', r'''
- set the commit timestamp for the current transaction. The supplied value
- must not be older than the first commit timestamp already set for the
- current transaction, if any. The value must also not be older than the
- current oldest and stable timestamps. For prepared transactions, exactly one
- commit timestamp is required; it must not be older than the prepare timestamp.
- See @ref timestamp_txn_api'''),
+ set the commit timestamp for the current transaction. For non-prepared transactions,
+ value must not be older than the first commit timestamp already set for the current
+ transaction, if any, must not be older than the current oldest timestamp and must
+ be after the current stable timestamp. For prepared transactions, a commit timestamp
+ is required, must not be older than the prepare timestamp and can be set only once.
+ See @ref timestamp_txn_api and @ref timestamp_prepare'''),
Config('durable_timestamp', '', r'''
- set the durable timestamp for the current transaction. Required for the
- commit of a prepared transaction, and otherwise not permitted. The
- supplied value must not be older than the commit timestamp set for the
- current transaction. The value must also be newer than the current
- oldest and stable timestamps. See @ref timestamp_prepare'''),
+ set the durable timestamp for the current transaction. Required for the commit of a
+ prepared transaction, and otherwise not permitted. The value must also be after the
+ current oldest and stable timestamps and must not be older than the commit timestamp.
+ See @ref timestamp_prepare'''),
Config('operation_timeout_ms', '0', r'''
when non-zero, a requested limit on the time taken to complete operations in this
transaction. Time is measured in real time milliseconds from the start of each WiredTiger
@@ -1806,35 +1804,34 @@ methods = {
'WT_SESSION.prepare_transaction' : Method([
Config('prepare_timestamp', '', r'''
set the prepare timestamp for the updates of the current transaction.
- The supplied value must not be older than any active read timestamps, and must
+ The value must not be older than any active read timestamps, and must
be newer than the current stable timestamp. See @ref timestamp_prepare'''),
]),
'WT_SESSION.timestamp_transaction' : Method([
Config('commit_timestamp', '', r'''
- set the commit timestamp for the current transaction. The supplied value
- must not be older than the first commit timestamp already set for the
- current transaction, if any. The value must also not be older than the
- current oldest and stable timestamps. For prepared transactions, a commit
- timestamp is required for commit, must not be older than the prepare
- timestamp, can be set only once, and must not be set until after the
- transaction has successfully prepared. See @ref timestamp_txn_api'''),
+ set the commit timestamp for the current transaction. For non-prepared transactions,
+ the value must not be older than the first commit timestamp already set for the current
+ transaction, if any, must not be older than the current oldest timestamp and must be after
+ the current stable timestamp. For prepared transactions, a commit timestamp is required,
+ must not be older than the prepare timestamp, can be set only once, and must not be
+ set until after the transaction has successfully prepared. See @ref timestamp_txn_api
+ and @ref timestamp_prepare'''),
Config('durable_timestamp', '', r'''
- set the durable timestamp for the current transaction. Required for the
- commit of a prepared transaction, and otherwise not permitted. Can only
- be set once the current transaction has been prepared, and a commit
- timestamp has been set. The supplied value must not be older than the
- commit timestamp. The value must also be newer than the current
- oldest and stable timestamps. See @ref timestamp_prepare'''),
+ set the durable timestamp for the current transaction. Required for the commit of a
+ prepared transaction, and otherwise not permitted. Can only be set after the transaction
+ has been prepared and a commit timestamp has been set. The value must be after the
+ current oldest and stable timestamps and must not be older than the commit timestamp. See
+ @ref timestamp_prepare'''),
Config('prepare_timestamp', '', r'''
set the prepare timestamp for the updates of the current transaction.
- The supplied value must not be older than any active read timestamps,
+ The value must not be older than any active read timestamps,
and must be newer than the current stable timestamp. Can be set only
once per transaction. Setting the prepare timestamp does not by itself
prepare the transaction, but does oblige the application to eventually
prepare the transaction before committing it. See @ref timestamp_prepare'''),
Config('read_timestamp', '', r'''
- read using the specified timestamp. The supplied value must not be
+ read using the specified timestamp. The value must not be
older than the current oldest timestamp. This can only be set once
for a transaction. See @ref timestamp_txn_api'''),
]),
@@ -1966,7 +1963,7 @@ methods = {
timestamps greater than the specified value until the next durable
timestamp moves the tracked durable timestamp forwards. This is only
intended for use where the application is rolling back locally committed
- transactions. The supplied value must not be older than the current
+ transactions. The value must not be older than the current
oldest and stable timestamps. See @ref timestamp_global_api'''),
Config('force', 'false', r'''
set timestamps even if they violate normal ordering requirements.
@@ -1974,15 +1971,15 @@ methods = {
type='boolean'),
Config('oldest_timestamp', '', r'''
future commits and queries will be no earlier than the specified
- timestamp. Supplied values must be monotonically increasing, any
+ timestamp. Values must be monotonically increasing, any
attempt to set the value to older than the current is silently ignored.
- The supplied value must not be newer than the current
+ The value must not be newer than the current
stable timestamp. See @ref timestamp_global_api'''),
Config('stable_timestamp', '', r'''
checkpoints will not include commits that are newer than the specified
- timestamp in tables configured with \c log=(enabled=false). Supplied
- values must be monotonically increasing, any attempt to set the value to
- older than the current is silently ignored. The supplied value must
+ timestamp in tables configured with \c log=(enabled=false).
+ Values must be monotonically increasing, any attempt to set the value to
+ older than the current is silently ignored. The value must
not be older than the current oldest timestamp. See
@ref timestamp_global_api'''),
]),
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 8f8924ecb1a..dcfe8872671 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": "e9622154bd0430fcc01e06e23cea1d0bcd82b18e"
+ "commit": "1c6a4c6990c30621dda6d84a773c5ce34c5ef1ae"
}
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 6f8f9b24c72..5e762acdb6d 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -830,8 +830,8 @@ struct __wt_session {
* @param session the session handle
* @configstart{WT_SESSION.flush_tier, see dist/api_data.py}
* @config{flush_timestamp, flush objects to all storage sources using the specified
- * timestamp. The supplied value must not be older than the current oldest timestamp and it
- * must not be newer than the stable timestamp., a string; default empty.}
+ * timestamp. The value must not be older than the current oldest timestamp and it must not
+ * be newer than the stable timestamp., a string; default empty.}
* @config{force, force sharing of all data., a boolean flag; default \c false.}
* @config{lock_wait, wait for locks\, if \c lock_wait=false\, fail if any required locks
* are not available immediately., a boolean flag; default \c true.}
@@ -1713,9 +1713,9 @@ struct __wt_session {
* greater than or equal to 1; default \c 0.}
* @config{priority, priority of the transaction for resolving conflicts. Transactions with
* higher values are less likely to abort., an integer between -100 and 100; default \c 0.}
- * @config{read_timestamp, read using the specified timestamp. The supplied value must not
- * be older than the current oldest timestamp. See @ref timestamp_txn_api., a string;
- * default empty.}
+ * @config{read_timestamp, read using the specified timestamp. The value must not be older
+ * than the current oldest timestamp. See @ref timestamp_txn_api., a string; default
+ * empty.}
* @config{roundup_timestamps = (, round up timestamps of the transaction., a set of related
* configuration options defined below.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;prepared,
@@ -1755,17 +1755,17 @@ struct __wt_session {
*
* @param session the session handle
* @configstart{WT_SESSION.commit_transaction, see dist/api_data.py}
- * @config{commit_timestamp, set the commit timestamp for the current transaction. The
- * supplied value must not be older than the first commit timestamp already set for the
- * current transaction\, if any. The value must also not be older than the current oldest
- * and stable timestamps. For prepared transactions\, exactly one commit timestamp is
- * required; it must not be older than the prepare timestamp. See @ref timestamp_txn_api.,
- * a string; default empty.}
+ * @config{commit_timestamp, set the commit timestamp for the current transaction. For
+ * non-prepared transactions\, value must not be older than the first commit timestamp
+ * already set for the current transaction\, if any\, must not be older than the current
+ * oldest timestamp and must be after the current stable timestamp. For prepared
+ * transactions\, a commit timestamp is required\, must not be older than the prepare
+ * timestamp and can be set only once. See @ref timestamp_txn_api and @ref
+ * timestamp_prepare., a string; default empty.}
* @config{durable_timestamp, set the durable timestamp for the current transaction.
* Required for the commit of a prepared transaction\, and otherwise not permitted. The
- * supplied value must not be older than the commit timestamp set for the current
- * transaction. The value must also be newer than the current oldest and stable timestamps.
- * See @ref timestamp_prepare., a string; default empty.}
+ * value must also be after the current oldest and stable timestamps and must not be older
+ * than the commit timestamp. See @ref timestamp_prepare., a string; default empty.}
* @config{operation_timeout_ms, when non-zero\, a requested limit on the time taken to
* complete operations in this transaction. Time is measured in real time milliseconds from
* the start of each WiredTiger API call. There is no guarantee any operation will not take
@@ -1800,9 +1800,9 @@ struct __wt_session {
* @param session the session handle
* @configstart{WT_SESSION.prepare_transaction, see dist/api_data.py}
* @config{prepare_timestamp, set the prepare timestamp for the updates of the current
- * transaction. The supplied value must not be older than any active read timestamps\, and
- * must be newer than the current stable timestamp. See @ref timestamp_prepare., a string;
- * default empty.}
+ * transaction. The value must not be older than any active read timestamps\, and must be
+ * newer than the current stable timestamp. See @ref timestamp_prepare., a string; default
+ * empty.}
* @configend
* @errors
*/
@@ -1872,28 +1872,28 @@ struct __wt_session {
*
* @param session the session handle
* @configstart{WT_SESSION.timestamp_transaction, see dist/api_data.py}
- * @config{commit_timestamp, set the commit timestamp for the current transaction. The
- * supplied value must not be older than the first commit timestamp already set for the
- * current transaction\, if any. The value must also not be older than the current oldest
- * and stable timestamps. For prepared transactions\, a commit timestamp is required for
- * commit\, must not be older than the prepare timestamp\, can be set only once\, and must
- * not be set until after the transaction has successfully prepared. See @ref
- * timestamp_txn_api., a string; default empty.}
+ * @config{commit_timestamp, set the commit timestamp for the current transaction. For
+ * non-prepared transactions\, the value must not be older than the first commit timestamp
+ * already set for the current transaction\, if any\, must not be older than the current
+ * oldest timestamp and must be after the current stable timestamp. For prepared
+ * transactions\, a commit timestamp is required\, must not be older than the prepare
+ * timestamp\, can be set only once\, and must not be set until after the transaction has
+ * successfully prepared. See @ref timestamp_txn_api and @ref timestamp_prepare., a string;
+ * default empty.}
* @config{durable_timestamp, set the durable timestamp for the current transaction.
* Required for the commit of a prepared transaction\, and otherwise not permitted. Can
- * only be set once the current transaction has been prepared\, and a commit timestamp has
- * been set. The supplied value must not be older than the commit timestamp. The value
- * must also be newer than the current oldest and stable timestamps. See @ref
- * timestamp_prepare., a string; default empty.}
+ * only be set after the transaction has been prepared and a commit timestamp has been set.
+ * The value must be after the current oldest and stable timestamps and must not be older
+ * than the commit timestamp. See @ref timestamp_prepare., a string; default empty.}
* @config{prepare_timestamp, set the prepare timestamp for the updates of the current
- * transaction. The supplied value must not be older than any active read timestamps\, and
- * must be newer than the current stable timestamp. Can be set only once per transaction.
- * Setting the prepare timestamp does not by itself prepare the transaction\, but does
- * oblige the application to eventually prepare the transaction before committing it. See
- * @ref timestamp_prepare., a string; default empty.}
- * @config{read_timestamp, read using the specified timestamp. The supplied value must not
- * be older than the current oldest timestamp. This can only be set once for a transaction.
- * See @ref timestamp_txn_api., a string; default empty.}
+ * transaction. The value must not be older than any active read timestamps\, and must be
+ * newer than the current stable timestamp. Can be set only once per transaction. Setting
+ * the prepare timestamp does not by itself prepare the transaction\, but does oblige the
+ * application to eventually prepare the transaction before committing it. See @ref
+ * timestamp_prepare., a string; default empty.}
+ * @config{read_timestamp, read using the specified timestamp. The value must not be older
+ * than the current oldest timestamp. This can only be set once for a transaction. See
+ * @ref timestamp_txn_api., a string; default empty.}
* @configend
* @errors
*/
@@ -1905,18 +1905,20 @@ struct __wt_session {
* @{
*/
/*!
- * Write a transactionally consistent snapshot of a database or set of objects. In the
- * absence of transaction timestamps, the checkpoint includes all transactions committed
- * before the checkpoint starts.
+ * Write a transactionally consistent snapshot of a database or set of individual objects.
*
- * When timestamps are in use and the checkpoint runs with \c use_timestamp=true (the
- * default), updates committed with a timestamp after the \c stable_timestamp, in tables
- * configured for checkpoint-level durability, are not included in the checkpoint. See
- * @ref checkpoint for more information. Committed updates in tables configured for
- * commit-level durability are always included in the checkpoint. See @ref durability for
- * more information.
+ * When timestamps are not in use, the checkpoint includes all transactions committed
+ * before the checkpoint starts. When timestamps are in use and the checkpoint runs with
+ * \c use_timestamp=true (the default), updates committed with a timestamp after the
+ * \c stable timestamp, in tables configured for checkpoint-level durability, are not
+ * included in the checkpoint. Updates committed in tables configured for commit-level
+ * durability are always included in the checkpoint. See @ref checkpoint and @ref durability
+ * for more information.
*
- * Additionally, existing named checkpoints may optionally be discarded.
+ * Calling the checkpoint method multiple times serializes the checkpoints, new checkpoint
+ * calls wait for running checkpoint calls to complete.
+ *
+ * Existing named checkpoints may optionally be discarded.
*
* @requires_notransaction
*
@@ -2097,15 +2099,16 @@ struct __wt_connection {
* @config{&nbsp;&nbsp;&nbsp;&nbsp;
* max_percent_overhead, maximum tolerated overhead expressed as the number of blocks added
* and removed as percent of blocks looked up; cache population and eviction will be
- * suppressed if the overhead exceeds the supplied threshold., an integer between 1 and 500;
- * default \c 10.}
- * @config{&nbsp;&nbsp;&nbsp;&nbsp;nvram_path, the absolute path to the file
- * system mounted on the NVRAM device., a string; default empty.}
- * @config{&nbsp;&nbsp;&nbsp;&nbsp;percent_file_in_dram, bypass cache for a file if the set
- * percentage of the file fits in system DRAM (as specified by block_cache.system_ram)., an
- * integer between 0 and 100; default \c 50.}
- * @config{&nbsp;&nbsp;&nbsp;&nbsp;size, maximum
- * memory to allocate for the block cache., an integer between 0 and 10TB; default \c 0.}
+ * suppressed if the overhead exceeds the threshold., an integer between 1 and 500; default
+ * \c 10.}
+ * @config{&nbsp;&nbsp;&nbsp;&nbsp;nvram_path, the absolute path to the file system
+ * mounted on the NVRAM device., a string; default empty.}
+ * @config{&nbsp;&nbsp;&nbsp;&nbsp;
+ * percent_file_in_dram, bypass cache for a file if the set percentage of the file fits in
+ * system DRAM (as specified by block_cache.system_ram)., an integer between 0 and 100;
+ * default \c 50.}
+ * @config{&nbsp;&nbsp;&nbsp;&nbsp;size, maximum memory to allocate for the
+ * block cache., an integer between 0 and 10TB; default \c 0.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;system_ram, the bytes of system DRAM available for
* caching filesystem blocks., an integer between 0 and 1024GB; default \c 0.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;type, cache location: DRAM or NVRAM., a string; default
@@ -2523,22 +2526,21 @@ struct __wt_connection {
* This will cause future calls to WT_CONNECTION::query_timestamp to ignore durable
* timestamps greater than the specified value until the next durable timestamp moves the
* tracked durable timestamp forwards. This is only intended for use where the application
- * is rolling back locally committed transactions. The supplied value must not be older
- * than the current oldest and stable timestamps. See @ref timestamp_global_api., a string;
- * default empty.}
+ * is rolling back locally committed transactions. The value must not be older than the
+ * current oldest and stable timestamps. See @ref timestamp_global_api., a string; default
+ * empty.}
* @config{force, set timestamps even if they violate normal ordering requirements. For
* example allow the \c oldest_timestamp to move backwards., a boolean flag; default \c
* false.}
* @config{oldest_timestamp, future commits and queries will be no earlier than the
- * specified timestamp. Supplied values must be monotonically increasing\, any attempt to
- * set the value to older than the current is silently ignored. The supplied value must not
- * be newer than the current stable timestamp. See @ref timestamp_global_api., a string;
- * default empty.}
+ * specified timestamp. Values must be monotonically increasing\, any attempt to set the
+ * value to older than the current is silently ignored. The value must not be newer than
+ * the current stable timestamp. See @ref timestamp_global_api., a string; default empty.}
* @config{stable_timestamp, checkpoints will not include commits that are newer than the
- * specified timestamp in tables configured with \c log=(enabled=false). Supplied values
- * must be monotonically increasing\, any attempt to set the value to older than the current
- * is silently ignored. The supplied value must not be older than the current oldest
- * timestamp. See @ref timestamp_global_api., a string; default empty.}
+ * specified timestamp in tables configured with \c log=(enabled=false). Values must be
+ * monotonically increasing\, any attempt to set the value to older than the current is
+ * silently ignored. The value must not be older than the current oldest timestamp. See
+ * @ref timestamp_global_api., a string; default empty.}
* @configend
* @errors
*/
@@ -2791,7 +2793,7 @@ struct __wt_connection {
* @config{&nbsp;&nbsp;&nbsp;&nbsp;
* max_percent_overhead, maximum tolerated overhead expressed as the number of blocks added and
* removed as percent of blocks looked up; cache population and eviction will be suppressed if the
- * overhead exceeds the supplied threshold., an integer between 1 and 500; default \c 10.}
+ * overhead exceeds the threshold., an integer between 1 and 500; default \c 10.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;nvram_path, the absolute path to the file system mounted on the
* NVRAM device., a string; default empty.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;percent_file_in_dram,
diff --git a/src/third_party/wiredtiger/src/txn/txn_timestamp.c b/src/third_party/wiredtiger/src/txn/txn_timestamp.c
index 99bbc505c7a..05ce5268a45 100644
--- a/src/third_party/wiredtiger/src/txn/txn_timestamp.c
+++ b/src/third_party/wiredtiger/src/txn/txn_timestamp.c
@@ -521,10 +521,7 @@ __txn_assert_after_reads(WT_SESSION_IMPL *session, const char *op, wt_timestamp_
/*
* __wt_txn_set_commit_timestamp --
- * Validate the commit timestamp of a transaction. If the commit timestamp is less than the
- * oldest timestamp and transaction is configured to roundup timestamps of a prepared
- * transaction, then we will roundup the commit timestamp to the prepare timestamp of the
- * transaction.
+ * Validate the commit timestamp of a transaction.
*/
int
__wt_txn_set_commit_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t commit_ts)
@@ -566,10 +563,17 @@ __wt_txn_set_commit_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t commit_ts
__wt_timestamp_to_string(commit_ts, ts_string[0]),
__wt_timestamp_to_string(oldest_ts, ts_string[1]));
+#ifdef WT_STANDALONE_BUILD
+ if (has_stable_ts && commit_ts <= stable_ts)
+ WT_RET_MSG(session, EINVAL, "commit timestamp %s must be after the stable timestamp %s",
+ __wt_timestamp_to_string(commit_ts, ts_string[0]),
+ __wt_timestamp_to_string(stable_ts, ts_string[1]));
+#else
if (has_stable_ts && commit_ts < stable_ts)
- WT_RET_MSG(session, EINVAL, "commit timestamp %s is less than the stable timestamp %s",
+ WT_RET_MSG(session, EINVAL, "commit timestamp %s is before the stable timestamp %s",
__wt_timestamp_to_string(commit_ts, ts_string[0]),
__wt_timestamp_to_string(stable_ts, ts_string[1]));
+#endif
/*
* Compare against the commit timestamp of the current transaction. Return an error if the
@@ -587,6 +591,10 @@ __wt_txn_set_commit_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t commit_ts
* For a prepared transaction, the commit timestamp should not be less than the prepare
* timestamp. Also, the commit timestamp cannot be set before the transaction has actually
* been prepared.
+ *
+ * If the commit timestamp is less than the oldest timestamp and transaction is configured
+ * to roundup timestamps of a prepared transaction, then we will roundup the commit
+ * timestamp to the prepare timestamp of the transaction.
*/
if (txn->prepare_timestamp > commit_ts) {
if (!F_ISSET(txn, WT_TXN_TS_ROUND_PREPARED))
@@ -659,19 +667,22 @@ __wt_txn_set_durable_timestamp(WT_SESSION_IMPL *session, wt_timestamp_t durable_
if (has_stable_ts)
stable_ts = txn_global->stable_timestamp;
- /*
- * For a non-prepared transactions the commit timestamp should not be less than the stable
- * timestamp.
- */
if (has_oldest_ts && durable_ts < oldest_ts)
WT_RET_MSG(session, EINVAL, "durable timestamp %s is less than the oldest timestamp %s",
__wt_timestamp_to_string(durable_ts, ts_string[0]),
__wt_timestamp_to_string(oldest_ts, ts_string[1]));
+#ifdef WT_STANDALONE_BUILD
+ if (has_stable_ts && durable_ts <= stable_ts)
+ WT_RET_MSG(session, EINVAL, "durable timestamp %s must be after the stable timestamp %s",
+ __wt_timestamp_to_string(durable_ts, ts_string[0]),
+ __wt_timestamp_to_string(stable_ts, ts_string[1]));
+#else
if (has_stable_ts && durable_ts < stable_ts)
WT_RET_MSG(session, EINVAL, "durable timestamp %s is less than the stable timestamp %s",
__wt_timestamp_to_string(durable_ts, ts_string[0]),
__wt_timestamp_to_string(stable_ts, ts_string[1]));
+#endif
/* Check if the durable timestamp is less than the commit timestamp. */
if (durable_ts < txn->commit_timestamp)
diff --git a/src/third_party/wiredtiger/test/suite/test_hs02.py b/src/third_party/wiredtiger/test/suite/test_hs02.py
index be193737f78..f0573be3897 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs02.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs02.py
@@ -93,12 +93,13 @@ class test_hs02(wttest.WiredTigerTestCase):
bigvalue = "aaaaa" * 100
bigvalue2 = "ddddd" * 100
+ # Commit at timestamp 1.
+ self.large_updates(uri, bigvalue, ds, nrows // 3, 1)
+
# Pin oldest and stable to timestamp 1.
self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1) +
',stable_timestamp=' + self.timestamp_str(1))
- self.large_updates(uri, bigvalue, ds, nrows // 3, 1)
-
# Check that all updates are seen
self.check(uri, [(bigvalue, nrows // 3)], 1)
diff --git a/src/third_party/wiredtiger/test/suite/test_hs06.py b/src/third_party/wiredtiger/test/suite/test_hs06.py
index 38e7756c405..983a9480400 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs06.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs06.py
@@ -451,7 +451,8 @@ class test_hs06(wttest.WiredTigerTestCase):
# Load 5Mb of data.
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
# The base update is at timestamp 1.
# When we history store evict these pages, the base update is the only thing behind
@@ -460,26 +461,26 @@ class test_hs06(wttest.WiredTigerTestCase):
for i in range(1, 10000):
self.session.begin_transaction()
cursor[self.create_key(i)] = value1
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(1))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
# Apply three sets of modifies.
for i in range(1, 11):
self.session.begin_transaction()
cursor.set_key(self.create_key(i))
self.assertEqual(cursor.modify([wiredtiger.Modify('B', 100, 1)]), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(3))
for i in range(1, 11):
self.session.begin_transaction()
cursor.set_key(self.create_key(i))
self.assertEqual(cursor.modify([wiredtiger.Modify('C', 200, 1)]), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(3))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
for i in range(1, 11):
self.session.begin_transaction()
cursor.set_key(self.create_key(i))
self.assertEqual(cursor.modify([wiredtiger.Modify('D', 300, 1)]), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
# Make a bunch of updates to another table to flush everything out of cache.
uri2 = 'table:test_hs06_extra'
@@ -488,7 +489,7 @@ class test_hs06(wttest.WiredTigerTestCase):
for i in range(1, 10000):
self.session.begin_transaction()
cursor2[self.create_key(i)] = value2
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(6))
expected = list(value1)
expected[100] = 'B'
@@ -497,7 +498,7 @@ class test_hs06(wttest.WiredTigerTestCase):
expected = str().join(expected)
# Go back and read.
- self.session.begin_transaction('read_timestamp=' + self.timestamp_str(4))
+ self.session.begin_transaction('read_timestamp=' + self.timestamp_str(5))
for i in range(1, 11):
self.assertEqual(cursor[self.create_key(i)], expected)
self.session.rollback_transaction()
@@ -516,7 +517,8 @@ class test_hs06(wttest.WiredTigerTestCase):
value2 = 'b' * 500
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
cursor = self.session.open_cursor(uri)
# Base update.
diff --git a/src/third_party/wiredtiger/test/suite/test_hs07.py b/src/third_party/wiredtiger/test/suite/test_hs07.py
index bae779fb097..2137a37ba7f 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs07.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs07.py
@@ -85,12 +85,13 @@ class test_hs07(wttest.WiredTigerTestCase):
bigvalue = "aaaaa" * 100
bigvalue2 = "ddddd" * 100
+ # Commit at timestamp 1.
+ self.large_updates(uri, bigvalue, ds, nrows, 1)
+
# Pin oldest and stable to timestamp 1.
self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1) +
',stable_timestamp=' + self.timestamp_str(1))
- self.large_updates(uri, bigvalue, ds, nrows, 1)
-
# Check that all updates are seen
self.check(bigvalue, uri, nrows, 100)
diff --git a/src/third_party/wiredtiger/test/suite/test_hs19.py b/src/third_party/wiredtiger/test/suite/test_hs19.py
index 89148b232db..13c3e4c9ec2 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs19.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs19.py
@@ -53,7 +53,8 @@ class test_hs19(wttest.WiredTigerTestCase):
cursor2 = session2.open_cursor(junk_uri)
cursor = self.session.open_cursor(uri)
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
value1 = 'a' * 500
value2 = 'b' * 500
@@ -69,13 +70,13 @@ class test_hs19(wttest.WiredTigerTestCase):
cursor.set_key(self.create_key(1))
mods = [wiredtiger.Modify('B', 100, 1)]
self.assertEqual(cursor.modify(mods), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(1))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
self.session.begin_transaction()
cursor.set_key(self.create_key(1))
mods = [wiredtiger.Modify('C', 101, 1)]
self.assertEqual(cursor.modify(mods), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(3))
# Start a transaction to pin back the reconciliation last running value.
session2.begin_transaction()
@@ -89,14 +90,14 @@ class test_hs19(wttest.WiredTigerTestCase):
cursor.set_key(self.create_key(1))
mods = [wiredtiger.Modify('AAAAAAAAAA', 102, 0)]
self.assertEqual(cursor.modify(mods), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(3))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
# Insert a modify to get written as the on disk value by checkpoint.
self.session.begin_transaction()
cursor.set_key(self.create_key(1))
mods = [wiredtiger.Modify('D', 102, 1)]
self.assertEqual(cursor.modify(mods), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
# Checkpoint such that all modifies get written out to the history store and the latest
# modify gets written to the on disk value.
@@ -108,7 +109,7 @@ class test_hs19(wttest.WiredTigerTestCase):
cursor.set_key(self.create_key(1))
mods = [wiredtiger.Modify('E', 103, 1)]
self.assertEqual(cursor.modify(mods), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(6))
# First deposition the first cursor, so the page can be evicted.
cursor.reset()
@@ -119,13 +120,13 @@ class test_hs19(wttest.WiredTigerTestCase):
evict_cursor.reset()
evict_cursor.close()
- # Construct and test the value as at timestamp 1
+ # Construct and test the value as at timestamp 2
expected = list(value1)
expected[100] = 'B'
expected = str().join(expected)
- # Retrieve the value at timestamp 1.
- self.session.begin_transaction('read_timestamp=' + self.timestamp_str(1))
+ # Retrieve the value at timestamp 2.
+ self.session.begin_transaction('read_timestamp=' + self.timestamp_str(2))
cursor.set_key(self.create_key(1))
cursor.search()
@@ -138,8 +139,8 @@ class test_hs19(wttest.WiredTigerTestCase):
expected[101] = 'C'
expected = str().join(expected)
- # Retrieve the value at timestamp 1.
- self.session.begin_transaction('read_timestamp=' + self.timestamp_str(2))
+ # Retrieve the value at timestamp 3.
+ self.session.begin_transaction('read_timestamp=' + self.timestamp_str(3))
cursor.set_key(self.create_key(1))
cursor.search()
@@ -147,7 +148,7 @@ class test_hs19(wttest.WiredTigerTestCase):
self.assertEqual(cursor.get_value(), expected)
self.session.rollback_transaction()
- # Construct and test the value as at timestamp 3
+ # Construct and test the value as at timestamp 4
expected = list(expected)
for x in range(10):
expected[102 + x] = 'A'
@@ -155,7 +156,7 @@ class test_hs19(wttest.WiredTigerTestCase):
expected = str().join(expected)
# Retrieve the value at timestamp 1.
- self.session.begin_transaction('read_timestamp=' + self.timestamp_str(3))
+ self.session.begin_transaction('read_timestamp=' + self.timestamp_str(4))
cursor.set_key(self.create_key(1))
cursor.search()
# Assert that it matches our expected value.
diff --git a/src/third_party/wiredtiger/test/suite/test_hs22.py b/src/third_party/wiredtiger/test/suite/test_hs22.py
index 789b0c40d99..3cfc223a0b7 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs22.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs22.py
@@ -53,7 +53,8 @@ class test_hs22(wttest.WiredTigerTestCase):
self.session.create(uri, format)
cursor = self.session.open_cursor(uri)
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
key1 = self.key1
key2 = self.key2
@@ -116,7 +117,8 @@ class test_hs22(wttest.WiredTigerTestCase):
self.session.create(uri, format)
cursor = self.session.open_cursor(uri)
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
key1 = self.key1
key2 = self.key2
@@ -184,7 +186,8 @@ class test_hs22(wttest.WiredTigerTestCase):
self.session.create(uri, format)
cursor = self.session.open_cursor(uri)
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
key1 = self.key1
@@ -200,7 +203,7 @@ class test_hs22(wttest.WiredTigerTestCase):
value4 = 'd'
self.session.begin_transaction()
- self.session.timestamp_transaction('commit_timestamp=' + self.timestamp_str(1))
+ self.session.timestamp_transaction('commit_timestamp=' + self.timestamp_str(2))
cursor[key1] = value1
self.session.timestamp_transaction('commit_timestamp=' + self.timestamp_str(3))
cursor[key1] = value2
@@ -233,7 +236,8 @@ class test_hs22(wttest.WiredTigerTestCase):
self.session.create(uri, format)
cursor = self.session.open_cursor(uri)
self.conn.set_timestamp(
- 'oldest_timestamp=' + self.timestamp_str(1) + ',stable_timestamp=' + self.timestamp_str(1))
+ 'oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
key1 = self.key1
diff --git a/src/third_party/wiredtiger/test/suite/test_hs24.py b/src/third_party/wiredtiger/test/suite/test_hs24.py
index 2dc3c314c84..4845b027258 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs24.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs24.py
@@ -185,11 +185,11 @@ class test_hs24(wttest.WiredTigerTestCase):
for i in range(1, self.numrows + 1):
self.session.begin_transaction()
cursor[i] = self.value1
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
self.session.begin_transaction()
cursor[i] = self.value2
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
- self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(4))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(3))
+ self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(2))
for i in range(1, self.numrows + 1):
self.session.begin_transaction()
cursor[i] = self.value3
@@ -201,10 +201,9 @@ class test_hs24(wttest.WiredTigerTestCase):
thread.join()
simulate_crash_restart(self, '.', "RESTART")
cursor = self.session.open_cursor(self.uri)
- self.session.begin_transaction('read_timestamp=' + self.timestamp_str(4))
- # Check we can only see the version at timestamp 4, it's either
- # committed by the out of order timestamp commit thread before the
- # checkpoint starts or value1.
+ self.session.begin_transaction('read_timestamp=' + self.timestamp_str(2))
+ # Check we can only see the version at timestamp 2, it's either committed by the out of
+ # order timestamp commit thread before the checkpoint starts or value1.
newer_data_visible = False
for i in range(1, self.numrows + 1):
value = cursor[i]
diff --git a/src/third_party/wiredtiger/test/suite/test_hs27.py b/src/third_party/wiredtiger/test/suite/test_hs27.py
index dd5772e0aa5..281873b89cf 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs27.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs27.py
@@ -265,14 +265,14 @@ class test_hs27(wttest.WiredTigerTestCase):
ds.populate()
self.session.checkpoint()
- # Pin oldest and stable to timestamp 1.
- self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1) +
- ',stable_timestamp=' + self.timestamp_str(1))
-
# Write the initial values, if requested.
if self.doinit:
self.initialize(ds.uri, ds)
+ # Pin oldest and stable to timestamp 1.
+ self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(1) +
+ ',stable_timestamp=' + self.timestamp_str(1))
+
# Create a long running read transaction in a separate session.
session_read = self.conn.open_session()
session_read.begin_transaction('read_timestamp=' + self.timestamp_str(2))
diff --git a/src/third_party/wiredtiger/test/suite/test_hs_evict_race01.py b/src/third_party/wiredtiger/test/suite/test_hs_evict_race01.py
index adce36d1f74..50f3761030b 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs_evict_race01.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs_evict_race01.py
@@ -69,10 +69,10 @@ class test_hs_evict_race01(wttest.WiredTigerTestCase):
self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
# Move the stable timestamp.
self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(4))
- # Insert a value at timetamp 5
+ # Insert a value at timetamp 6
self.session.begin_transaction()
cursor[1] = self.value2
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(6))
cursor.close()
@@ -97,7 +97,7 @@ class test_hs_evict_race01(wttest.WiredTigerTestCase):
cursor = session.open_cursor(self.uri)
session.begin_transaction()
cursor[1] = self.value4
- session.commit_transaction('commit_timestamp=' + self.timestamp_str(4))
+ session.commit_transaction('commit_timestamp=' + self.timestamp_str(5))
cursor.close()
sleep(1.5)
evict_cursor = session.open_cursor(self.uri, None, "debug=(release_evict)")
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py b/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py
index 024cedaf474..430032cc344 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare_hs01.py
@@ -88,7 +88,7 @@ class test_prepare_hs01(wttest.WiredTigerTestCase):
cursor.set_key(ds.key(nrows + i))
cursor.set_value(bigvalue1)
self.assertEquals(cursor.insert(), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(1))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
# Have prepared updates in multiple sessions. This should ensure writing
# prepared updates to the history store
@@ -105,11 +105,11 @@ class test_prepare_hs01(wttest.WiredTigerTestCase):
cursors[j].set_key(ds.key(nrows + i))
cursors[j].set_value(bigvalue2)
self.assertEquals(cursors[j].insert(), 0)
- sessions[j].prepare_transaction('prepare_timestamp=' + self.timestamp_str(2))
+ sessions[j].prepare_transaction('prepare_timestamp=' + self.timestamp_str(3))
# Re-read the original versions of all the data. This ensures reading
# original versions from the history store
- self.check(uri, ds, nrows, nsessions, nkeys, 1, bigvalue1, bigvalue2)
+ self.check(uri, ds, nrows, nsessions, nkeys, 2, bigvalue1, bigvalue2)
# Close all cursors and sessions, this will cause prepared updates to be
# rollback-ed
@@ -120,7 +120,7 @@ class test_prepare_hs01(wttest.WiredTigerTestCase):
# Re-read the original versions of all the data. This ensures reading
# original versions from the data store as the prepared updates are
# aborted
- self.check(uri, ds, nrows, nsessions, nkeys, 2, bigvalue1, bigvalue2)
+ self.check(uri, ds, nrows, nsessions, nkeys, 3, bigvalue1, bigvalue2)
def test_prepare_hs(self):
# Create a small table.
diff --git a/src/third_party/wiredtiger/test/suite/test_prepare_hs04.py b/src/third_party/wiredtiger/test/suite/test_prepare_hs04.py
index 1d1384cce74..2e692d96801 100644
--- a/src/third_party/wiredtiger/test/suite/test_prepare_hs04.py
+++ b/src/third_party/wiredtiger/test/suite/test_prepare_hs04.py
@@ -113,7 +113,7 @@ class test_prepare_hs04(wttest.WiredTigerTestCase):
cursor.set_key(key)
cursor.set_value(commit_value)
self.assertEquals(cursor.insert(), 0)
- self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(1))
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(2))
cursor.close()
# Call checkpoint.
diff --git a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable24.py b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable24.py
index 9376eaf2308..d6be8a24e76 100644
--- a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable24.py
+++ b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable24.py
@@ -74,11 +74,11 @@ class test_rollback_to_stable24(wttest.WiredTigerTestCase):
uri = "table:rollback_to_stable24"
self.session.create(uri, 'key_format={},value_format=S'.format(self.key_format))
- # Pin oldest timestamp to 10.
- self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(10))
+ # Pin oldest timestamp to 5.
+ self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(5))
- # Start stable timestamp at 10.
- self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(10))
+ # Start stable timestamp at 5.
+ self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(5))
value_a = "aaaaa" * 100
value_b = "bbbbb" * 100
diff --git a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable25.py b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable25.py
index 897336f9e73..5e25d2b8cb4 100644
--- a/src/third_party/wiredtiger/test/suite/test_rollback_to_stable25.py
+++ b/src/third_party/wiredtiger/test/suite/test_rollback_to_stable25.py
@@ -229,11 +229,11 @@ class test_rollback_to_stable25(wttest.WiredTigerTestCase):
uri = "table:rollback_to_stable25"
self.session.create(uri, 'key_format=r,value_format=S')
- # Pin oldest timestamp to 5.
- self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(5))
+ # Pin oldest timestamp to 2.
+ self.conn.set_timestamp('oldest_timestamp=' + self.timestamp_str(2))
- # Start stable timestamp at 5.
- self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(5))
+ # Start stable timestamp at 2.
+ self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(2))
value_a = "aaaaa" * 10
value_b = "bbbbb" * 10
diff --git a/src/third_party/wiredtiger/test/suite/test_tiered11.py b/src/third_party/wiredtiger/test/suite/test_tiered11.py
index 8c83ba714e5..05fd5a7b35e 100755
--- a/src/third_party/wiredtiger/test/suite/test_tiered11.py
+++ b/src/third_party/wiredtiger/test/suite/test_tiered11.py
@@ -81,8 +81,8 @@ class test_tiered11(wttest.WiredTigerTestCase):
for i in range(start, end):
self.session.begin_transaction()
c[i] = i
- self.session.commit_transaction(
- 'commit_timestamp=' + self.timestamp_str(i))
+ # Jump the commit TS to leave rooom for the stable TS separate from any commit TS.
+ self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(i * 2))
# Set the oldest and stable timestamp to the end.
end_ts = self.timestamp_str(end-1)
self.conn.set_timestamp('oldest_timestamp=' + end_ts + ',stable_timestamp=' + end_ts)
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp09.py b/src/third_party/wiredtiger/test/suite/test_timestamp09.py
index 0d1e9bd5b90..8604b48a93f 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp09.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp09.py
@@ -124,15 +124,14 @@ class test_timestamp09(wttest.WiredTigerTestCase, suite_subprocess):
self.timestamp_str(6)),
'/oldest timestamp \(0, 6\) must not be later than stable timestamp \(0, 5\)/')
- # Commit timestamp >= Stable timestamp.
+ # Commit timestamp > Stable timestamp.
# Check both timestamp_transaction and commit_transaction APIs.
# Oldest and stable timestamp are set to 5 at the moment.
- self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(6))
self.session.begin_transaction()
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.timestamp_transaction(
'commit_timestamp=' + self.timestamp_str(5)),
- '/less than the stable timestamp/')
+ '/must be after the stable timestamp/')
self.session.rollback_transaction()
self.session.begin_transaction()
@@ -140,7 +139,7 @@ class test_timestamp09(wttest.WiredTigerTestCase, suite_subprocess):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.session.commit_transaction(
'commit_timestamp=' + self.timestamp_str(5)),
- '/less than the stable timestamp/')
+ '/must be after the stable timestamp/')
# When explicitly set, commit timestamp for a transaction can be earlier
# than the commit timestamp of an earlier transaction.
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp22.py b/src/third_party/wiredtiger/test/suite/test_timestamp22.py
index 16ac84b727c..525ec06e615 100755
--- a/src/third_party/wiredtiger/test/suite/test_timestamp22.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp22.py
@@ -157,7 +157,7 @@ class test_timestamp22(wttest.WiredTigerTestCase):
if this_commit_ts >= 0:
if this_commit_ts < running_commit_ts:
ok = False
- if this_commit_ts < self.stable_ts:
+ if this_commit_ts <= self.stable_ts:
ok = False
if this_commit_ts < self.oldest_ts:
ok = False
@@ -229,7 +229,7 @@ class test_timestamp22(wttest.WiredTigerTestCase):
ok_prepare = False
# If the final commit is too old, we'll fail.
- if commit_ts < self.oldest_ts or commit_ts < self.stable_ts:
+ if commit_ts < self.oldest_ts or commit_ts <= self.stable_ts:
ok_commit = False
# ODDITY: We don't have to move the commit_ts ahead, but it has to be
@@ -293,7 +293,8 @@ class test_timestamp22(wttest.WiredTigerTestCase):
needs_rollback = False
session.rollback_transaction()
except Exception as e:
- # We don't expect any exceptions, they should be caught as part of self.expect statements.
+ # We don't expect any exceptions, they should be caught as part of self.expect
+ # statements.
self.pr(msg + 'UNEXPECTED EXCEPTION!')
self.pr(msg + 'fail: ' + str(e))
raise e