summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/serial.i
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2019-08-07 15:12:18 +1000
committerLuke Chen <luke.chen@mongodb.com>2019-08-07 15:12:18 +1000
commitb8602c086ff469967bedc82b14d63d4a236d092c (patch)
tree8f732b2d259b59b01a891979f6a255e2c28f677c /src/third_party/wiredtiger/src/include/serial.i
parentf659b76958858056cdb7558032cb70bdd53c57b3 (diff)
downloadmongo-b8602c086ff469967bedc82b14d63d4a236d092c.tar.gz
Import wiredtiger: 19fd4ed45b3a2a8c119b68015113630b0c060e5f from branch mongodb-4.4
ref: c29f4c6030..19fd4ed45b for: 4.3.1 WT-4460 Optimize for in-order, non-overlapping modifications WT-4956 Handle the case where 4 billion updates are made to a page without eviction
Diffstat (limited to 'src/third_party/wiredtiger/src/include/serial.i')
-rw-r--r--src/third_party/wiredtiger/src/include/serial.i32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/third_party/wiredtiger/src/include/serial.i b/src/third_party/wiredtiger/src/include/serial.i
index 1c67a84adbf..701f73df84f 100644
--- a/src/third_party/wiredtiger/src/include/serial.i
+++ b/src/third_party/wiredtiger/src/include/serial.i
@@ -7,29 +7,6 @@
*/
/*
- * __page_write_gen_wrapped_check --
- * Confirm the page's write generation number won't wrap.
- */
-static inline int
-__page_write_gen_wrapped_check(WT_PAGE *page)
-{
- /*
- * Check to see if the page's write generation is about to wrap (wildly
- * unlikely as it implies 4B updates between clean page reconciliations,
- * but technically possible), and fail the update.
- *
- * The check is outside of the serialization mutex because the page's
- * write generation is going to be a hot cache line, so technically it's
- * possible for the page's write generation to wrap between the test and
- * our subsequent modification of it. However, the test is (4B-1M), and
- * there cannot be a million threads that have done the test but not yet
- * completed their modification.
- */
- return (page->modify->write_gen >
- UINT32_MAX - WT_MILLION ? WT_RESTART : 0);
-}
-
-/*
* __insert_simple_func --
* Worker function to add a WT_INSERT entry to the middle of a skiplist.
*/
@@ -163,9 +140,6 @@ __wt_col_append_serial(WT_SESSION_IMPL *session, WT_PAGE *page,
new_ins = *new_insp;
*new_insp = NULL;
- /* Check for page write generation wrap. */
- WT_RET(__page_write_gen_wrapped_check(page));
-
/*
* Acquire the page's spinlock unless we already have exclusive access.
* Then call the worker function.
@@ -215,9 +189,6 @@ __wt_insert_serial(WT_SESSION_IMPL *session, WT_PAGE *page,
new_ins = *new_insp;
*new_insp = NULL;
- /* Check for page write generation wrap. */
- WT_RET(__page_write_gen_wrapped_check(page));
-
simple = true;
for (i = 0; i < skipdepth; i++)
if (new_ins->next[i] == NULL)
@@ -272,9 +243,6 @@ __wt_update_serial(WT_SESSION_IMPL *session, WT_PAGE *page,
upd = *updp;
*updp = NULL;
- /* Check for page write generation wrap. */
- WT_RET(__page_write_gen_wrapped_check(page));
-
/*
* All structure setup must be flushed before the structure is entered
* into the list. We need a write barrier here, our callers depend on