Commit 7c65449c authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1031

Implements lazy updates for next_shortcut, and prev_shortcut.


git-svn-id: file:///svn/tokudb@5221 c7de825b-a66e-492c-adef-691d508d4ae1
parent 945b2dda
...@@ -205,6 +205,7 @@ unsigned int toku_brtnode_pivot_key_len (BRTNODE, struct kv_pair *); // Given th ...@@ -205,6 +205,7 @@ unsigned int toku_brtnode_pivot_key_len (BRTNODE, struct kv_pair *); // Given th
struct brt_cursor { struct brt_cursor {
struct list cursors_link; struct list cursors_link;
BRT brt; BRT brt;
BOOL current_in_omt, prev_in_omt;
DBT key, val; // The key-value pair that the cursor currently points to DBT key, val; // The key-value pair that the cursor currently points to
DBT prevkey, prevval; // The key-value pair that the cursor pointed to previously. (E.g., when we do a DB_NEXT) DBT prevkey, prevval; // The key-value pair that the cursor pointed to previously. (E.g., when we do a DB_NEXT)
int is_temporary_cursor; // If it is a temporary cursor then use the following skey and sval to return tokudb-managed values in dbts. Otherwise use the brt's skey and skval. int is_temporary_cursor; // If it is a temporary cursor then use the following skey and sval to return tokudb-managed values in dbts. Otherwise use the brt's skey and skval.
......
This diff is collapsed.
...@@ -628,7 +628,7 @@ int toku_omt_cursor_prev (OMTCURSOR c, OMTVALUE *v) { ...@@ -628,7 +628,7 @@ int toku_omt_cursor_prev (OMTCURSOR c, OMTVALUE *v) {
} }
c->index--; c->index--;
int r = toku_omt_fetch(c->omt, c->index, v, NULL); int r = toku_omt_fetch(c->omt, c->index, v, NULL);
if (r!=0) toku_omt_cursor_invalidate(c); assert(r==0);
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