zooo-code commented on PR #25158:
URL: https://github.com/apache/pulsar/pull/25158#issuecomment-3794490666

   Hi @lhotari
   
   I've refactored the code as suggested so that the sync method now calls the 
async one.
   
   However, I'm hitting a failure in
   `AdminApiSchemaTest.createKeyValueSchema`.
   
   It's caused by `LocalPolicies` having empty content (0 bytes) in the 
metadata store, which triggers a deserialization error in the new async path:
   
   ```bash
   ContentDeserializationException: Failed to deserialize payload
   for key '/admin/local-policies/schematest/test'
   Caused by: MismatchedInputException: No content to map due to
   end-of-input
   ```
   
   The refactoring exposed a pre-existing edge case. The original code likely 
handled data access differently, while the new async approach triggers full 
object deserialization, which fails on empty content.
   
   I tried catching `ContentDeserializationException` in
   `LocalPoliciesResources.getLocalPoliciesAsync()` to return 
`Optional.empty()`, but the error still propagates.
   
   Should I handle this at the `MetadataCacheImpl` level (treating empty 
content as non-existent globally), or is there a better approach?


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

Reply via email to