stillalex commented on PR #2101: URL: https://github.com/apache/solr/pull/2101#issuecomment-1850893336
took a swing at it and could not get it working based on refCount only. I don't think it can be done without major changes (happy to be shown otherwise). the trouble I had was: the init code checks for isClosed before opening a new searcher so in order for init to complete isClosed needs to return true, but same isClosed method for the same init window needs to return false so that the metrics do not become active. so instead of going and changing the hot path for creating a new searcher I went back to my PR and poked at the condition again and came up with another idea: what if we use an existing metric (newSearcherCounter) to track if any number of searchers have been created since the init phase. anything > 0 means init has happened so it is safe to activate the metrics. this also has the benefit that (unlike the refCount) does not decrease. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org