chore: add more diagnostic output to dbfs Stat error (#11525)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11525 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net> Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
This commit is contained in:
committed by
Michael Kriese
parent
b8dac67364
commit
7fdb31c8ef
@@ -61,7 +61,7 @@ func WriteLogs(ctx context.Context, filename string, offset int64, rows []*runne
|
|||||||
|
|
||||||
stat, err := f.Stat()
|
stat, err := f.Stat()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("dbfs Stat %q: %w", name, err)
|
return nil, fmt.Errorf("WriteLogs(name=%q, offset=%d, len(rows)=%d): dbfs Stat: %w", name, offset, len(rows), err)
|
||||||
}
|
}
|
||||||
if stat.Size() < offset {
|
if stat.Size() < offset {
|
||||||
// If the size is less than offset, refuse to write, or it could result in content holes.
|
// If the size is less than offset, refuse to write, or it could result in content holes.
|
||||||
|
|||||||
Reference in New Issue
Block a user