lib/mergeset: mention in the error message the path to the part, which triggered the error

This should improve debuggability
This commit is contained in:
Aliaksandr Valialkin 2022-10-12 09:53:55 +03:00
parent 4e1c12a10d
commit 7a6e5f9224
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -213,6 +213,9 @@ func (ps *partSearch) NextItem() bool {
// The current block is over. Proceed to the next block.
if err := ps.nextBlock(); err != nil {
if err != io.EOF {
err = fmt.Errorf("error in %q: %w", ps.p.path, err)
}
ps.err = err
return false
}