summaryrefslogtreecommitdiff
path: root/src/btree/col_modify.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-10-16 09:44:03 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-10-16 10:06:21 -0400
commit97c99c908366cd969864accc77c2cd2d08cded3d (patch)
treeee8b4fbd60c6b98b49d54cb4803400ffcde2cec6 /src/btree/col_modify.c
parent63b536a52e37157c8f4d2713c83b56ab108e8280 (diff)
downloadmongo-97c99c908366cd969864accc77c2cd2d08cded3d.tar.gz
Simplify argument passing in the serialization functions and inline them.
Diffstat (limited to 'src/btree/col_modify.c')
-rw-r--r--src/btree/col_modify.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/btree/col_modify.c b/src/btree/col_modify.c
index d1409eaca21..3fb0b4c97c9 100644
--- a/src/btree/col_modify.c
+++ b/src/btree/col_modify.c
@@ -210,81 +210,6 @@ __col_insert_alloc(WT_SESSION_IMPL *session,
}
/*
- * __wt_col_append_serial_func --
- * Server function to append an WT_INSERT entry to the tree.
- */
-int
-__wt_col_append_serial_func(WT_SESSION_IMPL *session, void *args)
-{
- WT_BTREE *btree;
- WT_INSERT *new_ins, ***ins_stack;
- WT_INSERT_HEAD *ins_head;
- WT_PAGE *page;
- uint64_t recno, *recnop;
- u_int i, skipdepth;
-
- btree = S2BT(session);
-
- __wt_col_append_unpack(args, &page,
- &ins_head, &ins_stack, &new_ins, &recnop, &skipdepth);
-
- /* Confirm the page write generation won't wrap. */
- WT_RET(__wt_page_write_gen_wrapped_check(page));
-
- /*
- * If the application didn't specify a record number, allocate a new one
- * and set up for an append.
- */
- if ((recno = WT_INSERT_RECNO(new_ins)) == 0) {
- recno = WT_INSERT_RECNO(new_ins) = btree->last_recno + 1;
- WT_ASSERT(session, WT_SKIP_LAST(ins_head) == NULL ||
- recno > WT_INSERT_RECNO(WT_SKIP_LAST(ins_head)));
- for (i = 0; i < skipdepth; i++)
- ins_stack[i] = ins_head->tail[i] == NULL ?
- &ins_head->head[i] : &ins_head->tail[i]->next[i];
- }
-
- /*
- * Confirm we are still in the expected position, and no item has been
- * added where our insert belongs. Take extra care at the beginning
- * and end of the list (at each level): retry if we race there.
- *
- * !!!
- * Note the test for ins_stack[0] == NULL: that's the test for an
- * uninitialized cursor, ins_stack[0] is cleared as part of
- * initializing a cursor for a search.
- */
- for (i = 0; i < skipdepth; i++) {
- if (ins_stack[i] == NULL ||
- *ins_stack[i] != new_ins->next[i])
- return (WT_RESTART);
- if (new_ins->next[i] == NULL &&
- ins_head->tail[i] != NULL &&
- ins_stack[i] != &ins_head->tail[i]->next[i])
- return (WT_RESTART);
- }
-
- /* Update the skiplist elements that reference the new WT_INSERT. */
- for (i = 0; i < skipdepth; i++) {
- if (ins_head->tail[i] == NULL ||
- ins_stack[i] == &ins_head->tail[i]->next[i])
- ins_head->tail[i] = new_ins;
- if (ins_stack[i] != NULL)
- *ins_stack[i] = new_ins;
- }
-
- /*
- * Set the calling cursor's record number.
- * If we extended the file, update the last record number.
- */
- *recnop = recno;
- if (recno > btree->last_recno)
- btree->last_recno = recno;
-
- return (0);
-}
-
-/*
* __wt_col_leaf_obsolete --
* Discard all obsolete updates on a column-store leaf page.
*/