Skip to content

Logging: ZkStateReader.getLeaderRetry to TRACE - #4696

Open
dsmiley wants to merge 2 commits into
apache:mainfrom
dsmiley:ZkStateReader-adjust-logging
Open

Logging: ZkStateReader.getLeaderRetry to TRACE#4696
dsmiley wants to merge 2 commits into
apache:mainfrom
dsmiley:ZkStateReader-adjust-logging

Conversation

@dsmiley

@dsmiley dsmiley commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

from DEBUG.

But if there's a cache miss, other ZkStateReader watcher registrations newly added will now log at DEBUG.

Inspired to do this change from logging at DEBUG level of ZkStateReader on a cluster with all TLOG replica types. It seems getLeaderRetry is invoked often, albeit I expect the value to be in the cache.

from DEBUG.

But if there's a cache miss, other ZkStateReader watcher registrations will now log at DEBUG.
}

public void registerLiveNodesListener(LiveNodesListener listener) {
log.debug("registerLiveNodesListener");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: called indirectly via waitForState if there was not a cache hit

*/
public void registerDocCollectionWatcher(
String collection, DocCollectionWatcher docCollectionWatcher) {
log.debug("registerDocCollectionWatcher collection={}", collection);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: called indirectly via waitForState if there was not a cache hit

@HoustonPutman

Copy link
Copy Markdown
Contributor

The new logs look fine. Do the other ones really happen enough that they need to be trace logs? Debug is already quite verbose and I can't imagine these logs are really taking that much of the overall output

@dsmiley

dsmiley commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

In our production system, we saw log messages all day at a concerning volume, even though the cluster geometry was static. As "little" as a thousand a minute across our cluster but usually much more. I suspect maybe it could be indirectly related to TLOG replica polling across hour hundreds of replicas, but I'm unsure.

BTW I hate that the follower polls; so sad. I filed https://issues.apache.org/jira/browse/SOLR-18331 to capture the wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants