2010-12-17 07:01, Alfranio Correia wrote:
> On 12/16/2010 10:47 AM, Daogang Qu wrote:
>> 2010-12-16 18:12, Alfranio Correia wrote:
>>> Hi Daogang,
>>>
>>>
>>> On 12/16/2010 08:55 AM, Daogang Qu wrote:
>>>> Hi Alfranio,
>>>> Thanks for your comment. See reply in-line.
>>>> Please review:
>>>> http://lists.mysql.com/commits/127027
>>>>
>>>> Best Regards,
>>>>
>>>> Daogang
>>>>
>>>> 2010-12-11 05:05, Alfranio Correia wrote:
>>>>> Hi Daogang,
>>>>>
>>>>>
>>>>> Great work,
>>>>>
>>>>>
>>>>> STATUS
>>>>> ------
>>>>>
>>>>> Conditionally approved.
>>>>>
>>>>> REQUEST
>>>>> ------
>>>>>
>>>>> 1 - We are not writing directly to the index_file so I think
>>>>> we can replace the init_io_cache by a simple seek.
>>>> We are using init_io_cache for efficiently reading from index file
>>>> instead of writing.
>>>
>>> You don't need to call init_io_cache everytime you need to read the
>>> index file. You just need to call it once, after opening the file.
>>>
>>> I think you should replace other calls to init_io_cache by a seek,
>>> this would me more efficient as these calls to init_io_cache were
>>> used because after the open there was a init_io_cache with write
>>> properties.
>> But for every write and purge to the index file, the index file will be
>> closed and deleted, and then renamed from crash_safe_index_file.
>> So we need init_io_cache in the process. No chance for seek.
>>
>
>
> I still don't agree with that.
> Notice that you open the index with init_io_cache(...READ...) and
> calling init again is only need if you had openned it with WRITE,
> otherwise a seek is enough.
It didn't work. Because we have to end_io_catch(index file)
before close and delete it. Thanks!
Best Regards,
Daogang
>
> I will check this next week.
>
> Cheers.