SOLR-17947: CloudSolrClient refreshes collection state asynchronously using a dedicated thread pool to reduce ZooKeeper blocking under load.
- replace striped locks with single-flight cache refresh futures to stop thundering herd
- keep stale entries usable while background refresh runs, update retry semantics accordingly
Addressed @dsmiley’s inline notes: reused the existing update thread pool with a semaphore for refreshes, added javadocs for markMaybeStaleIfOutsideBackoff, switched the refresh cleanup to whenCompleteAsync so we don’t mutate the map inside compute, documented why we temporarily drop stateVer, and tagged the waitedForRefresh parameter. I don't agree that the in-flight refresh tracker should be folded directly into StateCache.
A question for you: in your mind, are code reviews strictly either "drive by" or "collaborative"? Is there something else? Can they be a bit of both? Is "drive by" unappreciative/unwelcome/frowned-upon? I can appreciate a yearning for collaboration... collaboration is good... but can we assume/expect those who review code to always have the time to be, well, collaborative?