Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show reasons a POSIX file cannot be read (#5432)
Twice in the last few weeks, doing operational work, I've seen the error message ``` tiledb.cc.TileDBError: [TileDB::Array] Error: ArrayDirectory: IO Error: Cannot read from file; Read exceeds file size ``` This error happens (rightly) when `offset + nbytes > file_size`. In order to be helpful, the message should say what those numbers are. If `offset` is 10 and `nbytes` is 5 but `file_size` is 0, that's a data problem to debug; if `nbytes` is in the billions, that's more likely a software problem to debug. In any case, the error message should be helpful. As-is, not only does the message hide useful information, it doesn't even show the URI in question. This forces whoever's doing debug work to rebuild core in debug mode, re-run the repro in the debugger, and print things out in the debugger. It's a more effective use of time for the message to show that debug information. See also [[sc-62426]](https://app.shortcut.com/tiledb-inc/story/62426) for Windows CI issue (@teo-tsirpanis) --- TYPE: IMPROVEMENT DESC: Show file size, offset, nbytes, and URI in file-read error message --------- Co-authored-by: Theodore Tsirpanis <[email protected]>
- Loading branch information