dqhl76 opened a new pull request, #2637:
URL: https://github.com/apache/incubator-opendal/pull/2637
If user try to seek for a invalid position, we will give an `Unexpected`
Error. `Unexpected` Error used to represent `OpenDAL don't know what happened
here`. I may be better to use a new error kind `InvalidInput` to represent this
situation.
```
/// OpenDAL don't know what happened here, and no actions other than just
/// returning it back. For example, s3 returns an internal service error.
Unexpected,
```
before:
```
2023-07-14T06:37:19.152933Z ERROR opendal::services: service=memory
operation=Reader::seek path=bfae56eb-ae99-4ca6-b000-4bdad69c85e1 read=0 -> data
read failed: Unexpected (permanent) at Reader::seek => invalid seek to a
negative or overflowing position
Context:
service: memory
path: bfae56eb-ae99-4ca6-b000-4bdad69c85e1
at core/src/layers/logging.rs:1108
2023-07-14T06:37:19.153098Z DEBUG opendal::services: service=memory
operation=read path=bfae56eb-ae99-4ca6-b000-4bdad69c85e1 read=0 -> data read
finished
at core/src/layers/logging.rs:1035
```
after:
```
2023-07-14T07:50:38.166551Z ERROR opendal::services: service=memory
operation=Reader::seek path=0fca6ade-8d96-44fc-ac5b-86a370b26048 read=0 -> data
read failed: InvalidInput (permanent) at Reader::seek => invalid seek to a
negative or overflowing position
Context:
service: memory
path: 0fca6ade-8d96-44fc-ac5b-86a370b26048
at core/src/layers/logging.rs:1108
```
related:https://github.com/apache/incubator-opendal/issues/2636#issuecomment-1635362220
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]