diff options
author | Monty <monty@mariadb.org> | 2017-11-05 17:04:20 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-11-05 22:23:31 +0200 |
commit | c9f612dbdefc24f4fb4236b5e586e30f6e69b6bc (patch) | |
tree | e6e69bfcfc9834da3815c42d6920f206cdbc5f34 /sql/wsrep_applier.cc | |
parent | 61706e61fe1063b2c09190a859d8abc8bced6a64 (diff) | |
download | mariadb-git-c9f612dbdefc24f4fb4236b5e586e30f6e69b6bc.tar.gz |
Add more execution stages (commit, rollback, etc)
This was done to get more information about where time is spent.
Now we can get proper timing for time spent in commit, rollback,
binlog write etc.
Following stages was added:
- Commit
- Commit_implicit
- Rollback
- Rollback implicit
- Binlog write
- Init for update
- This is used instead of "Init" for insert, update and delete.
- Staring cleanup
Following stages where changed:
- "Unlocking tables" stage reset stage to previous stage at end
- "binlog write" stage resets stage to previous stage at end
- "end" -> "end of update loop"
- "cleaning up" -> "Reset for next command"
- Added stage_searching_rows_for_update when searching for rows
to be deleted.
Other things:
- Renamed all stages to start with big letter (before there was no
consitency)
- Increased performance_schema_max_stage_classes from 150 to 160.
- Most of the test changes in performance schema comes from renaming of
stages.
- Removed duplicate output of variables and inital state in a lot of
performance schema tests.
This was done to make it easier to change a default value for a
performance variable without affecting all tests.
- Added start_server_variables.test to check configuration
- Removed some duplicate "closing tables" stages
- Updated position for "stage_init_update" and "stage_updating" for
delete, insert and update to be just before update loop (for more
exact timing).
- Don't set "Checking permissions" twice in a row.
- Remove stage_end stage from creating views (not done for create table
either).
- Updated default performance history size from 10 to 20 because of new
stages
- Ensure that ps_enabled is correct (to be used in a later patch)
Diffstat (limited to 'sql/wsrep_applier.cc')
-rw-r--r-- | sql/wsrep_applier.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc index a299ddf074f..958add48b5a 100644 --- a/sql/wsrep_applier.cc +++ b/sql/wsrep_applier.cc @@ -234,11 +234,11 @@ wsrep_cb_status_t wsrep_apply_cb(void* const ctx, #ifdef WSREP_PROC_INFO snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, - "applying write set %lld: %p, %zu", + "Applying write set %lld: %p, %zu", (long long)wsrep_thd_trx_seqno(thd), buf, buf_len); thd_proc_info(thd, thd->wsrep_info); #else - thd_proc_info(thd, "applying write set"); + thd_proc_info(thd, "Applying write set"); #endif /* WSREP_PROC_INFO */ /* tune FK and UK checking policy */ @@ -268,10 +268,10 @@ wsrep_cb_status_t wsrep_apply_cb(void* const ctx, #ifdef WSREP_PROC_INFO snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, - "applied write set %lld", (long long)wsrep_thd_trx_seqno(thd)); + "Applied write set %lld", (long long)wsrep_thd_trx_seqno(thd)); thd_proc_info(thd, thd->wsrep_info); #else - thd_proc_info(thd, "applied write set"); + thd_proc_info(thd, "Applied write set"); #endif /* WSREP_PROC_INFO */ if (WSREP_CB_SUCCESS != rcode) @@ -293,10 +293,10 @@ static wsrep_cb_status_t wsrep_commit(THD* const thd) { #ifdef WSREP_PROC_INFO snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, - "committing %lld", (long long)wsrep_thd_trx_seqno(thd)); + "Committing %lld", (long long)wsrep_thd_trx_seqno(thd)); thd_proc_info(thd, thd->wsrep_info); #else - thd_proc_info(thd, "committing"); + thd_proc_info(thd, "Committing"); #endif /* WSREP_PROC_INFO */ wsrep_cb_status_t const rcode(trans_commit(thd) ? @@ -317,10 +317,10 @@ static wsrep_cb_status_t wsrep_commit(THD* const thd) #ifdef WSREP_PROC_INFO snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, - "committed %lld", (long long) wsrep_thd_trx_seqno(thd)); + "Committed %lld", (long long) wsrep_thd_trx_seqno(thd)); thd_proc_info(thd, thd->wsrep_info); #else - thd_proc_info(thd, "committed"); + thd_proc_info(thd, "Committed"); #endif /* WSREP_PROC_INFO */ return rcode; @@ -330,10 +330,10 @@ static wsrep_cb_status_t wsrep_rollback(THD* const thd) { #ifdef WSREP_PROC_INFO snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, - "rolling back %lld", (long long)wsrep_thd_trx_seqno(thd)); + "Rolling back %lld", (long long)wsrep_thd_trx_seqno(thd)); thd_proc_info(thd, thd->wsrep_info); #else - thd_proc_info(thd, "rolling back"); + thd_proc_info(thd, "Rolling back"); #endif /* WSREP_PROC_INFO */ wsrep_cb_status_t const rcode(trans_rollback(thd) ? @@ -341,10 +341,10 @@ static wsrep_cb_status_t wsrep_rollback(THD* const thd) #ifdef WSREP_PROC_INFO snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, - "rolled back %lld", (long long)wsrep_thd_trx_seqno(thd)); + "Rolled back %lld", (long long)wsrep_thd_trx_seqno(thd)); thd_proc_info(thd, thd->wsrep_info); #else - thd_proc_info(thd, "rolled back"); + thd_proc_info(thd, "Rolled back"); #endif /* WSREP_PROC_INFO */ return rcode; |