Support isolate read write thread pool
fix #3003
Motivation
Now , when the Ledger is in the Writable state, the read and write of BookkeeperClient share the same orderExecutor.
But, we can not guarantee that the data is not read from disk.
In order to avoid reading from affecting writing, we need to add a configuration item to allow read and write requests to use different thread pools
Changes
Add a param to support isolate read write thread pool.
rerun failure checks
- read request doesn't wait for the completion on that threadpool.
When cold data is read, it will take a long time. At this time, the read request will be blocked, resulting in the write timeout.
Can I see a test reproing this? i suspect the problem is somewhere else.
- The ordering there is required for a reason.
The test in this PR simply does not cover anything related to actual functionality. I suggest trying to enable the feature by default and running all tests to see what breaks, it's hard to come up with something more specific off the top of my head.
- Do you have apples-to-apples comparison of performance, same load, same bookies etc, the feature off/on?
OK, I will do a performance test and add more monitoring information
btw. It's worth considering thread safety issues and preventing them. In Pulsar, https://github.com/apache/pulsar/issues/14436 seems to be caused by a thread safety issue in Bookkeeper client. It might be caused by #1792 changes which are in the same area as this PR.
fix old workflow,please see #3455 for detail
- read request doesn't wait for the completion on that threadpool.
When cold data is read, it will take a long time. At this time, the read request will be blocked, resulting in the write timeout.
Can I see a test reproing this? i suspect the problem is somewhere else.
- The ordering there is required for a reason.
The test in this PR simply does not cover anything related to actual functionality. I suggest trying to enable the feature by default and running all tests to see what breaks, it's hard to come up with something more specific off the top of my head.
- Do you have apples-to-apples comparison of performance, same load, same bookies etc, the feature off/on?
For ledgers in the Writable state, reading and writing share the same thread pool, and there is no way to isolate reading and writing; IMO, it is useful to isolate reads and writes to different threads of execution; @dlg99