Review Board 1.7.22


ZOOKEEPER-1413: Use on-disk transaction log for learner sync up

Review Request #11231 - Created May 20, 2013 and updated

Thawan Kooburat
https://issues.apache.org/jira/browse/ZOOKEEPER-1413
Reviewers
zookeeper
zookeeper
ZOOKEEPER-1413: Use on-disk transaction log for learner sync up

- Use txnlog for learner synchronization if learner fall too far behind
- Refactoring LearnerHandler to deal with different cases of handling learner synchronization  
- unit tests
- ran in prod for more than half a year
/ivy.xml
Revision 1495522 New Change
[20] 36 lines
[+20]
37
  <publications>
37
  <publications>
38
    <artifact name='org.apache.zookeeper' type='jar' ext='jar' />
38
    <artifact name='org.apache.zookeeper' type='jar' ext='jar' />
39
  </publications>
39
  </publications>
40

    
   
40

   
41
  <dependencies>
41
  <dependencies>
42
    <dependency org="org.slf4j" name="slf4j-api" rev="1.6.2"/>
42
    <dependency org="org.slf4j" name="slf4j-api" rev="1.7.5"/>
43
    <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.2" transitive="false"/>
43
    <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.5" transitive="false"/>
44
    <dependency org="commons-cli" name="commons-cli" rev="1.2" />
44
    <dependency org="commons-cli" name="commons-cli" rev="1.2" />
45
  
45
  
46
    <!-- transitive false turns off dependency checking, log4j deps seem borked -->
46
    <!-- transitive false turns off dependency checking, log4j deps seem borked -->
47
    <dependency org="log4j" name="log4j" rev="1.2.16" transitive="false" conf="default"/>
47
    <dependency org="log4j" name="log4j" rev="1.2.16" transitive="false" conf="default"/>
48
    <dependency org="jline" name="jline" rev="0.9.94" transitive="false" conf="default"/>
48
    <dependency org="jline" name="jline" rev="0.9.94" transitive="false" conf="default"/>
[+20] [20] 28 lines
/src/java/main/org/apache/zookeeper/server/TxnLogProposalIterator.java
New File
 
/src/java/main/org/apache/zookeeper/server/ZKDatabase.java
Revision 1495522 New Change
 
/src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java
Revision 1495522 New Change
 
/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java
Revision 1495522 New Change
 
/src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java
Revision 1495522 New Change
 
/src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java
Revision 1495522 New Change
 
/src/java/test/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java
New File
 
/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
Revision 1495522 New Change
 
/src/java/test/org/apache/zookeeper/test/GetProposalFromTxnTest.java
New File
 
/src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java
Revision 1495522 New Change
 
  1. /ivy.xml: Loading...
  2. /src/java/main/org/apache/zookeeper/server/TxnLogProposalIterator.java: Loading...
  3. /src/java/main/org/apache/zookeeper/server/ZKDatabase.java: Loading...
  4. /src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java: Loading...
  5. /src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java: Loading...
  6. /src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java: Loading...
  7. /src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java: Loading...
  8. /src/java/test/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java: Loading...
  9. /src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java: Loading...
  10. /src/java/test/org/apache/zookeeper/test/GetProposalFromTxnTest.java: Loading...
  11. /src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java: Loading...