Commit 16ce1a9d authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:3873], fix dictionary sequential queries, an accountablility variable that...

[t:3873], fix dictionary sequential queries, an accountablility variable that was no longer accurate thanks to bulk fetch

git-svn-id: file:///svn/toku/tokudb@34218 c7de825b-a66e-492c-adef-691d508d4ae1
parent 379bf01c
...@@ -3551,7 +3551,6 @@ toku_c_getf_next(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra) { ...@@ -3551,7 +3551,6 @@ toku_c_getf_next(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra) {
if (toku_c_uninitialized(c)) r = toku_c_getf_first(c, flag, f, extra); if (toku_c_uninitialized(c)) r = toku_c_getf_first(c, flag, f, extra);
else { else {
QUERY_CONTEXT_S context; //Describes the context of this query. QUERY_CONTEXT_S context; //Describes the context of this query.
num_sequential_queries++; // accountability
c_query_context_init(&context, c, flag, f, extra); c_query_context_init(&context, c, flag, f, extra);
//toku_brt_cursor_next will call c_getf_next_callback(..., context) (if query is successful) //toku_brt_cursor_next will call c_getf_next_callback(..., context) (if query is successful)
r = toku_brt_cursor_next(dbc_struct_i(c)->c, c_getf_next_callback, &context); r = toku_brt_cursor_next(dbc_struct_i(c)->c, c_getf_next_callback, &context);
...@@ -3567,6 +3566,7 @@ c_getf_next_callback(ITEMLEN keylen, bytevec key, ITEMLEN vallen, bytevec val, v ...@@ -3567,6 +3566,7 @@ c_getf_next_callback(ITEMLEN keylen, bytevec key, ITEMLEN vallen, bytevec val, v
QUERY_CONTEXT_BASE context = &super_context->base; QUERY_CONTEXT_BASE context = &super_context->base;
int r; int r;
num_sequential_queries++; // accountability
DBT found_key; DBT found_key;
DBT found_val; DBT found_val;
...@@ -3606,7 +3606,6 @@ toku_c_getf_prev(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra) { ...@@ -3606,7 +3606,6 @@ toku_c_getf_prev(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra) {
if (toku_c_uninitialized(c)) r = toku_c_getf_last(c, flag, f, extra); if (toku_c_uninitialized(c)) r = toku_c_getf_last(c, flag, f, extra);
else { else {
QUERY_CONTEXT_S context; //Describes the context of this query. QUERY_CONTEXT_S context; //Describes the context of this query.
num_sequential_queries++; // accountability
c_query_context_init(&context, c, flag, f, extra); c_query_context_init(&context, c, flag, f, extra);
//toku_brt_cursor_prev will call c_getf_prev_callback(..., context) (if query is successful) //toku_brt_cursor_prev will call c_getf_prev_callback(..., context) (if query is successful)
r = toku_brt_cursor_prev(dbc_struct_i(c)->c, c_getf_prev_callback, &context); r = toku_brt_cursor_prev(dbc_struct_i(c)->c, c_getf_prev_callback, &context);
...@@ -3623,6 +3622,7 @@ c_getf_prev_callback(ITEMLEN keylen, bytevec key, ITEMLEN vallen, bytevec val, v ...@@ -3623,6 +3622,7 @@ c_getf_prev_callback(ITEMLEN keylen, bytevec key, ITEMLEN vallen, bytevec val, v
int r; int r;
num_sequential_queries++; // accountability
DBT found_key; DBT found_key;
DBT found_val; DBT found_val;
toku_fill_dbt(&found_key, key, keylen); toku_fill_dbt(&found_key, key, keylen);
......
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