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

[t:3034] Update engine status for new functionality.

git-svn-id: file:///svn/toku/tokudb@26444 c7de825b-a66e-492c-adef-691d508d4ae1
parent 19c7e1af
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -479,7 +479,8 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__ ...@@ -479,7 +479,8 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t txn_commit; /* txn commit operations */ \n"); printf(" u_int64_t txn_commit; /* txn commit operations */ \n");
printf(" u_int64_t txn_abort; /* txn abort operations */ \n"); printf(" u_int64_t txn_abort; /* txn abort operations */ \n");
printf(" u_int64_t txn_close; /* txn completions (should equal commit+abort) */ \n"); printf(" u_int64_t txn_close; /* txn completions (should equal commit+abort) */ \n");
printf(" u_int64_t txn_oldest_live; /* oldest extant txn */ \n"); printf(" u_int64_t txn_oldest_live; /* oldest extant txn txnid */ \n");
printf(" char txn_oldest_live_begin; /* oldest extant txn start time */ \n");
printf(" u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ \n"); printf(" u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ \n");
printf(" u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ \n"); printf(" u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ \n");
printf(" u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ \n"); printf(" u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ \n");
...@@ -513,6 +514,10 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__ ...@@ -513,6 +514,10 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t range_write_locks; /* total range write locks taken */ \n"); printf(" u_int64_t range_write_locks; /* total range write locks taken */ \n");
printf(" u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ \n"); printf(" u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ \n");
printf(" u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ \n"); printf(" u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ \n");
printf(" u_int64_t directory_read_locks; /* total directory read locks taken */ \n");
printf(" u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */ \n");
printf(" u_int64_t directory_write_locks; /* total directory write locks taken */ \n");
printf(" u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */ \n");
printf(" u_int64_t inserts; /* ydb row insert operations */ \n"); printf(" u_int64_t inserts; /* ydb row insert operations */ \n");
printf(" u_int64_t inserts_fail; /* ydb row insert operations that failed */ \n"); printf(" u_int64_t inserts_fail; /* ydb row insert operations that failed */ \n");
printf(" u_int64_t deletes; /* ydb row delete operations */ \n"); printf(" u_int64_t deletes; /* ydb row delete operations */ \n");
...@@ -527,6 +532,10 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__ ...@@ -527,6 +532,10 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ \n"); printf(" u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ \n");
printf(" u_int64_t point_queries; /* ydb point queries */ \n"); printf(" u_int64_t point_queries; /* ydb point queries */ \n");
printf(" u_int64_t sequential_queries; /* ydb sequential queries */ \n"); printf(" u_int64_t sequential_queries; /* ydb sequential queries */ \n");
printf(" u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */ \n");
printf(" u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */ \n");
printf(" u_int64_t le_max_memsize; /* max memsize of any packed le */ \n");
printf(" u_int64_t le_expanded; /* number of times ule used expanded memory */ \n");
printf(" u_int64_t fsync_count; /* number of times fsync performed */ \n"); printf(" u_int64_t fsync_count; /* number of times fsync performed */ \n");
printf(" u_int64_t fsync_time; /* total time required to fsync */ \n"); printf(" u_int64_t fsync_time; /* total time required to fsync */ \n");
printf(" u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ \n"); printf(" u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ \n");
...@@ -539,7 +548,8 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__ ...@@ -539,7 +548,8 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__
printf(" u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ \n"); printf(" u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ \n");
printf(" u_int64_t loader_create; /* number of loaders created */ \n"); printf(" u_int64_t loader_create; /* number of loaders created */ \n");
printf(" u_int64_t loader_create_fail; /* number of failed loader creations */ \n"); printf(" u_int64_t loader_create_fail; /* number of failed loader creations */ \n");
printf(" u_int64_t loader_put; /* number of loader puts */ \n"); printf(" u_int64_t loader_put; /* number of loader puts (success) */ \n");
printf(" u_int64_t loader_put_fail; /* number of loader puts that failed */ \n");
printf(" u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ \n"); printf(" u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ \n");
printf(" u_int64_t loader_close_fail; /* number of loaders closed with error return */ \n"); printf(" u_int64_t loader_close_fail; /* number of loaders closed with error return */ \n");
printf(" u_int64_t loader_abort; /* number of loaders aborted */ \n"); printf(" u_int64_t loader_abort; /* number of loaders aborted */ \n");
......
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status { ...@@ -93,7 +93,8 @@ typedef struct __toku_engine_status {
u_int64_t txn_commit; /* txn commit operations */ u_int64_t txn_commit; /* txn commit operations */
u_int64_t txn_abort; /* txn abort operations */ u_int64_t txn_abort; /* txn abort operations */
u_int64_t txn_close; /* txn completions (should equal commit+abort) */ u_int64_t txn_close; /* txn completions (should equal commit+abort) */
u_int64_t txn_oldest_live; /* oldest extant txn */ u_int64_t txn_oldest_live; /* oldest extant txn txnid */
char txn_oldest_live_begin; /* oldest extant txn start time */
u_int64_t next_lsn; /* lsn that will be assigned to next log entry */ u_int64_t next_lsn; /* lsn that will be assigned to next log entry */
u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */ u_int64_t cachetable_lock_taken; /* how many times has cachetable lock been taken */
u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */ u_int64_t cachetable_lock_released;/* how many times has cachetable lock been released */
...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status { ...@@ -127,6 +128,10 @@ typedef struct __toku_engine_status {
u_int64_t range_write_locks; /* total range write locks taken */ u_int64_t range_write_locks; /* total range write locks taken */
u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */ u_int64_t range_write_locks_fail; /* total range write locks unable to be taken */
u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */ u_int64_t range_out_of_write_locks; /* total times range write locks exhausted */
u_int64_t directory_read_locks; /* total directory read locks taken */
u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
u_int64_t directory_write_locks; /* total directory write locks taken */
u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
u_int64_t inserts; /* ydb row insert operations */ u_int64_t inserts; /* ydb row insert operations */
u_int64_t inserts_fail; /* ydb row insert operations that failed */ u_int64_t inserts_fail; /* ydb row insert operations that failed */
u_int64_t deletes; /* ydb row delete operations */ u_int64_t deletes; /* ydb row delete operations */
...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status { ...@@ -141,6 +146,10 @@ typedef struct __toku_engine_status {
u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */ u_int64_t multi_updates_fail; /* ydb row update operations that failed, dictionary count */
u_int64_t point_queries; /* ydb point queries */ u_int64_t point_queries; /* ydb point queries */
u_int64_t sequential_queries; /* ydb sequential queries */ u_int64_t sequential_queries; /* ydb sequential queries */
u_int64_t le_max_committed_xr; /* max committed transaction records in any packed le */
u_int64_t le_max_provisional_xr; /* max provisional transaction records in any packed le */
u_int64_t le_max_memsize; /* max memsize of any packed le */
u_int64_t le_expanded; /* number of times ule used expanded memory */
u_int64_t fsync_count; /* number of times fsync performed */ u_int64_t fsync_count; /* number of times fsync performed */
u_int64_t fsync_time; /* total time required to fsync */ u_int64_t fsync_time; /* total time required to fsync */
u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */ u_int64_t logger_ilock_ctr; /* how many times has logger input lock been taken or released */
...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status { ...@@ -153,7 +162,8 @@ typedef struct __toku_engine_status {
u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */ u_int64_t enospc_state; /* state of ydb-level ENOSPC prevention (0 = green, 1 = yellow, 2 = red) */
u_int64_t loader_create; /* number of loaders created */ u_int64_t loader_create; /* number of loaders created */
u_int64_t loader_create_fail; /* number of failed loader creations */ u_int64_t loader_create_fail; /* number of failed loader creations */
u_int64_t loader_put; /* number of loader puts */ u_int64_t loader_put; /* number of loader puts (success) */
u_int64_t loader_put_fail; /* number of loader puts that failed */
u_int64_t loader_close; /* number of loaders closed (succeed or fail) */ u_int64_t loader_close; /* number of loaders closed (succeed or fail) */
u_int64_t loader_close_fail; /* number of loaders closed with error return */ u_int64_t loader_close_fail; /* number of loaders closed with error return */
u_int64_t loader_abort; /* number of loaders aborted */ u_int64_t loader_abort; /* number of loaders aborted */
......
...@@ -374,6 +374,17 @@ typedef struct brt_upgrade_status { ...@@ -374,6 +374,17 @@ typedef struct brt_upgrade_status {
void toku_brt_get_upgrade_status(BRT_UPGRADE_STATUS); void toku_brt_get_upgrade_status(BRT_UPGRADE_STATUS);
typedef struct le_status {
u_int64_t max_committed_xr;
u_int64_t max_provisional_xr;
u_int64_t expanded;
u_int64_t max_memsize;
} LE_STATUS_S, *LE_STATUS;
void toku_le_get_status(LE_STATUS);
C_END C_END
#endif #endif
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#define ULE_DEBUG 0 #define ULE_DEBUG 0
static LE_STATUS_S status;
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// Accessor functions used by outside world (e.g. indexer) // Accessor functions used by outside world (e.g. indexer)
...@@ -51,8 +53,10 @@ void toku_ule_free(ULEHANDLE ule_p) { ...@@ -51,8 +53,10 @@ void toku_ule_free(ULEHANDLE ule_p) {
toku_free(ule_p); toku_free(ule_p);
} }
void
toku_le_get_status(LE_STATUS s) {
*s = status;
}
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
...@@ -589,6 +593,18 @@ uxr_unpack_data(UXR uxr, uint8_t *p) { ...@@ -589,6 +593,18 @@ uxr_unpack_data(UXR uxr, uint8_t *p) {
return 0; return 0;
} }
// executed too often to be worth making threadsafe
static inline void
update_le_status(ULE ule, size_t memsize, LE_STATUS s) {
if (ule->num_cuxrs > s->max_committed_xr)
s->max_committed_xr = ule->num_cuxrs;
if (ule->num_puxrs > s->max_provisional_xr)
s->max_provisional_xr = ule->num_puxrs;
if (ule->num_cuxrs > MAX_TRANSACTION_RECORDS)
s->expanded++;
if (memsize > s->max_memsize)
s->max_memsize = memsize;
}
// Purpose is to return a newly allocated leaf entry in packed format, or // Purpose is to return a newly allocated leaf entry in packed format, or
// return null if leaf entry should be destroyed (if no transaction records // return null if leaf entry should be destroyed (if no transaction records
...@@ -607,6 +623,7 @@ le_pack(ULE ule, // data to be packed into new leafen ...@@ -607,6 +623,7 @@ le_pack(ULE ule, // data to be packed into new leafen
invariant(ule->num_cuxrs > 0); invariant(ule->num_cuxrs > 0);
invariant(ule->uxrs[0].xid == TXNID_NONE); invariant(ule->uxrs[0].xid == TXNID_NONE);
int rval; int rval;
size_t memsize = 0;
{ {
// The unpacked leafentry may contain no inserts anywhere on its stack. // The unpacked leafentry may contain no inserts anywhere on its stack.
// If so, then there IS no leafentry to pack, we should return NULL // If so, then there IS no leafentry to pack, we should return NULL
...@@ -624,7 +641,7 @@ le_pack(ULE ule, // data to be packed into new leafen ...@@ -624,7 +641,7 @@ le_pack(ULE ule, // data to be packed into new leafen
goto cleanup; goto cleanup;
} }
found_insert:; found_insert:;
size_t memsize = le_memsize_from_ule(ule); memsize = le_memsize_from_ule(ule);
LEAFENTRY new_leafentry = le_malloc(omt, mp, memsize, maybe_free); LEAFENTRY new_leafentry = le_malloc(omt, mp, memsize, maybe_free);
if (new_leafentry==NULL) { if (new_leafentry==NULL) {
rval = ENOMEM; rval = ENOMEM;
...@@ -754,6 +771,7 @@ found_insert:; ...@@ -754,6 +771,7 @@ found_insert:;
*new_leafentry_disksize = memsize; *new_leafentry_disksize = memsize;
rval = 0; rval = 0;
cleanup: cleanup:
update_le_status(ule, memsize, &status);
return rval; return rval;
} }
......
...@@ -280,8 +280,6 @@ int toku_loader_set_error_callback(DB_LOADER *loader, ...@@ -280,8 +280,6 @@ int toku_loader_set_error_callback(DB_LOADER *loader,
int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val) int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val)
{ {
status.put++; // not worth the extra cycles to keep threadsafe
int r = 0; int r = 0;
int i = 0; int i = 0;
// err_i is unused now( always 0). How would we know which dictionary // err_i is unused now( always 0). How would we know which dictionary
...@@ -290,7 +288,8 @@ int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val) ...@@ -290,7 +288,8 @@ int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val)
// skip put if error already found // skip put if error already found
if ( loader->i->err_errno != 0 ) { if ( loader->i->err_errno != 0 ) {
return -1; r = -1;
goto cleanup;
} }
if ( loader->i->loader_flags & LOADER_USE_PUTS ) { if ( loader->i->loader_flags & LOADER_USE_PUTS ) {
...@@ -326,9 +325,14 @@ int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val) ...@@ -326,9 +325,14 @@ int toku_loader_put(DB_LOADER *loader, DBT *key, DBT *val)
// deliberately return content free value // deliberately return content free value
// - must call error_callback to get error info // - must call error_callback to get error info
return -1; r = -1;
} }
return 0; cleanup:
if (r==0)
status.put++; // executed too often to be worth making threadsafe
else
status.put_fail++;
return r;
} }
int toku_loader_close(DB_LOADER *loader) int toku_loader_close(DB_LOADER *loader)
......
...@@ -111,7 +111,8 @@ int toku_loader_cleanup_temp_files(DB_ENV *env); ...@@ -111,7 +111,8 @@ int toku_loader_cleanup_temp_files(DB_ENV *env);
typedef struct loader_status { typedef struct loader_status {
uint64_t create; // number of loaders succefully created uint64_t create; // number of loaders succefully created
uint64_t create_fail; // number of calls to toku_loader_create_loader() that failed uint64_t create_fail; // number of calls to toku_loader_create_loader() that failed
uint64_t put; // number of calls to toku_loader_put() uint64_t put; // number of calls to toku_loader_put() that succeeded
uint64_t put_fail; // number of calls to toku_loader_put() that failed
uint64_t close; // number of calls to toku_loader_close() uint64_t close; // number of calls to toku_loader_close()
uint64_t close_fail; // number of calls to toku_loader_close() that failed uint64_t close_fail; // number of calls to toku_loader_close() that failed
uint64_t abort; // number of calls to toku_loader_abort() uint64_t abort; // number of calls to toku_loader_abort()
......
...@@ -62,6 +62,12 @@ static u_int64_t num_multi_updates; ...@@ -62,6 +62,12 @@ static u_int64_t num_multi_updates;
static u_int64_t num_multi_updates_fail; static u_int64_t num_multi_updates_fail;
static u_int64_t num_point_queries; static u_int64_t num_point_queries;
static u_int64_t num_sequential_queries; static u_int64_t num_sequential_queries;
static u_int64_t directory_read_locks; /* total directory read locks taken */
static u_int64_t directory_read_locks_fail; /* total directory read locks unable to be taken */
static u_int64_t directory_write_locks; /* total directory write locks taken */
static u_int64_t directory_write_locks_fail; /* total directory write locks unable to be taken */
static u_int64_t logsuppress; // number of times logs are suppressed for empty table (2440) static u_int64_t logsuppress; // number of times logs are suppressed for empty table (2440)
static u_int64_t logsuppressfail; // number of times unable to suppress logs for empty table (2440) static u_int64_t logsuppressfail; // number of times unable to suppress logs for empty table (2440)
static time_t startuptime; // timestamp of system startup static time_t startuptime; // timestamp of system startup
...@@ -85,6 +91,10 @@ init_status_info(void) { ...@@ -85,6 +91,10 @@ init_status_info(void) {
num_multi_updates_fail = 0; num_multi_updates_fail = 0;
num_point_queries = 0; num_point_queries = 0;
num_sequential_queries = 0; num_sequential_queries = 0;
directory_read_locks = 0;
directory_read_locks_fail = 0;
directory_write_locks = 0;
directory_write_locks_fail = 0;
logsuppress = 0; logsuppress = 0;
logsuppressfail = 0; logsuppressfail = 0;
startuptime = time(NULL); startuptime = time(NULL);
...@@ -1754,7 +1764,14 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st ...@@ -1754,7 +1764,14 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->total_time_ydb_lock_held = schedstat.total_time_ydb_lock_held;/* total time client threads held the ydb lock */ engstat->total_time_ydb_lock_held = schedstat.total_time_ydb_lock_held;/* total time client threads held the ydb lock */
engstat->max_time_ydb_lock_held = schedstat.max_time_ydb_lock_held; /* max time client threads held the ydb lock */ engstat->max_time_ydb_lock_held = schedstat.max_time_ydb_lock_held; /* max time client threads held the ydb lock */
} }
{
LE_STATUS_S lestat; // Rice's vampire
toku_le_get_status(&lestat);
engstat->le_max_committed_xr = lestat.max_committed_xr;
engstat->le_max_provisional_xr = lestat.max_provisional_xr;
engstat->le_expanded = lestat.expanded;
engstat->le_max_memsize = lestat.max_memsize;
}
engstat->checkpoint_period = toku_get_checkpoint_period_unlocked(env->i->cachetable); // do not take any locks (not even minicron lock) engstat->checkpoint_period = toku_get_checkpoint_period_unlocked(env->i->cachetable); // do not take any locks (not even minicron lock)
{ {
CHECKPOINT_STATUS_S cpstat; CHECKPOINT_STATUS_S cpstat;
...@@ -1846,6 +1863,10 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st ...@@ -1846,6 +1863,10 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->multi_updates_fail = num_multi_updates_fail; engstat->multi_updates_fail = num_multi_updates_fail;
engstat->point_queries = num_point_queries; engstat->point_queries = num_point_queries;
engstat->sequential_queries = num_sequential_queries; engstat->sequential_queries = num_sequential_queries;
engstat->directory_read_locks = directory_read_locks;
engstat->directory_read_locks_fail = directory_read_locks_fail;
engstat->directory_write_locks = directory_write_locks;
engstat->directory_write_locks_fail = directory_write_locks_fail;
} }
{ {
u_int64_t fsync_count, fsync_time; u_int64_t fsync_count, fsync_time;
...@@ -1881,6 +1902,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st ...@@ -1881,6 +1902,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
engstat->loader_create = loader_stat.create; engstat->loader_create = loader_stat.create;
engstat->loader_create_fail = loader_stat.create_fail; engstat->loader_create_fail = loader_stat.create_fail;
engstat->loader_put = loader_stat.put; engstat->loader_put = loader_stat.put;
engstat->loader_put_fail = loader_stat.put_fail;
engstat->loader_close = loader_stat.close; engstat->loader_close = loader_stat.close;
engstat->loader_close_fail = loader_stat.close_fail; engstat->loader_close_fail = loader_stat.close_fail;
engstat->loader_abort = loader_stat.abort; engstat->loader_abort = loader_stat.abort;
...@@ -1974,6 +1996,10 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) { ...@@ -1974,6 +1996,10 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "time_ydb_lock_held_unavailable %"PRIu64"\n", engstat.time_ydb_lock_held_unavailable); n += snprintf(buff + n, bufsiz - n, "time_ydb_lock_held_unavailable %"PRIu64"\n", engstat.time_ydb_lock_held_unavailable);
n += snprintf(buff + n, bufsiz - n, "max_time_ydb_lock_held %"PRIu64"\n", engstat.max_time_ydb_lock_held); n += snprintf(buff + n, bufsiz - n, "max_time_ydb_lock_held %"PRIu64"\n", engstat.max_time_ydb_lock_held);
n += snprintf(buff + n, bufsiz - n, "total_time_ydb_lock_held %"PRIu64"\n", engstat.total_time_ydb_lock_held); n += snprintf(buff + n, bufsiz - n, "total_time_ydb_lock_held %"PRIu64"\n", engstat.total_time_ydb_lock_held);
n += snprintf(buff + n, bufsiz - n, "le_max_committed_xr %"PRIu64"\n", engstat.le_max_committed_xr);
n += snprintf(buff + n, bufsiz - n, "le_max_provisional_xr %"PRIu64"\n", engstat.le_max_provisional_xr);
n += snprintf(buff + n, bufsiz - n, "le_expanded %"PRIu64"\n", engstat.le_expanded);
n += snprintf(buff + n, bufsiz - n, "le_max_memsize %"PRIu64"\n", engstat.le_max_memsize);
n += snprintf(buff + n, bufsiz - n, "checkpoint_period %d \n", engstat.checkpoint_period); n += snprintf(buff + n, bufsiz - n, "checkpoint_period %d \n", engstat.checkpoint_period);
n += snprintf(buff + n, bufsiz - n, "checkpoint_footprint %d \n", engstat.checkpoint_footprint); n += snprintf(buff + n, bufsiz - n, "checkpoint_footprint %d \n", engstat.checkpoint_footprint);
n += snprintf(buff + n, bufsiz - n, "checkpoint_time_begin %s \n", engstat.checkpoint_time_begin); n += snprintf(buff + n, bufsiz - n, "checkpoint_time_begin %s \n", engstat.checkpoint_time_begin);
...@@ -2033,6 +2059,10 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) { ...@@ -2033,6 +2059,10 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "multi_updates_fail %"PRIu64"\n", engstat.multi_updates_fail); n += snprintf(buff + n, bufsiz - n, "multi_updates_fail %"PRIu64"\n", engstat.multi_updates_fail);
n += snprintf(buff + n, bufsiz - n, "point_queries %"PRIu64"\n", engstat.point_queries); n += snprintf(buff + n, bufsiz - n, "point_queries %"PRIu64"\n", engstat.point_queries);
n += snprintf(buff + n, bufsiz - n, "sequential_queries %"PRIu64"\n", engstat.sequential_queries); n += snprintf(buff + n, bufsiz - n, "sequential_queries %"PRIu64"\n", engstat.sequential_queries);
n += snprintf(buff + n, bufsiz - n, "directory_read_locks %"PRIu64"\n", engstat.directory_read_locks);
n += snprintf(buff + n, bufsiz - n, "directory_read_locks_fail %"PRIu64"\n", engstat.directory_read_locks_fail);
n += snprintf(buff + n, bufsiz - n, "directory_write_locks %"PRIu64"\n", engstat.directory_write_locks);
n += snprintf(buff + n, bufsiz - n, "directory_write_locks_fail %"PRIu64"\n", engstat.directory_write_locks_fail);
n += snprintf(buff + n, bufsiz - n, "fsync_count %"PRIu64"\n", engstat.fsync_count); n += snprintf(buff + n, bufsiz - n, "fsync_count %"PRIu64"\n", engstat.fsync_count);
n += snprintf(buff + n, bufsiz - n, "fsync_time %"PRIu64"\n", engstat.fsync_time); n += snprintf(buff + n, bufsiz - n, "fsync_time %"PRIu64"\n", engstat.fsync_time);
n += snprintf(buff + n, bufsiz - n, "logger ilock count %"PRIu64"\n", engstat.logger_ilock_ctr); n += snprintf(buff + n, bufsiz - n, "logger ilock count %"PRIu64"\n", engstat.logger_ilock_ctr);
...@@ -2048,6 +2078,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) { ...@@ -2048,6 +2078,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "loader_create %"PRIu64"\n", engstat.loader_create); n += snprintf(buff + n, bufsiz - n, "loader_create %"PRIu64"\n", engstat.loader_create);
n += snprintf(buff + n, bufsiz - n, "loader_create_fail %"PRIu64"\n", engstat.loader_create_fail); n += snprintf(buff + n, bufsiz - n, "loader_create_fail %"PRIu64"\n", engstat.loader_create_fail);
n += snprintf(buff + n, bufsiz - n, "loader_put %"PRIu64"\n", engstat.loader_put); n += snprintf(buff + n, bufsiz - n, "loader_put %"PRIu64"\n", engstat.loader_put);
n += snprintf(buff + n, bufsiz - n, "loader_put_fail %"PRIu64"\n", engstat.loader_put_fail);
n += snprintf(buff + n, bufsiz - n, "loader_close %"PRIu64"\n", engstat.loader_close); n += snprintf(buff + n, bufsiz - n, "loader_close %"PRIu64"\n", engstat.loader_close);
n += snprintf(buff + n, bufsiz - n, "loader_close_fail %"PRIu64"\n", engstat.loader_close_fail); n += snprintf(buff + n, bufsiz - n, "loader_close_fail %"PRIu64"\n", engstat.loader_close_fail);
n += snprintf(buff + n, bufsiz - n, "loader_abort %"PRIu64"\n", engstat.loader_abort); n += snprintf(buff + n, bufsiz - n, "loader_abort %"PRIu64"\n", engstat.loader_abort);
...@@ -3163,6 +3194,10 @@ toku_grab_read_lock_on_directory (DB* db, DB_TXN * txn) { ...@@ -3163,6 +3194,10 @@ toku_grab_read_lock_on_directory (DB* db, DB_TXN * txn) {
&key_in_directory &key_in_directory
); );
int r = grab_range_lock(&request); int r = grab_range_lock(&request);
if (r == 0)
directory_read_locks++;
else
directory_read_locks_fail++;
return r; return r;
} }
...@@ -5257,6 +5292,10 @@ static int toku_db_pre_acquire_fileops_lock(DB *db, DB_TXN *txn) { ...@@ -5257,6 +5292,10 @@ static int toku_db_pre_acquire_fileops_lock(DB *db, DB_TXN *txn) {
&key_in_directory &key_in_directory
); );
int r = grab_range_lock(&request); int r = grab_range_lock(&request);
if (r == 0)
directory_write_locks++;
else
directory_write_locks_fail++;
return r; return r;
} }
......
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