List:Commits« Previous MessageNext Message »
From:Daogang Qu Date:August 20 2010 3:29am
Subject:Re: Please review Bug #53167
View as plain text  
Andrei Elkin wrote:
> DaoGang, hello.
>
>
>   
>> Hi Zhenxing and andrei,
>> Please review the following patch:
>> http://lists.mysql.com/commits/115757
>>
>>     
>
> I have started to stumble at the following point:
>
> While the bug description blames the relay log's FD timestamp saying
> `The displayed value for
> Seconds_Behind_Master is calculated based on the timestamp of the relay log's
> Format_Description_Log_Event'
> At the same time 
>
>      if (!(ev->is_artificial_event() || ev->is_relay_log_event() ||
>      (ev->when == 0)))
>
> the if argument should not let the slave side FD event to update
>   
No. The rli->last_master_timestamp is updated by the slave side FD.
The above 'if argument' really lets the slave side FD event to pass
and update rli->last_master_timestamp by the FD's timestamp.
>      {
> -      rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
>
> rli->last_master_timestamp.
>
> +      time_t rli_last_master_timestamp= rli->last_master_timestamp;
> +      if (ev->get_type_code() != FORMAT_DESCRIPTION_EVENT)
>   
The 'rpl_seconds_behind_master.test' will abort if we don't add the above
if argument 'ev->get_type_code() != FORMAT_DESCRIPTION_EVENT'. And
It certifies that the rli->last_master_timestamp is updated by the slave 
side FD too.
> +      {
> +        rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
> +      }
> +      DBUG_ASSERT(rli_last_master_timestamp <= rli->last_master_timestamp);
>        DBUG_ASSERT(rli->last_master_timestamp >= 0);
>      }
>
> I find it puzzling. Could you please explain that, and if necessary to
> alter the patch comments.
>   
Now. What puzzles you? What should be updated for patch comments?

Thanks!

Best Regards,

Daogang
> Thanks!
>
> Andrei
>   

Thread
Please review Bug #53167Daogang Qu19 Aug
Re: Please review Bug #53167Daogang Qu20 Aug