Skip to content

Commit

Permalink
Fix: insert registry when existAckOffset is zero (#671)
Browse files Browse the repository at this point in the history
Co-authored-by: tianyafei <tianyafei@corp.netease.com>
  • Loading branch information
08fly and tianyafei committed Apr 8, 2024
1 parent 31bec67 commit ec6c447
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/source/file/watch.go
Expand Up @@ -319,8 +319,10 @@ func (w *Watcher) eventBus(e jobEvent) {
}
}
// Pre-allocation offset
if e.job.task.config.ReadFromTail {
existAckOffset = fileSize
if existAckOffset == 0 || e.job.task.config.ReadFromTail {
if e.job.task.config.ReadFromTail {
existAckOffset = fileSize
}
w.preAllocationOffset(existAckOffset, job)
}
// set ack offset
Expand Down

0 comments on commit ec6c447

Please sign in to comment.