mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
FileLogFetcher's fetch() method should fix up position and origin even if we weren't successful at fetching anything from the file
This commit is contained in:
@@ -129,11 +129,11 @@ public final class FileLogFetcher extends LogFetcher {
|
||||
}
|
||||
} else if (limit > 0) {
|
||||
System.arraycopy(buffer, origin, buffer, 0, limit);
|
||||
position -= origin;
|
||||
origin = 0;
|
||||
final int len = fin.read(buffer, limit, buffer.length - limit);
|
||||
if (len >= 0) {
|
||||
limit += len;
|
||||
position -= origin;
|
||||
origin = 0;
|
||||
|
||||
/* More binlog to fetch */
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user