mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Allow logger status with no logger.
git-svn-id: file:///svn/toku/tokudb@20495 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
418b60fbd7
commit
39670ab94b
10 changed files with 53 additions and 4 deletions
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -506,6 +506,10 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
|
||||||
printf(" u_int32_t loader_max; /* max number of loaders extant simultaneously */ \n");
|
printf(" u_int32_t loader_max; /* max number of loaders extant simultaneously */ \n");
|
||||||
printf(" u_int64_t logsuppress; /* number of times logging is suppressed */ \n");
|
printf(" u_int64_t logsuppress; /* number of times logging is suppressed */ \n");
|
||||||
printf(" u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */ \n");
|
printf(" u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */ \n");
|
||||||
|
printf(" u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */ \n");
|
||||||
|
printf(" u_int64_t upgrade_header; /* how many brt headers were upgraded? */ \n");
|
||||||
|
printf(" u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */ \n");
|
||||||
|
printf(" u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */ \n");
|
||||||
printf("} ENGINE_STATUS;\n");
|
printf("} ENGINE_STATUS;\n");
|
||||||
|
|
||||||
print_dbtype();
|
print_dbtype();
|
||||||
|
|
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
|
||||||
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
u_int32_t loader_max; /* max number of loaders extant simultaneously */
|
||||||
u_int64_t logsuppress; /* number of times logging is suppressed */
|
u_int64_t logsuppress; /* number of times logging is suppressed */
|
||||||
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
u_int64_t logsuppressfail; /* number of times logging cannot be suppressed */
|
||||||
|
u_int64_t upgrade_env_status; /* Was an environment upgrade done? What was done? */
|
||||||
|
u_int64_t upgrade_header; /* how many brt headers were upgraded? */
|
||||||
|
u_int64_t upgrade_nonleaf; /* how many brt nonleaf nodes were upgraded? */
|
||||||
|
u_int64_t upgrade_leaf; /* how many brt leaf nodes were upgraded? */
|
||||||
} ENGINE_STATUS;
|
} ENGINE_STATUS;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DB_BTREE=1,
|
DB_BTREE=1,
|
||||||
|
|
|
@ -1247,8 +1247,14 @@ toku_logger_call_remove_finalize_callback(TOKULOGGER logger, DICTIONARY_ID dict_
|
||||||
|
|
||||||
void
|
void
|
||||||
toku_logger_get_status(TOKULOGGER logger, LOGGER_STATUS s) {
|
toku_logger_get_status(TOKULOGGER logger, LOGGER_STATUS s) {
|
||||||
s->ilock_ctr = logger->input_lock_ctr;
|
if (logger) {
|
||||||
s->olock_ctr = logger->output_condition_lock_ctr;
|
s->ilock_ctr = logger->input_lock_ctr;
|
||||||
s->swap_ctr = logger->swap_ctr;
|
s->olock_ctr = logger->output_condition_lock_ctr;
|
||||||
|
s->swap_ctr = logger->swap_ctr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s->ilock_ctr = 0;
|
||||||
|
s->olock_ctr = 0;
|
||||||
|
s->swap_ctr = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/ydb.c
11
src/ydb.c
|
@ -1663,6 +1663,13 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat) {
|
||||||
engstat->logsuppress = logsuppress;
|
engstat->logsuppress = logsuppress;
|
||||||
engstat->logsuppressfail = logsuppressfail;
|
engstat->logsuppressfail = logsuppressfail;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
// dummy values until upgrade logic is complete and counters are available
|
||||||
|
engstat->upgrade_env_status = 1;
|
||||||
|
engstat->upgrade_header = 2;
|
||||||
|
engstat->upgrade_nonleaf = 3;
|
||||||
|
engstat->upgrade_leaf = 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -1760,6 +1767,10 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
|
||||||
n += snprintf(buff + n, bufsiz - n, "loader_max %"PRIu32"\n", engstat.loader_max);
|
n += snprintf(buff + n, bufsiz - n, "loader_max %"PRIu32"\n", engstat.loader_max);
|
||||||
n += snprintf(buff + n, bufsiz - n, "logsuppress %"PRIu64"\n", engstat.logsuppress);
|
n += snprintf(buff + n, bufsiz - n, "logsuppress %"PRIu64"\n", engstat.logsuppress);
|
||||||
n += snprintf(buff + n, bufsiz - n, "logsuppressfail %"PRIu64"\n", engstat.logsuppressfail);
|
n += snprintf(buff + n, bufsiz - n, "logsuppressfail %"PRIu64"\n", engstat.logsuppressfail);
|
||||||
|
n += snprintf(buff + n, bufsiz - n, "upgrade_env_status %"PRIu64"\n", engstat.upgrade_env_status);
|
||||||
|
n += snprintf(buff + n, bufsiz - n, "upgrade_header %"PRIu64"\n", engstat.upgrade_header);
|
||||||
|
n += snprintf(buff + n, bufsiz - n, "upgrade_nonleaf %"PRIu64"\n", engstat.upgrade_nonleaf);
|
||||||
|
n += snprintf(buff + n, bufsiz - n, "upgrade_leaf %"PRIu64"\n", engstat.upgrade_leaf);
|
||||||
if (n > bufsiz) {
|
if (n > bufsiz) {
|
||||||
char * errmsg = "BUFFER TOO SMALL\n";
|
char * errmsg = "BUFFER TOO SMALL\n";
|
||||||
int len = strlen(errmsg) + 1;
|
int len = strlen(errmsg) + 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue