lhotari commented on pull request #11387: URL: https://github.com/apache/pulsar/pull/11387#issuecomment-883316287
> @lhotari I know. What I want to ask is when `ManagedCursor#asyncReadEntries` is called, the `OpReadEntry#getNumberOfEntriesToRead` will be called eventually even after your change. Is it called in another thread? If yes, there could still be a thread safety problem. The currency design doesn't currently ensure single thread access. It's possible that there is multi-thread access at the moment. For example, the scheduler uses a different executor and thread. However, I believe that this PR improves the existing solution and can help reduce issues caused by thread safety issues. I think it's possible to incrementally refactor the concurrency solution towards a solution where a single thread handles all accesses for a specific key (managed ledger name in this case). We can have a broader discussion about this on the mailing list or in some upcoming community meeting. -- 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]
