poorbarcode commented on PR #21063: URL: https://github.com/apache/pulsar/pull/21063#issuecomment-1692858102
@mattisonchao > It means we disabled the cache. Right? No, only refresh the cache if the write conflicts; the probability is very low. <img width="1359" alt="截屏2023-08-25 14 44 30" src="https://github.com/apache/pulsar/assets/25195800/f5206707-851d-4605-ba26-d99084d0706e"> > Could you please write a unit test to demonstrate it? It's too complicated. I can't write a test for this case. > btw, it looks like a clean cache way still 100% ensures it, because zk allowed the client to read from a follower. maybe we can consider the sync method of metadata? The internal method `BaseResources.refreshAndGetAsync` will do `sync` first. see: https://github.com/apache/pulsar/blob/master/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/BaseResources.java#L132-L137 -- 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]
