mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
[t:4529], remove some shared variables that have good alternatives at MySQL layer
git-svn-id: file:///svn/toku/tokudb@41239 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
a4239f4e0f
commit
607f3f58c4
3 changed files with 2 additions and 16 deletions
|
@ -5797,7 +5797,7 @@ try_again:
|
|||
{ // accounting (to detect and measure thrashing)
|
||||
uint retrycount = trycount - 1; // how many retries were needed?
|
||||
STATUS_VALUE(BRT_TOTAL_SEARCHES)++;
|
||||
STATUS_VALUE(BRT_TOTAL_RETRIES) += retrycount;
|
||||
if (retrycount) STATUS_VALUE(BRT_TOTAL_RETRIES) += retrycount;
|
||||
if (root_tries > 1) { // if root was read from disk more than once
|
||||
STATUS_VALUE(BRT_SEARCH_ROOT_RETRIES)++;
|
||||
if (root_tries > STATUS_VALUE(BRT_MAX_SEARCH_ROOT_TRIES))
|
||||
|
|
|
@ -28,9 +28,6 @@ static void
|
|||
ydb_c_layer_status_init (void) {
|
||||
// Note, this function initializes the keyname, type, and legend fields.
|
||||
// Value fields are initialized to zero by compiler.
|
||||
|
||||
STATUS_INIT(YDB_C_LAYER_NUM_POINT_QUERIES, UINT64, "dictionary point queries");
|
||||
STATUS_INIT(YDB_C_LAYER_NUM_SEQUENTIAL_QUERIES, UINT64, "dictionary sequential queries");
|
||||
ydb_c_layer_status.initialized = true;
|
||||
}
|
||||
#undef STATUS_INIT
|
||||
|
@ -196,7 +193,6 @@ static int
|
|||
toku_c_getf_first(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra) {
|
||||
HANDLE_PANICKED_DB(c->dbp);
|
||||
HANDLE_CURSOR_ILLEGAL_WORKING_PARENT_TXN(c);
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_POINT_QUERIES)++;
|
||||
int r = 0;
|
||||
QUERY_CONTEXT_S context; //Describes the context of this query.
|
||||
c_query_context_init(&context, c, flag, f, extra);
|
||||
|
@ -249,7 +245,6 @@ static int
|
|||
toku_c_getf_last(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra) {
|
||||
HANDLE_PANICKED_DB(c->dbp);
|
||||
HANDLE_CURSOR_ILLEGAL_WORKING_PARENT_TXN(c);
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_POINT_QUERIES)++;
|
||||
int r = 0;
|
||||
QUERY_CONTEXT_S context; //Describes the context of this query.
|
||||
c_query_context_init(&context, c, flag, f, extra);
|
||||
|
@ -347,7 +342,6 @@ c_getf_next_callback(ITEMLEN keylen, bytevec key, ITEMLEN vallen, bytevec val, v
|
|||
|
||||
//Call application-layer callback if found and locks were successfully obtained.
|
||||
if (r==0 && key!=NULL && !lock_only) {
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_SEQUENTIAL_QUERIES)++; // accountability
|
||||
DBT found_val = { .data = (void *) val, .size = vallen };
|
||||
context->r_user_callback = context->f(&found_key, &found_val, context->f_extra);
|
||||
r = context->r_user_callback;
|
||||
|
@ -407,7 +401,6 @@ c_getf_prev_callback(ITEMLEN keylen, bytevec key, ITEMLEN vallen, bytevec val, v
|
|||
|
||||
//Call application-layer callback if found and locks were successfully obtained.
|
||||
if (r==0 && key!=NULL && !lock_only) {
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_SEQUENTIAL_QUERIES)++; // accountability
|
||||
DBT found_val = { .data = (void *) val, .size = vallen };
|
||||
context->r_user_callback = context->f(&found_key, &found_val, context->f_extra);
|
||||
r = context->r_user_callback;
|
||||
|
@ -425,7 +418,6 @@ toku_c_getf_current(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, void *extra
|
|||
HANDLE_CURSOR_ILLEGAL_WORKING_PARENT_TXN(c);
|
||||
|
||||
QUERY_CONTEXT_S context; //Describes the context of this query.
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_SEQUENTIAL_QUERIES)++; // accountability
|
||||
c_query_context_init(&context, c, flag, f, extra);
|
||||
//toku_brt_cursor_current will call c_getf_current_callback(..., context) (if query is successful)
|
||||
int r = toku_brt_cursor_current(dbc_struct_i(c)->c, DB_CURRENT, c_getf_current_callback, &context);
|
||||
|
@ -461,7 +453,6 @@ toku_c_getf_current_binding(DBC *c, u_int32_t flag, YDB_CALLBACK_FUNCTION f, voi
|
|||
HANDLE_CURSOR_ILLEGAL_WORKING_PARENT_TXN(c);
|
||||
|
||||
QUERY_CONTEXT_S context; //Describes the context of this query.
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_SEQUENTIAL_QUERIES)++; // accountability
|
||||
c_query_context_init(&context, c, flag, f, extra);
|
||||
//toku_brt_cursor_current will call c_getf_current_callback(..., context) (if query is successful)
|
||||
int r = toku_brt_cursor_current(dbc_struct_i(c)->c, DB_CURRENT_BINDING, c_getf_current_callback, &context);
|
||||
|
@ -479,7 +470,6 @@ toku_c_getf_set(DBC *c, u_int32_t flag, DBT *key, YDB_CALLBACK_FUNCTION f, void
|
|||
|
||||
int r = 0;
|
||||
QUERY_CONTEXT_WITH_INPUT_S context; //Describes the context of this query.
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_POINT_QUERIES)++;
|
||||
query_context_with_input_init(&context, c, flag, key, NULL, f, extra);
|
||||
while (r == 0) {
|
||||
//toku_brt_cursor_set will call c_getf_set_callback(..., context) (if query is successful)
|
||||
|
@ -534,7 +524,6 @@ toku_c_getf_set_range(DBC *c, u_int32_t flag, DBT *key, YDB_CALLBACK_FUNCTION f,
|
|||
|
||||
int r = 0;
|
||||
QUERY_CONTEXT_WITH_INPUT_S context; //Describes the context of this query.
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_POINT_QUERIES)++;
|
||||
query_context_with_input_init(&context, c, flag, key, NULL, f, extra);
|
||||
while (r == 0) {
|
||||
//toku_brt_cursor_set_range will call c_getf_set_range_callback(..., context) (if query is successful)
|
||||
|
@ -592,7 +581,6 @@ toku_c_getf_set_range_reverse(DBC *c, u_int32_t flag, DBT *key, YDB_CALLBACK_FUN
|
|||
|
||||
int r = 0;
|
||||
QUERY_CONTEXT_WITH_INPUT_S context; //Describes the context of this query.
|
||||
//STATUS_VALUE(YDB_C_LAYER_NUM_POINT_QUERIES)++;
|
||||
query_context_with_input_init(&context, c, flag, key, NULL, f, extra);
|
||||
while (r == 0) {
|
||||
//toku_brt_cursor_set_range_reverse will call c_getf_set_range_reverse_callback(..., context) (if query is successful)
|
||||
|
|
|
@ -8,9 +8,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef enum {
|
||||
YDB_C_LAYER_NUM_POINT_QUERIES = 0,
|
||||
YDB_C_LAYER_NUM_SEQUENTIAL_QUERIES,
|
||||
YDB_C_LAYER_STATUS_NUM_ROWS /* number of rows in this status array */
|
||||
YDB_C_LAYER_STATUS_NUM_ROWS = 0 /* number of rows in this status array */
|
||||
} ydb_c_lock_layer_status_entry;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Add table
Reference in a new issue