diff --git a/br/pkg/lightning/mydump/reader.go b/br/pkg/lightning/mydump/reader.go index 39cf5ca224c58..1a25cd31b58f0 100644 --- a/br/pkg/lightning/mydump/reader.go +++ b/br/pkg/lightning/mydump/reader.go @@ -187,7 +187,8 @@ func (pr PooledReader) Read(p []byte) (n int, err error) { // Seek implements io.Seeker func (pr PooledReader) Seek(offset int64, whence int) (int64, error) { - if pr.ioWorkers != nil { + // Seek(0, io.SeekCurrent) is used to get the current offset, which will not cause any Disk I/O. + if pr.ioWorkers != nil && !(offset == 0 && whence == io.SeekCurrent) { w := pr.ioWorkers.Apply() defer pr.ioWorkers.Recycle(w) }