Use microsecond_interval_timer() instead of my_time() in replicaiton
- Use microsecond_interval_timer() to calculate time for applying row events. (Faster execution) - Removed return value for set_row_stmt_start_timestamp() as it was never used.
This commit is contained in:
parent
44676ed5b1
commit
b77bb43f60
@ -12963,13 +12963,13 @@ void issue_long_find_row_warning(Log_event_type type,
|
|||||||
if ((global_system_variables.log_warnings > 1 &&
|
if ((global_system_variables.log_warnings > 1 &&
|
||||||
!rgi->is_long_find_row_note_printed()))
|
!rgi->is_long_find_row_note_printed()))
|
||||||
{
|
{
|
||||||
time_t now= my_time(0);
|
ulonglong now= microsecond_interval_timer();
|
||||||
time_t stmt_ts= rgi->get_row_stmt_start_timestamp();
|
ulonglong stmt_ts= rgi->get_row_stmt_start_timestamp();
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("inject_long_find_row_note",
|
DBUG_EXECUTE_IF("inject_long_find_row_note",
|
||||||
stmt_ts-=(LONG_FIND_ROW_THRESHOLD*2););
|
stmt_ts-=(LONG_FIND_ROW_THRESHOLD*2*HRTIME_RESOLUTION););
|
||||||
|
|
||||||
long delta= (long) (now - stmt_ts);
|
longlong delta= (now - stmt_ts)/HRTIME_RESOLUTION;
|
||||||
|
|
||||||
if (delta > LONG_FIND_ROW_THRESHOLD)
|
if (delta > LONG_FIND_ROW_THRESHOLD)
|
||||||
{
|
{
|
||||||
@ -13375,7 +13375,6 @@ int
|
|||||||
Delete_rows_log_event::do_after_row_operations(const Slave_reporting_capability *const,
|
Delete_rows_log_event::do_after_row_operations(const Slave_reporting_capability *const,
|
||||||
int error)
|
int error)
|
||||||
{
|
{
|
||||||
/*error= ToDo:find out what this should really be, this triggers close_scan in nbd, returning error?*/
|
|
||||||
m_table->file->ha_index_or_rnd_end();
|
m_table->file->ha_index_or_rnd_end();
|
||||||
my_free(m_key);
|
my_free(m_key);
|
||||||
m_key= NULL;
|
m_key= NULL;
|
||||||
|
@ -744,7 +744,7 @@ struct rpl_group_info
|
|||||||
Runtime state for printing a note when slave is taking
|
Runtime state for printing a note when slave is taking
|
||||||
too long while processing a row event.
|
too long while processing a row event.
|
||||||
*/
|
*/
|
||||||
time_t row_stmt_start_timestamp;
|
longlong row_stmt_start_timestamp;
|
||||||
bool long_find_row_note_printed;
|
bool long_find_row_note_printed;
|
||||||
/* Needs room for "Gtid D-S-N\x00". */
|
/* Needs room for "Gtid D-S-N\x00". */
|
||||||
char gtid_info_buf[5+10+1+10+1+20+1];
|
char gtid_info_buf[5+10+1+10+1+20+1];
|
||||||
@ -890,17 +890,15 @@ struct rpl_group_info
|
|||||||
char *gtid_info();
|
char *gtid_info();
|
||||||
void unmark_start_commit();
|
void unmark_start_commit();
|
||||||
|
|
||||||
time_t get_row_stmt_start_timestamp()
|
longlong get_row_stmt_start_timestamp()
|
||||||
{
|
{
|
||||||
return row_stmt_start_timestamp;
|
return row_stmt_start_timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t set_row_stmt_start_timestamp()
|
void set_row_stmt_start_timestamp()
|
||||||
{
|
{
|
||||||
if (row_stmt_start_timestamp == 0)
|
if (row_stmt_start_timestamp == 0)
|
||||||
row_stmt_start_timestamp= my_time(0);
|
row_stmt_start_timestamp= microsecond_interval_timer();
|
||||||
|
|
||||||
return row_stmt_start_timestamp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_row_stmt_start_timestamp()
|
void reset_row_stmt_start_timestamp()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user