Commit 95cac476 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

close[t:3867] partial eviction data from 3867 gathered and show in show

engine status + get_env_status_text, merging to main


git-svn-id: file:///svn/toku/tokudb@36859 c7de825b-a66e-492c-adef-691d508d4ae1
parent ca1d9f06
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -552,6 +552,8 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t partial_fetch_hit; /* node partition is present */ \n");
printf(" u_int64_t partial_fetch_miss; /* node is present but partition is absent */ \n");
printf(" u_int64_t partial_fetch_compressed; /* node partition is present but compressed */ \n");
printf(" u_int64_t partial_evictions_internal; /* number of internal node partial evictions */ \n");
printf(" u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */ \n");
printf(" u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */ \n");
printf(" u_int64_t max_workdone; /* max workdone value of any buffer */ \n");
printf(" u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */ \n");
......
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -158,6 +158,8 @@ typedef struct __toku_engine_status {
u_int64_t partial_fetch_hit; /* node partition is present */
u_int64_t partial_fetch_miss; /* node is present but partition is absent */
u_int64_t partial_fetch_compressed; /* node partition is present but compressed */
u_int64_t partial_evictions_internal; /* number of internal node partial evictions */
u_int64_t partial_evictions_leaf; /* number of leaf node partial evictions */
u_int64_t msn_discards; /* how many messages were ignored by leaf because of msn */
u_int64_t max_workdone; /* max workdone value of any buffer */
u_int64_t dsn_gap; /* dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read) */
......
......@@ -738,6 +738,8 @@ typedef struct brt_status {
u_int64_t partial_fetch_hit; // node partition is present
u_int64_t partial_fetch_miss; // node is present but partition is absent
u_int64_t partial_fetch_compressed; // node partition is present but compressed
u_int64_t partial_evictions_internal; // number of internal node partial evictions
u_int64_t partial_evictions_leaf; // number of leaf node partial evictions
u_int64_t msn_discards; // how many messages were ignored by leaf because of msn
u_int64_t max_workdone; // max workdone value of any buffer
u_int64_t dsn_gap; // dsn has detected a gap in continuity of root-to-leaf path (internal node was evicted and re-read)
......
......@@ -811,6 +811,7 @@ int toku_brtnode_pe_callback (void *brtnode_pv, PAIR_ATTR UU(old_attr), PAIR_ATT
for (int i = 0; i < node->n_children; i++) {
if (BP_STATE(node,i) == PT_AVAIL) {
if (BP_SHOULD_EVICT(node,i)) {
brt_status.partial_evictions_internal++;
cilk_spawn compress_internal_node_partition(node, i);
}
else {
......@@ -832,6 +833,7 @@ int toku_brtnode_pe_callback (void *brtnode_pv, PAIR_ATTR UU(old_attr), PAIR_ATT
for (int i = 0; i < node->n_children; i++) {
// Get rid of compressed stuff no matter what.
if (BP_STATE(node,i) == PT_COMPRESSED) {
brt_status.partial_evictions_leaf++;
SUB_BLOCK sb = BSB(node, i);
toku_free(sb->compressed_ptr);
toku_free(sb);
......@@ -840,10 +842,11 @@ int toku_brtnode_pe_callback (void *brtnode_pv, PAIR_ATTR UU(old_attr), PAIR_ATT
}
else if (BP_STATE(node,i) == PT_AVAIL) {
if (BP_SHOULD_EVICT(node,i)) {
brt_status.partial_evictions_leaf++;
// free the basement node
BASEMENTNODE bn = BLB(node, i);
struct mempool * mp = &bn->buffer_mempool;
toku_mempool_destroy(mp);
struct mempool * mp = &bn->buffer_mempool;
toku_mempool_destroy(mp);
destroy_basement_node(bn);
set_BNULL(node,i);
BP_STATE(node,i) = PT_ON_DISK;
......
......@@ -2036,6 +2036,8 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->partial_fetch_hit = brt_stat.partial_fetch_hit;
engstat->partial_fetch_miss = brt_stat.partial_fetch_miss;
engstat->partial_fetch_compressed = brt_stat.partial_fetch_compressed;
engstat->partial_evictions_internal = brt_stat.partial_evictions_internal;
engstat->partial_evictions_leaf = brt_stat.partial_evictions_leaf;
engstat->msn_discards = brt_stat.msn_discards;
engstat->max_workdone = brt_stat.max_workdone;
engstat->dsn_gap = brt_stat.dsn_gap;
......@@ -2163,23 +2165,22 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
char panicstring[stringsize];
int n = 0; // number of characters printed so far
n = snprintf(buff, bufsiz - n, "BUILD_ID = %d\n", BUILD_ID);
int r = env_get_engine_status(env, &engstat, panicstring, stringsize);
if (strlen(panicstring)) {
invariant(strlen(panicstring) <= stringsize);
n += snprintf(buff + n, bufsiz - n, "Env panic: %s\n", panicstring);
invariant(strlen(panicstring) <= stringsize);
n += snprintf(buff + n, bufsiz - n, "Env panic: %s\n", panicstring);
}
if (r) {
n += snprintf(buff + n, bufsiz - n, "Engine status not available: ");
n += snprintf(buff + n, bufsiz - n, "Engine status not available: ");
if (!env) {
n += snprintf(buff + n, bufsiz - n, "no environment\n");
n += snprintf(buff + n, bufsiz - n, "no environment\n");
}
else if (!(env->i)) {
n += snprintf(buff + n, bufsiz - n, "environment internal struct is null\n");
n += snprintf(buff + n, bufsiz - n, "environment internal struct is null\n");
}
else if (!env_opened(env)) {
n += snprintf(buff + n, bufsiz - n, "environment is not open\n");
......@@ -2266,6 +2267,8 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "partial_fetch_hit %"PRIu64"\n", engstat.partial_fetch_hit);
n += snprintf(buff + n, bufsiz - n, "partial_fetch_miss %"PRIu64"\n", engstat.partial_fetch_miss);
n += snprintf(buff + n, bufsiz - n, "partial_fetch_compressed %"PRIu64"\n", engstat.partial_fetch_compressed);
n += snprintf(buff + n, bufsiz - n, "partial_evictions_internal %"PRIu64"\n", engstat.partial_evictions_internal);
n += snprintf(buff + n, bufsiz - n, "partial_evictions_leaf %"PRIu64"\n", engstat.partial_evictions_leaf);
n += snprintf(buff + n, bufsiz - n, "msn_discards %"PRIu64"\n", engstat.msn_discards);
n += snprintf(buff + n, bufsiz - n, "max_workdone %"PRIu64"\n", engstat.max_workdone);
n += snprintf(buff + n, bufsiz - n, "dsn_gap %"PRIu64"\n", engstat.dsn_gap);
......
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