logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1462864 - /logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Date Sat, 30 Mar 2013 23:49:50 GMT
Author: rgoers
Date: Sat Mar 30 23:49:49 2013
New Revision: 1462864

URL: http://svn.apache.org/r1462864
Log:
Update last batch time at beginning of loop

Modified:
    logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java

Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1462864&r1=1462863&r2=1462864&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
(original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
Sat Mar 30 23:49:49 2013
@@ -330,6 +330,7 @@ public class FlumePersistentManager exte
             while (!shutdown) {
                 if (database.count() >= batchSize ||
                     database.count() > 0 && lastBatch + manager.reconnectionDelay
> System.currentTimeMillis()) {
+                    lastBatch = System.currentTimeMillis();
                     try {
                         boolean errors = false;
                         DatabaseEntry key = new DatabaseEntry();
@@ -351,7 +352,6 @@ public class FlumePersistentManager exte
                                     }
                                     try {
                                         manager.send(batch);
-                                        lastBatch = System.currentTimeMillis();
                                     } catch (Exception ioe) {
                                         LOGGER.error("Error sending events", ioe);
                                         break;



Mime
View raw message