hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Guo <paul...@gmail.com>
Subject sync related issues in hdfs IO
Date Mon, 12 Dec 2016 07:56:00 GMT
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?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message