Demogorgon314 opened a new pull request #14373: URL: https://github.com/apache/pulsar/pull/14373
### Motivation The `MetadataCache#getIfCached` method will return `Optional.empty()` if the required path is not cached yet or the cached future is not finished yet, this is normal behavior. https://github.com/apache/pulsar/blob/773f9197cfb83092fb6ee2bf1b9ec38143f3c8b0/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/cache/impl/MetadataCacheImpl.java#L130-L137 We should add a retry mechanism when asserting getIfCached. ### Modifications Add a retry mechanism to assert getIfCached. ### Documentation Check the box below or label this PR directly (if you have committer privilege). Need to update docs? - [ ] `doc-required` (If you need help on updating docs, create a doc issue) - [x] `no-need-doc` (Please explain why) - [ ] `doc` (If this PR contains doc changes) -- 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]
