flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject git commit: FLUME-1527. Seed TransactionID/WriteOrderID in the case no logs need to be replayed.
Date Thu, 30 Aug 2012 21:51:14 GMT
Updated Branches:
  refs/heads/trunk 82aa5fc16 -> 63e0f43c5


FLUME-1527. Seed TransactionID/WriteOrderID in the case no logs need to be replayed.

(Brock Noland via Hari Shreedharan)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/63e0f43c
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/63e0f43c
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/63e0f43c

Branch: refs/heads/trunk
Commit: 63e0f43c5281a643af5709d4b09c15d03c142c77
Parents: 82aa5fc
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Thu Aug 30 14:48:58 2012 -0700
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Thu Aug 30 14:48:58 2012 -0700

----------------------------------------------------------------------
 .../apache/flume/channel/file/ReplayHandler.java   |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/63e0f43c/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java
b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java
index 14e2ff7..6f8af09 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java
@@ -212,7 +212,8 @@ class ReplayHandler {
   void replayLog(List<File> logs) throws IOException {
     int count = 0;
     MultiMap transactionMap = new MultiValueMap();
-    long transactionIDSeed = 0, writeOrderIDSeed = 0;
+    // seed both with the highest known sequence of either the tnxid or woid
+    long transactionIDSeed = lastCheckpoint, writeOrderIDSeed = lastCheckpoint;
     LOG.info("Starting replay of " + logs);
     //Load the inflight puts into the transaction map to see if they were
     //committed in one of the logs.


Mime
View raw message