Merge pull request #1118 from littleneko/patch-1
fix: buildLastTransactionPosition 的 for 循环少了 =0
This commit is contained in:
@@ -417,7 +417,7 @@ public abstract class AbstractEventParser<EVENT> extends AbstractCanalLifeCycle
|
||||
}
|
||||
|
||||
protected LogPosition buildLastTransactionPosition(List<CanalEntry.Entry> entries) { // 初始化一下
|
||||
for (int i = entries.size() - 1; i > 0; i--) {
|
||||
for (int i = entries.size() - 1; i >= 0; i--) {
|
||||
CanalEntry.Entry entry = entries.get(i);
|
||||
if (entry.getEntryType() == CanalEntry.EntryType.TRANSACTIONEND) {// 尽量记录一个事务做为position
|
||||
return buildLastPosition(entry);
|
||||
|
||||
Reference in New Issue
Block a user