diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c')
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c index ee304fedff5..3e53737bdc1 100644 --- a/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c +++ b/src/third_party/wiredtiger/src/txn/txn_rollback_to_stable.c @@ -346,17 +346,17 @@ __rollback_ondisk_fixup_key(WT_SESSION_IMPL *session, WT_REF *ref, WT_PAGE *page /* * Do not include history store updates greater than on-disk data store version to construct - * a full update to restore. Include the most recent updates than the on-disk version - * shouldn't be problem as the on-disk version in history store is always a full update. It - * is better to not to include those updates as it unnecessarily increases the rollback to - * stable time. + * a full update to restore except when the on-disk update is prepared. Including more + * recent updates than the on-disk version shouldn't be problem as the on-disk version in + * history store is always a full update. It is better to not to include those updates as it + * unnecessarily increases the rollback to stable time. * * Comparing with timestamps here has no problem unlike in search flow where the timestamps * may be reset during reconciliation. RTS detects an on-disk update is unstable based on * the written proper timestamp, so comparing against it with history store shouldn't have * any problem. */ - if (hs_start_ts <= unpack->tw.start_ts) { + if (hs_start_ts <= unpack->tw.start_ts || unpack->tw.prepare) { if (type == WT_UPDATE_MODIFY) WT_ERR(__wt_modify_apply_item( session, S2BT(session)->value_format, &full_value, hs_value->data)); @@ -423,7 +423,7 @@ __rollback_ondisk_fixup_key(WT_SESSION_IMPL *session, WT_REF *ref, WT_PAGE *page __wt_timestamp_to_string(hs_durable_ts, ts_string[1]), __wt_timestamp_to_string(hs_stop_durable_ts, ts_string[2]), __wt_timestamp_to_string(rollback_timestamp, ts_string[3]), hs_tw->start_txn, type); - WT_ASSERT(session, hs_tw->start_ts <= unpack->tw.start_ts); + WT_ASSERT(session, unpack->tw.prepare || hs_tw->start_ts <= unpack->tw.start_ts); valid_update_found = true; break; } |