1) In MirroredAppendOnly_FlushAndClose()

    {

        int     ret;


        errno = 0;


        ret = FileSync(open->primaryFile);

        if (ret != 0)

            *primaryError = errno;

    }


    FileClose(open->primaryFile);



If I understand the code correctly, MirroredAppendOnly_DoOpen() sets

O_SYNC in file flags which leads to a hsync in FileClose(). So it looks

that FileSync() is not needed here to protect the data integrity.


2)

 /*

 * flush hdfs file

 *

 * NB: hdfs flush do NOT promise that data has been written on disk

 * after flush, data can be read by others

 */

 int

 HdfsFileSync(File file)

It seems that HdfsFileSync finally does hsync finally, so I assume this
comment is wrong, right?

Reply via email to