mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Fix 2 oss binlog issue (#5536)
* 1. Fix compressed OSS binlog data 2. Fix first second data loss caused by dumping from OSS binlog * Fix CI failed test cases
This commit is contained in:
@@ -118,7 +118,7 @@ public class LocalBinLogConnection implements ErosaConnection {
|
||||
if (!iterateEvents.isEmpty()) {
|
||||
// 处理compress event
|
||||
for(LogEvent itEvent : iterateEvents) {
|
||||
if (!func.sink(event)) {
|
||||
if (!func.sink(itEvent)) {
|
||||
needContinue = false;
|
||||
break;
|
||||
}
|
||||
@@ -210,7 +210,8 @@ public class LocalBinLogConnection implements ErosaConnection {
|
||||
if (event != null) {
|
||||
checkServerId(event);
|
||||
|
||||
if (event.getWhen() > timestampSeconds) {
|
||||
// 闭区间,防止丢开始那一秒的数据
|
||||
if (event.getWhen() >= timestampSeconds) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user