HBASE-12130 HBASE-11980 calls hflush and hsync doing near double the syncing work

This commit is contained in:
stack 2014-10-01 14:11:48 -07:00
parent 915b338634
commit 0d45272e40
1 changed files with 4 additions and 1 deletions

View File

@ -163,8 +163,11 @@ public class ProtobufLogWriter extends WriterBase {
@Override
public void sync() throws IOException {
try {
// This looks to be a noop but its what we have always done. Leaving for now.
this.output.flush();
// TODO: Add in option to call hsync. See HBASE-5954 Allow proper fsync support for HBase
//
this.output.hflush();
this.output.hsync();
} catch (NullPointerException npe) {
// Concurrent close...
throw new IOException(npe);