From 0d45272e40ac0a87f7875811d3923f16cc2446c4 Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 1 Oct 2014 14:11:48 -0700 Subject: [PATCH] HBASE-12130 HBASE-11980 calls hflush and hsync doing near double the syncing work --- .../hadoop/hbase/regionserver/wal/ProtobufLogWriter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java index 14ffa4547e9..fe2eac92fa0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogWriter.java @@ -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);