henry3260 opened a new pull request, #11171:
URL: https://github.com/apache/ozone/pull/11171

   ## What changes were proposed in this pull request?
   
   `OmMetadataManagerImpl#getLifecycleConfiguration` logs the not-found case at 
debug level and then throws
   `LIFECYCLE_CONFIGURATION_NOT_FOUND`. Since `OMException` extends 
`IOException`, the method's own catch-all
   immediately reports the same condition again at error level with a full 
stack trace, overriding the debug
   level the not-found path deliberately chose. 
`OzoneManager#getLifecycleConfiguration` additionally records
   it as an audit read failure.
   
   A bucket without a lifecycle configuration is an expected outcome, not an 
error. This patch lets that
   result propagate without the error log, and audits it as a completed read 
rather than a failure. Genuine
   failures keep logging and auditing as before, and the exception returned to 
the client is unchanged.
   
   This is latent today because the only caller is 
`GetBucketLifecycleConfiguration`, which is not a hot path.
   HDDS-16151 adds a lifecycle lookup to `HeadObject`, where every request 
against a bucket without a
   configuration would hit it.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16352
   
   ## How was this patch tested?
   
   New unit tests in `ozone-manager`:
   
   * 
`TestOmMetadataManager#testGetMissingLifecycleConfigurationIsNotLoggedAsError` 
— a missing configuration
     still throws `LIFECYCLE_CONFIGURATION_NOT_FOUND`, but no longer produces 
the error log.
   * `TestOzoneManagerGetLifecycleConfiguration` — a missing configuration is 
audited as a completed read,
     while a genuine failure is still audited as a read failure.
   
   Verified locally with `mvn -pl :ozone-manager test 
-Dtest='TestOmMetadataManager,TestOzoneManagerGetLifecycleConfiguration'`,
   plus `checkstyle:check` and `apache-rat:check` on the module.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to