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:
dingxiaobo
2025-12-25 11:52:24 +08:00
committed by GitHub
parent 79338be02d
commit 8a4199a7b0
2 changed files with 8 additions and 10 deletions

View File

@@ -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;
}