Commit dc9fb5a2 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

Allow logger status with no logger.

git-svn-id: file:///svn/toku/tokudb@20495 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7f7b65a2
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
DB_BTREE=1,
......
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
DB_BTREE=1,
......
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
DB_BTREE=1,
......
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
DB_BTREE=1,
......
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
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_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 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");
print_dbtype();
......
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
DB_BTREE=1,
......
......@@ -143,6 +143,10 @@ typedef struct __toku_engine_status {
u_int32_t loader_max; /* max number of loaders extant simultaneously */
u_int64_t logsuppress; /* number of times logging is 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;
typedef enum {
DB_BTREE=1,
......
......@@ -1247,8 +1247,14 @@ toku_logger_call_remove_finalize_callback(TOKULOGGER logger, DICTIONARY_ID dict_
void
toku_logger_get_status(TOKULOGGER logger, LOGGER_STATUS s) {
if (logger) {
s->ilock_ctr = logger->input_lock_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;
}
}
......@@ -1663,6 +1663,13 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat) {
engstat->logsuppress = logsuppress;
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;
}
......@@ -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, "logsuppress %"PRIu64"\n", engstat.logsuppress);
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) {
char * errmsg = "BUFFER TOO SMALL\n";
int len = strlen(errmsg) + 1;
......
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