From 2aa9fe6922c47edd2e42c21b5438bbe6ef91df35 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Thu, 13 Jul 2023 00:52:45 +0000 Subject: [PATCH 01/10] Add fast truncate runtime variable for standalone releases --- src/include/connection.h | 2 ++ src/support/global.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/include/connection.h b/src/include/connection.h index 54bf908990f..dcb2f08bed3 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -27,6 +27,8 @@ struct __wt_process { double tsc_nsec_ratio; /* rdtsc ticks to nanoseconds */ bool use_epochtime; /* use expensive time */ + bool fast_truncate_2022; /* fast-truncate fix run-time configuration */ + WT_CACHE_POOL *cache_pool; /* shared cache information */ }; extern WT_PROCESS __wt_process; diff --git a/src/support/global.c b/src/support/global.c index dc038c2b53c..7b02cefea39 100644 --- a/src/support/global.c +++ b/src/support/global.c @@ -122,6 +122,10 @@ __global_once(void) */ __wt_process.checksum = wiredtiger_crc32c_func(); + /* Run-time configuration. */ +#ifdef WT_STANDALONE_BUILD + __wt_process.fast_truncate_2022 = true; +#endif __global_calibrate_ticks(); } From f03a57021806a31bb9749997c94a0fe0c81321a8 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Thu, 13 Jul 2023 01:03:49 +0000 Subject: [PATCH 02/10] Add fast truncate flag to page header --- src/btree/bt_vrfy_dsk.c | 2 ++ src/include/btmem.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/btree/bt_vrfy_dsk.c b/src/btree/bt_vrfy_dsk.c index 269a226991e..b9bc0a32086 100644 --- a/src/btree/bt_vrfy_dsk.c +++ b/src/btree/bt_vrfy_dsk.c @@ -122,6 +122,8 @@ __wt_verify_dsk_image(WT_SESSION_IMPL *session, const char *tag, const WT_PAGE_H LF_CLR(WT_PAGE_ENCRYPTED); if (LF_ISSET(WT_PAGE_UNUSED)) LF_CLR(WT_PAGE_UNUSED); + if (LF_ISSET(WT_PAGE_FT_UPDATE)) + LF_CLR(WT_PAGE_FT_UPDATE); if (flags != 0) WT_RET_VRFY(session, "page at %s has invalid flags set: 0x%" PRIx8, tag, flags); diff --git a/src/include/btmem.h b/src/include/btmem.h index 034b52d56d2..178902d40cb 100644 --- a/src/include/btmem.h +++ b/src/include/btmem.h @@ -77,6 +77,7 @@ struct __wt_page_header { #define WT_PAGE_EMPTY_V_NONE 0x04u /* Page has no zero-length values */ #define WT_PAGE_ENCRYPTED 0x08u /* Page is encrypted on disk */ #define WT_PAGE_UNUSED 0x10u /* Historic lookaside store page updates, no longer used */ +#define WT_PAGE_FT_UPDATE 0x20u /* Page contains updated fast-truncate information */ uint8_t flags; /* 25: flags */ /* A byte of padding, positioned to be added to the flags. */ From 8f4e900dc260b505e2c5ca89189ff95ba1d1f2d2 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Thu, 13 Jul 2023 01:25:59 +0000 Subject: [PATCH 03/10] Expand cell size to account for fast truncate info --- src/include/cell.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/include/cell.h b/src/include/cell.h index 68e11c3d903..351c7ae6464 100644 --- a/src/include/cell.h +++ b/src/include/cell.h @@ -132,20 +132,21 @@ */ struct __wt_cell { /* - * Maximum of 71 bytes: + * Maximum of 98 bytes: * 1: cell descriptor byte * 1: prefix compression count * 1: secondary descriptor byte * 36: 4 timestamps (uint64_t encoding, max 9 bytes) * 18: 2 transaction IDs (uint64_t encoding, max 9 bytes) * 9: associated 64-bit value (uint64_t encoding, max 9 bytes) + * 27: fast-delete information (transaction ID, 2 timestamps) * 5: data length (uint32_t encoding, max 5 bytes) * - * This calculation is extremely pessimistic: the prefix compression - * count and 64V value overlap, and the validity window, 64V value - * and data length are all optional in some cases. + * This calculation is pessimistic: the prefix compression count and 64V value overlap, and the + * validity window, 64V value, fast-delete information and data length are all optional in some + * or even most cases. */ - uint8_t __chunk[1 + 1 + 1 + 7 * WT_INTPACK64_MAXSIZE + WT_INTPACK32_MAXSIZE]; + uint8_t __chunk[98]; }; /* AUTOMATIC FLAG VALUE GENERATION START 0 */ @@ -197,6 +198,8 @@ struct __wt_cell_unpack_addr { WT_CELL_COMMON_FIELDS; WT_TIME_AGGREGATE ta; /* Address validity window */ + + WT_PAGE_DELETED page_del; /* Fast-truncate information */ }; /* From 386006bb53623d7da6d13ace48be6513a9170edc Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Fri, 14 Jul 2023 04:50:43 +0000 Subject: [PATCH 04/10] Support fast truncate information read only --- src/btree/bt_delete.c | 4 ++-- src/btree/row_modify.c | 4 ++-- src/include/btmem.h | 15 ++++++++++----- src/include/cell_inline.h | 25 +++++++++++++++++++++++++ src/txn/txn.c | 2 +- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/btree/bt_delete.c b/src/btree/bt_delete.c index 1edd7afd169..6173a636a90 100644 --- a/src/btree/bt_delete.c +++ b/src/btree/bt_delete.c @@ -126,7 +126,7 @@ __wt_delete_page(WT_SESSION_IMPL *session, WT_REF *ref, bool *skipp) /* Allocate and initialize the page-deleted structure. */ WT_ERR(__wt_calloc_one(session, &ref->ft_info.del)); - ref->ft_info.del->previous_state = previous_state; + ref->ft_info.del->previous_ref_state = previous_state; WT_ERR(__wt_txn_modify_page_delete(session, ref)); @@ -193,7 +193,7 @@ __wt_delete_page_rollback(WT_SESSION_IMPL *session, WT_REF *ref) * a hazard pointer. We're safe since pages with unresolved transactions aren't going anywhere. */ if (current_state == WT_REF_DELETED) - current_state = ref->ft_info.del->previous_state; + current_state = ref->ft_info.del->previous_ref_state; else if ((updp = ref->ft_info.update) != NULL) for (; *updp != NULL; ++updp) (*updp)->txnid = WT_TXN_ABORTED; diff --git a/src/btree/row_modify.c b/src/btree/row_modify.c index 65c1165f2d6..5d281b6c945 100644 --- a/src/btree/row_modify.c +++ b/src/btree/row_modify.c @@ -133,8 +133,8 @@ __wt_row_modify(WT_CURSOR_BTREE *cbt, const WT_ITEM *key, const WT_ITEM *value, WT_ASSERT(session, !WT_IS_HS(S2BT(session)->dhandle) || (*upd_entry == NULL || - ((*upd_entry)->type == WT_UPDATE_TOMBSTONE && (*upd_entry)->txnid == WT_TS_NONE && - (*upd_entry)->start_ts == WT_TS_NONE)) || + ((*upd_entry)->type == WT_UPDATE_TOMBSTONE && + (*upd_entry)->txnid == WT_TXN_NONE && (*upd_entry)->start_ts == WT_TS_NONE)) || (upd_arg->type == WT_UPDATE_TOMBSTONE && upd_arg->start_ts == WT_TS_NONE && upd_arg->next == NULL) || (upd_arg->type == WT_UPDATE_TOMBSTONE && upd_arg->next != NULL && diff --git a/src/include/btmem.h b/src/include/btmem.h index 178902d40cb..f5b06916aec 100644 --- a/src/include/btmem.h +++ b/src/include/btmem.h @@ -865,14 +865,19 @@ struct __wt_page_deleted { wt_timestamp_t durable_timestamp; /* - * The state is used for transaction prepare to manage visibility and inheriting prepare state - * to update_list. + * The prepare state is used for transaction prepare to manage visibility and inheriting prepare + * state to update_list. */ - volatile uint8_t prepare_state; /* Prepare state. */ + volatile uint8_t prepare_state; - uint8_t previous_state; /* Previous state */ + /* + * The previous state of the WT_REF; if the fast-truncate transaction is rolled back without the + * page first being instantiated, this is the state to which the WT_REF returns. + */ + uint8_t previous_ref_state; - uint8_t committed; /* Committed */ + /* If the fast-truncate transaction has committed. */ + bool committed; }; /* diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index e593ff17a0d..53055facab9 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -670,6 +670,7 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE WT_TIME_WINDOW tw; } copy; WT_CELL_UNPACK_COMMON *unpack; + WT_PAGE_DELETED *page_del; WT_TIME_AGGREGATE *ta; WT_TIME_WINDOW *tw; uint64_t v; @@ -767,6 +768,7 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE if ((cell->__chunk[0] & WT_CELL_SECOND_DESC) == 0) break; flags = *p++; /* skip second descriptor byte */ + WT_CELL_LEN_CHK(p, 0); if (LF_ISSET(WT_CELL_PREPARE)) ta->prepare = 1; @@ -810,6 +812,7 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE if ((cell->__chunk[0] & WT_CELL_SECOND_DESC) == 0) break; flags = *p++; /* skip second descriptor byte */ + WT_CELL_LEN_CHK(p, 0); if (LF_ISSET(WT_CELL_PREPARE)) tw->prepare = 1; @@ -845,6 +848,28 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE break; } + /* + * Unpack any fast-truncate information. Note that there is no way to write fast-truncate + * information to disk in versions before 6.1, but this information may still exist in the + * database files if we are downgrading from newer versions. + */ + if (unpack->raw == WT_CELL_ADDR_DEL && F_ISSET(dsk, WT_PAGE_FT_UPDATE)) { + page_del = &unpack_addr->page_del; + WT_RET(__wt_vunpack_uint( + &p, end == NULL ? 0 : WT_PTRDIFF(end, p), (uint64_t *)&page_del->txnid)); + WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->timestamp)); + WT_RET(__wt_vunpack_uint( + &p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->durable_timestamp)); + page_del->prepare_state = 0; /* No prepare can have been in progress. */ + page_del->previous_ref_state = WT_REF_DISK; /* The leaf page is on disk. */ + page_del->committed = true; /* There is no running transaction. */ + + /* Avoid a stale transaction ID on restart. */ + if (dsk->write_gen <= S2BT(session)->base_write_gen && + !F_ISSET(session, WT_SESSION_DEBUG_DO_NOT_CLEAR_TXN_ID)) + page_del->txnid = WT_TXN_NONE; + } + /* * Check for an RLE count or record number that optionally follows the cell descriptor byte on * column-store variable-length pages. diff --git a/src/txn/txn.c b/src/txn/txn.c index 033bd576455..143e0a0ef10 100644 --- a/src/txn/txn.c +++ b/src/txn/txn.c @@ -1705,7 +1705,7 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[]) if (op->type == WT_TXN_OP_REF_DELETE) { WT_REF_LOCK(session, op->u.ref, &previous_state); if (previous_state == WT_REF_DELETED) - op->u.ref->ft_info.del->committed = 1; + op->u.ref->ft_info.del->committed = true; else __wt_free(session, op->u.ref->ft_info.update); WT_REF_UNLOCK(op->u.ref, previous_state); From 7adba88a4e537bbc00b8fa92a3bf7d2491d801ef Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Mon, 17 Jul 2023 00:50:48 +0000 Subject: [PATCH 05/10] Remove unnecessary variables and variable changes --- src/btree/bt_delete.c | 4 ++-- src/include/btmem.h | 15 +++++---------- src/include/cell_inline.h | 6 +++--- src/include/connection.h | 2 -- src/support/global.c | 4 ---- src/txn/txn.c | 2 +- 6 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/btree/bt_delete.c b/src/btree/bt_delete.c index 6173a636a90..1edd7afd169 100644 --- a/src/btree/bt_delete.c +++ b/src/btree/bt_delete.c @@ -126,7 +126,7 @@ __wt_delete_page(WT_SESSION_IMPL *session, WT_REF *ref, bool *skipp) /* Allocate and initialize the page-deleted structure. */ WT_ERR(__wt_calloc_one(session, &ref->ft_info.del)); - ref->ft_info.del->previous_ref_state = previous_state; + ref->ft_info.del->previous_state = previous_state; WT_ERR(__wt_txn_modify_page_delete(session, ref)); @@ -193,7 +193,7 @@ __wt_delete_page_rollback(WT_SESSION_IMPL *session, WT_REF *ref) * a hazard pointer. We're safe since pages with unresolved transactions aren't going anywhere. */ if (current_state == WT_REF_DELETED) - current_state = ref->ft_info.del->previous_ref_state; + current_state = ref->ft_info.del->previous_state; else if ((updp = ref->ft_info.update) != NULL) for (; *updp != NULL; ++updp) (*updp)->txnid = WT_TXN_ABORTED; diff --git a/src/include/btmem.h b/src/include/btmem.h index f5b06916aec..178902d40cb 100644 --- a/src/include/btmem.h +++ b/src/include/btmem.h @@ -865,19 +865,14 @@ struct __wt_page_deleted { wt_timestamp_t durable_timestamp; /* - * The prepare state is used for transaction prepare to manage visibility and inheriting prepare - * state to update_list. + * The state is used for transaction prepare to manage visibility and inheriting prepare state + * to update_list. */ - volatile uint8_t prepare_state; + volatile uint8_t prepare_state; /* Prepare state. */ - /* - * The previous state of the WT_REF; if the fast-truncate transaction is rolled back without the - * page first being instantiated, this is the state to which the WT_REF returns. - */ - uint8_t previous_ref_state; + uint8_t previous_state; /* Previous state */ - /* If the fast-truncate transaction has committed. */ - bool committed; + uint8_t committed; /* Committed */ }; /* diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index 53055facab9..dc1c90bf6d0 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -860,9 +860,9 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->timestamp)); WT_RET(__wt_vunpack_uint( &p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->durable_timestamp)); - page_del->prepare_state = 0; /* No prepare can have been in progress. */ - page_del->previous_ref_state = WT_REF_DISK; /* The leaf page is on disk. */ - page_del->committed = true; /* There is no running transaction. */ + page_del->prepare_state = 0; /* No prepare can have been in progress. */ + page_del->previous_state = WT_REF_DISK; /* The leaf page is on disk. */ + page_del->committed = 1; /* There is no running transaction. */ /* Avoid a stale transaction ID on restart. */ if (dsk->write_gen <= S2BT(session)->base_write_gen && diff --git a/src/include/connection.h b/src/include/connection.h index dcb2f08bed3..54bf908990f 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -27,8 +27,6 @@ struct __wt_process { double tsc_nsec_ratio; /* rdtsc ticks to nanoseconds */ bool use_epochtime; /* use expensive time */ - bool fast_truncate_2022; /* fast-truncate fix run-time configuration */ - WT_CACHE_POOL *cache_pool; /* shared cache information */ }; extern WT_PROCESS __wt_process; diff --git a/src/support/global.c b/src/support/global.c index 7b02cefea39..dc038c2b53c 100644 --- a/src/support/global.c +++ b/src/support/global.c @@ -122,10 +122,6 @@ __global_once(void) */ __wt_process.checksum = wiredtiger_crc32c_func(); - /* Run-time configuration. */ -#ifdef WT_STANDALONE_BUILD - __wt_process.fast_truncate_2022 = true; -#endif __global_calibrate_ticks(); } diff --git a/src/txn/txn.c b/src/txn/txn.c index 143e0a0ef10..033bd576455 100644 --- a/src/txn/txn.c +++ b/src/txn/txn.c @@ -1705,7 +1705,7 @@ __wt_txn_commit(WT_SESSION_IMPL *session, const char *cfg[]) if (op->type == WT_TXN_OP_REF_DELETE) { WT_REF_LOCK(session, op->u.ref, &previous_state); if (previous_state == WT_REF_DELETED) - op->u.ref->ft_info.del->committed = true; + op->u.ref->ft_info.del->committed = 1; else __wt_free(session, op->u.ref->ft_info.update); WT_REF_UNLOCK(op->u.ref, previous_state); From e3bba697ea7fe4fa5cfc0905be31e9fe2d99f47a Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Mon, 17 Jul 2023 01:26:05 +0000 Subject: [PATCH 06/10] Run s_all --- src/include/cell_inline.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index dc1c90bf6d0..7d520de7d87 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -860,9 +860,9 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->timestamp)); WT_RET(__wt_vunpack_uint( &p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->durable_timestamp)); - page_del->prepare_state = 0; /* No prepare can have been in progress. */ - page_del->previous_state = WT_REF_DISK; /* The leaf page is on disk. */ - page_del->committed = 1; /* There is no running transaction. */ + page_del->prepare_state = 0; /* No prepare can have been in progress. */ + page_del->previous_state = WT_REF_DISK; /* The leaf page is on disk. */ + page_del->committed = 1; /* There is no running transaction. */ /* Avoid a stale transaction ID on restart. */ if (dsk->write_gen <= S2BT(session)->base_write_gen && From 3096cb16f3c011dee3a3cc6f62d97dfb116b81a5 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Mon, 17 Jul 2023 03:59:24 +0000 Subject: [PATCH 07/10] Unpack page delete info into local variable --- src/include/cell_inline.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index 7d520de7d87..6b3d4d79ef7 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -670,7 +670,7 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE WT_TIME_WINDOW tw; } copy; WT_CELL_UNPACK_COMMON *unpack; - WT_PAGE_DELETED *page_del; + WT_PAGE_DELETED page_del; WT_TIME_AGGREGATE *ta; WT_TIME_WINDOW *tw; uint64_t v; @@ -854,20 +854,19 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE * database files if we are downgrading from newer versions. */ if (unpack->raw == WT_CELL_ADDR_DEL && F_ISSET(dsk, WT_PAGE_FT_UPDATE)) { - page_del = &unpack_addr->page_del; - WT_RET(__wt_vunpack_uint( - &p, end == NULL ? 0 : WT_PTRDIFF(end, p), (uint64_t *)&page_del->txnid)); - WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->timestamp)); - WT_RET(__wt_vunpack_uint( - &p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del->durable_timestamp)); - page_del->prepare_state = 0; /* No prepare can have been in progress. */ - page_del->previous_state = WT_REF_DISK; /* The leaf page is on disk. */ - page_del->committed = 1; /* There is no running transaction. */ + WT_RET( + __wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), (uint64_t *)&page_del.txnid)); + WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del.timestamp)); + WT_RET( + __wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del.durable_timestamp)); + page_del.prepare_state = 0; /* No prepare can have been in progress. */ + page_del.previous_state = WT_REF_DISK; /* The leaf page is on disk. */ + page_del.committed = 1; /* There is no running transaction. */ /* Avoid a stale transaction ID on restart. */ if (dsk->write_gen <= S2BT(session)->base_write_gen && !F_ISSET(session, WT_SESSION_DEBUG_DO_NOT_CLEAR_TXN_ID)) - page_del->txnid = WT_TXN_NONE; + page_del.txnid = WT_TXN_NONE; } /* From 67bfbb20a030c7aefe575f91fe39113a6a40e911 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Tue, 18 Jul 2023 05:16:12 +0000 Subject: [PATCH 08/10] Remove unnecessary variables and information --- src/include/cell.h | 2 -- src/include/cell_inline.h | 8 -------- 2 files changed, 10 deletions(-) diff --git a/src/include/cell.h b/src/include/cell.h index 351c7ae6464..122156549c0 100644 --- a/src/include/cell.h +++ b/src/include/cell.h @@ -198,8 +198,6 @@ struct __wt_cell_unpack_addr { WT_CELL_COMMON_FIELDS; WT_TIME_AGGREGATE ta; /* Address validity window */ - - WT_PAGE_DELETED page_del; /* Fast-truncate information */ }; /* diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index 6b3d4d79ef7..5051df1c034 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -859,14 +859,6 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE WT_RET(__wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del.timestamp)); WT_RET( __wt_vunpack_uint(&p, end == NULL ? 0 : WT_PTRDIFF(end, p), &page_del.durable_timestamp)); - page_del.prepare_state = 0; /* No prepare can have been in progress. */ - page_del.previous_state = WT_REF_DISK; /* The leaf page is on disk. */ - page_del.committed = 1; /* There is no running transaction. */ - - /* Avoid a stale transaction ID on restart. */ - if (dsk->write_gen <= S2BT(session)->base_write_gen && - !F_ISSET(session, WT_SESSION_DEBUG_DO_NOT_CLEAR_TXN_ID)) - page_del.txnid = WT_TXN_NONE; } /* From 20f851a5776322e2b1d9ea3e082dcca4b9f94742 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Thu, 20 Jul 2023 05:02:23 +0000 Subject: [PATCH 09/10] Update comment in cell unpacking function --- src/include/cell_inline.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index 5051df1c034..feece8b1142 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -851,7 +851,9 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE /* * Unpack any fast-truncate information. Note that there is no way to write fast-truncate * information to disk in versions before 6.1, but this information may still exist in the - * database files if we are downgrading from newer versions. + * database files if we are downgrading from newer versions. If the fast-truncate information + * is present, it needs to be unpacked but we will ignore these values. Ignoring these values + * is equivalent to writing out truncated content that is not associated with any visibility. */ if (unpack->raw == WT_CELL_ADDR_DEL && F_ISSET(dsk, WT_PAGE_FT_UPDATE)) { WT_RET( From 427c7d057150775cf90d9321e73a31254f23f3f3 Mon Sep 17 00:00:00 2001 From: Monica Ng Date: Thu, 20 Jul 2023 05:20:56 +0000 Subject: [PATCH 10/10] Run s_all --- src/include/cell_inline.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/cell_inline.h b/src/include/cell_inline.h index feece8b1142..89b15d99bf2 100644 --- a/src/include/cell_inline.h +++ b/src/include/cell_inline.h @@ -851,9 +851,9 @@ __wt_cell_unpack_safe(WT_SESSION_IMPL *session, const WT_PAGE_HEADER *dsk, WT_CE /* * Unpack any fast-truncate information. Note that there is no way to write fast-truncate * information to disk in versions before 6.1, but this information may still exist in the - * database files if we are downgrading from newer versions. If the fast-truncate information - * is present, it needs to be unpacked but we will ignore these values. Ignoring these values - * is equivalent to writing out truncated content that is not associated with any visibility. + * database files if we are downgrading from newer versions. If the fast-truncate information is + * present, it needs to be unpacked but we will ignore these values. Ignoring these values is + * equivalent to writing out truncated content that is not associated with any visibility. */ if (unpack->raw == WT_CELL_ADDR_DEL && F_ISSET(dsk, WT_PAGE_FT_UPDATE)) { WT_RET(