Commit 277b6230 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3374] #Closes #3374 Add status counter for setting descriptor.

git-svn-id: file:///svn/toku/tokudb@29408 c7de825b-a66e-492c-adef-691d508d4ae1
parent b98b8426
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -282,7 +283,6 @@ typedef enum { ...@@ -282,7 +283,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -284,7 +285,6 @@ typedef enum { ...@@ -284,7 +285,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -284,7 +285,6 @@ typedef enum { ...@@ -284,7 +285,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -284,7 +285,6 @@ typedef enum { ...@@ -284,7 +285,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -285,7 +286,6 @@ typedef enum { ...@@ -285,7 +286,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -535,6 +535,7 @@ int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__ ...@@ -535,6 +535,7 @@ 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 le_updates; /* leafentry update operations */ \n"); printf(" u_int64_t le_updates; /* leafentry update operations */ \n");
printf(" u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ \n"); printf(" u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ \n");
printf(" u_int64_t descriptor_set; /* descriptor set operations */ \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_committed_xr; /* max committed transaction records in any packed le */ \n");
......
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -285,7 +286,6 @@ typedef enum { ...@@ -285,7 +286,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -142,6 +142,7 @@ typedef struct __toku_engine_status { ...@@ -142,6 +142,7 @@ 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 le_updates; /* leafentry update operations */ u_int64_t le_updates; /* leafentry update operations */
u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */ u_int64_t le_updates_broadcast; /* leafentry update broadcast operations */
u_int64_t descriptor_set; /* descriptor set operations */
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_committed_xr; /* max committed transaction records in any packed le */
...@@ -285,7 +286,6 @@ typedef enum { ...@@ -285,7 +286,6 @@ typedef enum {
#define TOKUDB_UPGRADE_FAILURE -100011 #define TOKUDB_UPGRADE_FAILURE -100011
#define TOKUDB_TRY_AGAIN -100012 #define TOKUDB_TRY_AGAIN -100012
#define TOKUDB_NEEDS_REPAIR -100013 #define TOKUDB_NEEDS_REPAIR -100013
#define TOKUDB_FINGERPRINT_ERROR -100014
/* LOADER flags */ /* LOADER flags */
#define LOADER_USE_PUTS 1 #define LOADER_USE_PUTS 1
typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val); typedef int (*generate_row_for_put_func)(DB *dest_db, DB *src_db, DBT *dest_key, DBT *dest_val, const DBT *src_key, const DBT *src_val);
......
...@@ -386,6 +386,7 @@ void toku_le_get_status(LE_STATUS); ...@@ -386,6 +386,7 @@ void toku_le_get_status(LE_STATUS);
typedef struct update_status { typedef struct update_status {
u_int64_t updates; u_int64_t updates;
u_int64_t updates_broadcast; u_int64_t updates_broadcast;
u_int64_t descriptor_set;
} UPDATE_STATUS_S, *UPDATE_STATUS; } UPDATE_STATUS_S, *UPDATE_STATUS;
void toku_update_get_status(UPDATE_STATUS); void toku_update_get_status(UPDATE_STATUS);
......
...@@ -3307,6 +3307,8 @@ toku_brt_change_descriptor( ...@@ -3307,6 +3307,8 @@ toku_brt_change_descriptor(
new_d.dbt = *new_descriptor; new_d.dbt = *new_descriptor;
fd = toku_cachefile_get_and_pin_fd (t->cf); fd = toku_cachefile_get_and_pin_fd (t->cf);
r = toku_update_descriptor(t->h, &new_d, fd); r = toku_update_descriptor(t->h, &new_d, fd);
if (r == 0) // very infrequent operation, worth precise threadsafe count
(void) toku_sync_fetch_and_increment_uint64(&update_status.descriptor_set);
toku_cachefile_unpin_fd(t->cf); toku_cachefile_unpin_fd(t->cf);
if (r!=0) goto cleanup; if (r!=0) goto cleanup;
......
...@@ -144,7 +144,6 @@ BDB_DONTRUN_TESTS = \ ...@@ -144,7 +144,6 @@ BDB_DONTRUN_TESTS = \
powerfail \ powerfail \
preload-db \ preload-db \
preload-db-nested \ preload-db-nested \
preload-3.1-db \
progress \ progress \
put-multiple \ put-multiple \
recover-2483 \ recover-2483 \
......
...@@ -1929,6 +1929,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st ...@@ -1929,6 +1929,7 @@ env_get_engine_status(DB_ENV * env, ENGINE_STATUS * engstat, char * env_panic_st
toku_update_get_status(&update_stat); toku_update_get_status(&update_stat);
engstat->le_updates = update_stat.updates; engstat->le_updates = update_stat.updates;
engstat->le_updates_broadcast = update_stat.updates_broadcast; engstat->le_updates_broadcast = update_stat.updates_broadcast;
engstat->descriptor_set = update_stat.descriptor_set;
} }
{ {
u_int64_t fsync_count, fsync_time; u_int64_t fsync_count, fsync_time;
...@@ -2115,6 +2116,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) { ...@@ -2115,6 +2116,7 @@ env_get_engine_status_text(DB_ENV * env, char * buff, int bufsiz) {
n += snprintf(buff + n, bufsiz - n, "updates_broadcast_fail %"PRIu64"\n", engstat.updates_broadcast_fail); n += snprintf(buff + n, bufsiz - n, "updates_broadcast_fail %"PRIu64"\n", engstat.updates_broadcast_fail);
n += snprintf(buff + n, bufsiz - n, "le_updates %"PRIu64"\n", engstat.le_updates); n += snprintf(buff + n, bufsiz - n, "le_updates %"PRIu64"\n", engstat.le_updates);
n += snprintf(buff + n, bufsiz - n, "le_updates_broadcast %"PRIu64"\n", engstat.le_updates_broadcast); n += snprintf(buff + n, bufsiz - n, "le_updates_broadcast %"PRIu64"\n", engstat.le_updates_broadcast);
n += snprintf(buff + n, bufsiz - n, "descriptor_set %"PRIu64"\n", engstat.descriptor_set);
n += snprintf(buff + n, bufsiz - n, "multi_inserts %"PRIu64"\n", engstat.multi_inserts); n += snprintf(buff + n, bufsiz - n, "multi_inserts %"PRIu64"\n", engstat.multi_inserts);
n += snprintf(buff + n, bufsiz - n, "multi_inserts_fail %"PRIu64"\n", engstat.multi_inserts_fail); n += snprintf(buff + n, bufsiz - n, "multi_inserts_fail %"PRIu64"\n", engstat.multi_inserts_fail);
n += snprintf(buff + n, bufsiz - n, "multi_deletes %"PRIu64"\n", engstat.multi_deletes); n += snprintf(buff + n, bufsiz - n, "multi_deletes %"PRIu64"\n", engstat.multi_deletes);
......
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