Skip to content

Commit

Permalink
Fix: readFromTail when existAckOffset is zero (#624) (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethfoo authored Aug 30, 2023
1 parent 2f3a210 commit 95a00ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/source/file/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,8 @@ func (w *Watcher) eventBus(e jobEvent) {
}
}
// Pre-allocation offset
if existAckOffset == 0 {
if e.job.task.config.ReadFromTail {
existAckOffset = fileSize
}
if e.job.task.config.ReadFromTail {
existAckOffset = fileSize
w.preAllocationOffset(existAckOffset, job)
}
// set ack offset
Expand Down

0 comments on commit 95a00ef

Please sign in to comment.