solr icon indicating copy to clipboard operation
solr copied to clipboard

SOLR-17947: CloudSolrClient refreshes collection state asynchronously using a dedicated thread pool to reduce ZooKeeper blocking under load.

Open markrmiller opened this issue 2 months ago • 2 comments

  • 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

markrmiller avatar Nov 07 '25 22:11 markrmiller

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.

markrmiller avatar Nov 14 '25 04:11 markrmiller

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?

dsmiley avatar Nov 14 '25 15:11 dsmiley