zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f..@apache.org
Subject svn commit: r1336083 - in /zookeeper/bookkeeper/trunk: CHANGES.txt bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
Date Wed, 09 May 2012 11:00:38 GMT
Author: fpj
Date: Wed May  9 11:00:38 2012
New Revision: 1336083

URL: http://svn.apache.org/viewvc?rev=1336083&view=rev
Log:
BOOKKEEPER-235: Bad syncing in entrylogger degrades performance for many concurrent ledgers
(ivank via fpj)


Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt
    zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1336083&r1=1336082&r2=1336083&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Wed May  9 11:00:38 2012
@@ -100,6 +100,8 @@ Trunk (unreleased changes)
 
         BOOKKEEPER-234: EntryLogger will throw NPE, if any dir does not exist or IO Errors.
(umamaheswararao via ivank)
 
+	BOOKKEEPER-235: Bad syncing in entrylogger degrades performance for many concurrent ledgers
(ivank via fpj)
+
       hedwig-client/
 
         BOOKKEEPER-217: NPE in hedwig client when enable DEBUG (sijie via ivank)

Modified: zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java?rev=1336083&r1=1336082&r2=1336083&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
(original)
+++ zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
Wed May  9 11:00:38 2012
@@ -136,29 +136,27 @@ class InterleavedLedgerStorage implement
 
     @Override
     public void flush() throws IOException {
-        synchronized (entryLogger) {
-            if (!somethingWritten) {
-                return;
-            }
-            somethingWritten = false;
-            boolean flushFailed = false;
-
-            try {
-                ledgerCache.flushLedger(true);
-            } catch (IOException ioe) {
-                LOG.error("Exception flushing Ledger cache", ioe);
-                flushFailed = true;
-            }
-            
-            try {
-                entryLogger.flush();
-            } catch (IOException ioe) {
-                LOG.error("Exception flushing Ledger", ioe);
-                flushFailed = true;
-            }
-            if (flushFailed) {
-                throw new IOException("Flushing to storage failed, check logs");
-            }
+        if (!somethingWritten) {
+            return;
+        }
+        somethingWritten = false;
+        boolean flushFailed = false;
+
+        try {
+            ledgerCache.flushLedger(true);
+        } catch (IOException ioe) {
+            LOG.error("Exception flushing Ledger cache", ioe);
+            flushFailed = true;
+        }
+
+        try {
+            entryLogger.flush();
+        } catch (IOException ioe) {
+            LOG.error("Exception flushing Ledger", ioe);
+            flushFailed = true;
+        }
+        if (flushFailed) {
+            throw new IOException("Flushing to storage failed, check logs");
         }
     }
 



Mime
View raw message