Commit db274804 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

A fix that makes the {{{test_dupsort_del}}} pass. However...

A fix that makes the {{{test_dupsort_del}}} pass.  However {{{test_dupsort_del_checksum}}} still breaks under TokuDB, but not under BDB.  Addesses #690.

git-svn-id: file:///svn/tokudb@3442 c7de825b-a66e-492c-adef-691d508d4ae1
parent 5bac58a6
...@@ -1357,21 +1357,17 @@ static int brt_leaf_apply_cmd_once (BRT t, BRTNODE node, BRT_CMD cmd, TOKULOGGER ...@@ -1357,21 +1357,17 @@ static int brt_leaf_apply_cmd_once (BRT t, BRTNODE node, BRT_CMD cmd, TOKULOGGER
if (le) { if (le) {
// It's there, note that it's gone and remove it from the mempool // It's there, note that it's gone and remove it from the mempool
node->u.l.n_bytes_in_buffer -= PMA_ITEM_OVERHEAD + leafentry_disksize(le);
node->local_fingerprint -= node->rand4fingerprint * toku_le_crc(le);
r = toku_log_deleteleafentry(logger, &node->log_lsn, 0, filenum, node->thisnodename, idx, le); r = toku_log_deleteleafentry(logger, &node->log_lsn, 0, filenum, node->thisnodename, idx, le);
if (r!=0) return r; if (r!=0) return r;
BRT_CMD_S cmd2 = *cmd;
DBT val_from_lekey;
cmd2.u.id.val = toku_fill_dbt(&val_from_lekey, le_latest_val(le), le_latest_vallen(le));
struct cmd_leafval_bessel_extra be = {t, &cmd2, 1}; // always compare both in this mode, if the value is there
struct move_struct ms = {.logger=logger, .filenum=filenum, .from=node, .to=node}; struct move_struct ms = {.logger=logger, .filenum=filenum, .from=node, .to=node};
toku_gpma_delete_bessel(node->u.l.buffer, r = toku_gpma_delete_at_index(node->u.l.buffer, idx, note_move_items_within, &ms);
toku_cmd_leafval_bessel, &be, if (r!=0) return r;
0, 0,
note_move_items_within, &ms); node->u.l.n_bytes_in_buffer -= PMA_ITEM_OVERHEAD + leafentry_disksize(le);
node->local_fingerprint -= node->rand4fingerprint * toku_le_crc(le);
toku_mempool_mfree(&node->u.l.buffer_mempool, 0, storedlen); // Must pass 0, since le may be no good any more. toku_mempool_mfree(&node->u.l.buffer_mempool, 0, storedlen); // Must pass 0, since le may be no good any more.
} }
if (newdata) { if (newdata) {
......
/* Test to see if delete works right with dupsort. */ /* Test to see if delete works right with dupsort.
/* Try to exercise all the cases for the leafcommands in brt.c * The issue is that things might look OK before the commit, but bad after the commit.
*/ */
#include <db.h> #include <db.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment