Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.7.0
-
None
-
None
Description
It is possible that there is a follower, which is the old leader, with a transaction only it saw as the single entry in the log file from the last epoch. The follower tries to sync with the new leader. It gets TRUNC request, but in the truncate method of FileTxnLog.java, the FileTxnIterator will fast-forward to the log file containing the sole transaction. Also, the pos is pointing to the sole transaction, which is actually the target to truncate. Therefore, doing a setLength(pos) does not discard this transaction. The itr.goToNextLog() is not true in this case if the log file was the last one. Consequently, the transaction remains in the followers log and gets applied to the in-memory data tree of the follower. Therefore, convergence fails.