Commit 09b31891 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2811], make names of XXX_is_del functions consistent

git-svn-id: file:///svn/toku/tokudb@25690 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0a664473
...@@ -4393,16 +4393,16 @@ brt_cursor_update(BRT_CURSOR brtcursor) { ...@@ -4393,16 +4393,16 @@ brt_cursor_update(BRT_CURSOR brtcursor) {
// Returns true if the value that is to be read is empty. // Returns true if the value that is to be read is empty.
// //
static inline int static inline int
is_le_val_empty(LEAFENTRY le, BRT_CURSOR brtcursor) { is_le_val_del(LEAFENTRY le, BRT_CURSOR brtcursor) {
if (brtcursor->is_snapshot_read) { if (brtcursor->is_snapshot_read) {
BOOL is_empty; BOOL is_del;
le_iterate_is_empty( le_iterate_is_del(
le, le,
does_txn_read_entry, does_txn_read_entry,
&is_empty, &is_del,
brtcursor->ttxn brtcursor->ttxn
); );
return is_empty; return is_del;
} }
else { else {
return le_latest_is_del(le); return le_latest_is_del(le);
...@@ -4434,7 +4434,7 @@ brt_search_leaf_node(BRTNODE node, brt_search_t *search, BRT_GET_CALLBACK_FUNCTI ...@@ -4434,7 +4434,7 @@ brt_search_leaf_node(BRTNODE node, brt_search_t *search, BRT_GET_CALLBACK_FUNCTI
if (r!=0) return r; if (r!=0) return r;
LEAFENTRY le = datav; LEAFENTRY le = datav;
if (!toku_brt_cursor_is_leaf_mode(brtcursor) && is_le_val_empty(le,brtcursor)) { if (!toku_brt_cursor_is_leaf_mode(brtcursor) && is_le_val_del(le,brtcursor)) {
// Provisionally deleted stuff is gone. // Provisionally deleted stuff is gone.
// So we need to scan in the direction to see if we can find something // So we need to scan in the direction to see if we can find something
while (1) { while (1) {
...@@ -4459,7 +4459,7 @@ brt_search_leaf_node(BRTNODE node, brt_search_t *search, BRT_GET_CALLBACK_FUNCTI ...@@ -4459,7 +4459,7 @@ brt_search_leaf_node(BRTNODE node, brt_search_t *search, BRT_GET_CALLBACK_FUNCTI
r = toku_omt_fetch(node->u.l.buffer, idx, &datav, NULL); r = toku_omt_fetch(node->u.l.buffer, idx, &datav, NULL);
lazy_assert_zero(r); // we just validated the index lazy_assert_zero(r); // we just validated the index
le = datav; le = datav;
if (!is_le_val_empty(le,brtcursor)) goto got_a_good_value; if (!is_le_val_del(le,brtcursor)) goto got_a_good_value;
} }
} }
got_a_good_value: got_a_good_value:
...@@ -4843,7 +4843,7 @@ brt_cursor_shortcut (BRT_CURSOR cursor, int direction, u_int32_t limit, BRT_GET_ ...@@ -4843,7 +4843,7 @@ brt_cursor_shortcut (BRT_CURSOR cursor, int direction, u_int32_t limit, BRT_GET_
r = toku_omt_fetch(omt, index, &le, NULL); r = toku_omt_fetch(omt, index, &le, NULL);
lazy_assert_zero(r); lazy_assert_zero(r);
if (toku_brt_cursor_is_leaf_mode(cursor) || !is_le_val_empty(le, cursor)) { if (toku_brt_cursor_is_leaf_mode(cursor) || !is_le_val_del(le, cursor)) {
maybe_do_implicit_promotion_on_query(cursor, le); maybe_do_implicit_promotion_on_query(cursor, le);
u_int32_t keylen; u_int32_t keylen;
void *key; void *key;
......
...@@ -184,7 +184,7 @@ le_clean(uint8_t *key, uint32_t keylen, ...@@ -184,7 +184,7 @@ le_clean(uint8_t *key, uint32_t keylen,
// r|r!=0&&r!=TOKUDB_ACCEPT: Quit early, return r, because something unexpected went wrong (error case) // r|r!=0&&r!=TOKUDB_ACCEPT: Quit early, return r, because something unexpected went wrong (error case)
typedef int(*LE_ITERATE_CALLBACK)(TXNID id, TOKUTXN context); typedef int(*LE_ITERATE_CALLBACK)(TXNID id, TOKUTXN context);
int le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_empty, TOKUTXN context); int le_iterate_is_del(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_empty, TOKUTXN context);
int le_iterate_val(LEAFENTRY le, LE_ITERATE_CALLBACK f, void** valpp, u_int32_t *vallenp, TOKUTXN context); int le_iterate_val(LEAFENTRY le, LE_ITERATE_CALLBACK f, void** valpp, u_int32_t *vallenp, TOKUTXN context);
......
...@@ -1812,11 +1812,11 @@ ule_verify_xids(ULE ule, uint32_t interesting, TXNID *xids) { ...@@ -1812,11 +1812,11 @@ ule_verify_xids(ULE ule, uint32_t interesting, TXNID *xids) {
// Parameters: // Parameters:
// le - leafentry to iterate over // le - leafentry to iterate over
// f - callback function that checks if a TXNID in le is accepted, and its associated value should be examined. // f - callback function that checks if a TXNID in le is accepted, and its associated value should be examined.
// is_emptyp - output parameter that returns answer // is_delp - output parameter that returns answer
// context - parameter for f // context - parameter for f
// //
int int
le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTXN context) { le_iterate_is_del(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_delp, TOKUTXN context) {
#if ULE_DEBUG #if ULE_DEBUG
ULE_S ule; ULE_S ule;
le_unpack(&ule, le); le_unpack(&ule, le);
...@@ -1825,7 +1825,7 @@ le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTX ...@@ -1825,7 +1825,7 @@ le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTX
//Read the keylen //Read the keylen
uint8_t type = le->type; uint8_t type = le->type;
int r; int r;
BOOL is_empty = FALSE; BOOL is_del = FALSE;
switch (type) { switch (type) {
case LE_CLEAN: { case LE_CLEAN: {
r = 0; r = 0;
...@@ -1857,13 +1857,13 @@ le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTX ...@@ -1857,13 +1857,13 @@ le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTX
uint32_t *length_and_bits = (uint32_t*)p; uint32_t *length_and_bits = (uint32_t*)p;
uint32_t my_length_and_bit = toku_dtoh32(length_and_bits[index]); uint32_t my_length_and_bit = toku_dtoh32(length_and_bits[index]);
is_empty = !IS_INSERT(my_length_and_bit); is_del = !IS_INSERT(my_length_and_bit);
#if ULE_DEBUG #if ULE_DEBUG
{ {
uint32_t has_p = (ule.num_puxrs != 0); uint32_t has_p = (ule.num_puxrs != 0);
uint32_t ule_index = (index==0) ? ule.num_cuxrs + ule.num_puxrs - 1 : ule.num_cuxrs - 1 + has_p - index; uint32_t ule_index = (index==0) ? ule.num_cuxrs + ule.num_puxrs - 1 : ule.num_cuxrs - 1 + has_p - index;
UXR uxr = ule.uxrs + ule_index; UXR uxr = ule.uxrs + ule_index;
invariant(uxr_is_delete(uxr) == is_empty); invariant(uxr_is_delete(uxr) == is_del);
} }
#endif #endif
break; break;
...@@ -1874,7 +1874,7 @@ le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTX ...@@ -1874,7 +1874,7 @@ le_iterate_is_empty(LEAFENTRY le, LE_ITERATE_CALLBACK f, BOOL *is_emptyp, TOKUTX
#if ULE_DEBUG #if ULE_DEBUG
ule_cleanup(&ule); ule_cleanup(&ule);
#endif #endif
if (!r) *is_emptyp = is_empty; if (!r) *is_delp = is_del;
return r; return r;
} }
......
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