List:Commits« Previous MessageNext Message »
From:Daogang Qu Date:November 22 2010 7:25am
Subject:Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493
View as plain text  
2010-11-19 18:13, Alfranio Correia wrote:
> Hi Daogang,
>
> Some answers were missing in the previous email.
>
> Cheers.
>
> On 11/19/2010 09:25 AM, Alfranio Correia wrote:
>> Hi Daogang,
>>
>> On 11/19/2010 07:47 AM, Daogang Qu wrote:
>>> Hi Alfranio,
>>> Thanks for your comments. See reply in-line.
>>> Please review the updated patch:
>>> http://lists.mysql.com/commits/124364
>>>
[snip]
>>
>>>
>>>>
>>>>
>>>> SUGGESTIONS
>>>> -----------
>>>>
>>>> 1. The crash-safety for the binlog is based on the assumption that the
>>>> "my_chsize" is idempotent. Howerver, my_chsize may not be an atomic
>>>> operation.
>>>> So I think we should inject some faults in order to make sure that the
>>>> master
>>>> will be safe if the recovery fails.
>>> That's better. Inject faults as following:
>>> DBUG_EXECUTE_IF("crash_before_change_binlog_file_size", 
>>> DBUG_SUICIDE(););
>>> my_chsize(...)
>>> DBUG_EXECUTE_IF("crash_after_change_binlog_file_size", 
>>> DBUG_SUICIDE(););
>>> Right?
>>>>
>
>
> No. Crash inside my_chsize.
my_chsize() have encapsulated different system calls according to 
different  platforms.
Where did you want to set the DBUG POINT? Before return or somewhere?
But I think it's better to set the DBUG POINT at top level as we used to 
do that.
>
>
>>>> 2. The same idea apply to the indexes.
>>> I think I did it to index file when renaming crash_safe_index_file to
>>> index_file as following:
>>>
>>> DBUG_EXECUTE_IF("crash_create_before_rename_index_file",
>>> DBUG_SUICIDE(););
>>> if (my_rename(crash_safe_index_file_name, index_file_name, 
>>> MYF(MY_WME)))
>>> {
>>> sql_print_error("MYSQL_BIN_LOG::move_crash_safe_index_file_to_index_file 
>>>
>>> "
>>> "failed to move crash_safe_index_file to index file.");
>>> goto err;
>>> }
>>> DBUG_EXECUTE_IF("crash_create_after_rename_index_file", 
>>> DBUG_SUICIDE(););
>>>
>>>>
>
>
> Here, I think it would be great to crash while writing to the "temporary
> files" created to handle operations on the binary index.
I didn't sure I got it. my_rename() will not write data to the 
"temporary file"
from binlog_index. It just creates a link to the "temporary file".
I really copy content to the "temporary file" from binlog_index file in 
copy_file()
function. Did you want to let me set DEBUG POINT there? But it's same with
DBUG_EXECUTE_IF("crash_create_before_rename_index_file", DBUG_SUICIDE(););

Best Regards,

Daogang
>
>
>
>>>>
[snip]
Thread
bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Dao-Gang.Qu15 Nov
  • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Alfranio Correia17 Nov
    • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Daogang Qu19 Nov
      • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Alfranio Correia19 Nov
        • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Alfranio Correia19 Nov
          • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Daogang Qu22 Nov
            • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Daogang Qu22 Nov
              • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Alfranio Correia22 Nov
                • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Daogang Qu23 Nov
        • Re: bzr commit into mysql-next-mr branch (Dao-Gang.Qu:3203) WL#5493Daogang Qu22 Nov