You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "killme2008 (via GitHub)" <gi...@apache.org> on 2023/03/31 07:12:29 UTC

[GitHub] [incubator-opendal] killme2008 opened a new issue, #1820: Annoying log when reading a file not exists

killme2008 opened a new issue, #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820

   For example:
   
   ```txt
    WARN opendal::services: service=fs operation=read path=system/information_schema/0/0_0000000000/manifest/_last_checkpoint range=0- -> errored: NotFound (persistent) at read => entity not found
   
   Context:
       service: fs
       path: system/information_schema/0/0_0000000000/manifest/_last_checkpoint
   ```
   
   We don't want to do an `exists` checking before reading. When reading a file which is not found, we'll process this special error:
   
   ```rust
    let last_checkpoint_data = match self.object_store.read(&last_checkpoint_path).await {
               Ok(last_checkpoint_data) => last_checkpoint_data,
               Err(e) if e.kind() == ErrorKind::NotFound => {
                   return Ok(None);
               }
               Err(e) => {
                   return Err(e).context(ReadObjectSnafu {
                       path: last_checkpoint_path,
                   });
               }
           };
   ```
   
   So I think this warning is unnecessary. The API users know what they are doing.
   


-- 
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: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo closed issue #1820: Annoying log when reading a file not exists

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #1820: Annoying log when reading a file not exists
URL: https://github.com/apache/incubator-opendal/issues/1820


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] killme2008 commented on issue #1820: Annoying log when reading a file not exists

Posted by "killme2008 (via GitHub)" <gi...@apache.org>.
killme2008 commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1491434439

   > According to the documentation available at https://docs.rs/opendal/latest/opendal/layers/struct.LoggingLayer.html#logging, this configuration only modifies the display of `expected errors` such as `NotFound`. However, any `unexpected errors` like `Unexpected` will still be printed.
   > 
   > > Got it. What's the default level of expected errors? I think it should be described in API.
   > 
   > Default to `WARN`. We should better add it in `LoggingLayer`'s doc. Do you wanna do that?
   
   Thank you. I'll create a PR.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] killme2008 commented on issue #1820: Annoying log when reading a file not exists

Posted by "killme2008 (via GitHub)" <gi...@apache.org>.
killme2008 commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1491431773

   > > So you mean I can set the level to be `ERROR`?
   > 
   > I mean set it to `DEBUG`.
   
   Got it. What's the default level of expected errors? I think it should be described in API.
   


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1820: Annoying log when reading a file not exists

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1491426271

   To print this expected error in debug level, utilize the `with_error_level` method found at https://docs.rs/opendal/latest/opendal/layers/struct.LoggingLayer.html#method.with_error_level.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1820: Annoying log when reading a file not exists

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1518961303

   Hello, @killme2008. Are you still interested in submitting a pull request?


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1820: Annoying log when reading a file not exists

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1491432713

   According to the documentation available at https://docs.rs/opendal/latest/opendal/layers/struct.LoggingLayer.html#logging, this configuration only modifies the display of `expected errors` such as `NotFound`. However, any `unexpected errors` like `Unexpected` will still be printed.
   
   > Got it. What's the default level of expected errors? I think it should be described in API.
   
   Default to `WARN`. We should better add it in `LoggingLayer`'s doc. Do you wanna do that?


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] killme2008 commented on issue #1820: Annoying log when reading a file not exists

Posted by "killme2008 (via GitHub)" <gi...@apache.org>.
killme2008 commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1519047104

   > Hello, @killme2008. Are you still interested in submitting a pull request?
   
   Sorry, I forgot, I'll do it tonight.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] killme2008 commented on issue #1820: Annoying log when reading a file not exists

Posted by "killme2008 (via GitHub)" <gi...@apache.org>.
killme2008 commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1491429704

   > To print this expected error in debug level, utilize the `with_error_level` method found at https://docs.rs/opendal/latest/opendal/layers/struct.LoggingLayer.html#method.with_error_level.
   
   So you mean I can set the level to be `ERROR`? If I do that, do we may missing some critical warnings?
   


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1820: Annoying log when reading a file not exists

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1820:
URL: https://github.com/apache/incubator-opendal/issues/1820#issuecomment-1491430414

   > So you mean I can set the level to be `ERROR`?
   
   I mean set it to `DEBUG`.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org