You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by "Kevin Liang (BLOOMBERG/ 919 3RD A)" <kl...@bloomberg.net> on 2025/10/16 20:38:00 UTC

Why recovery requires commit?

I've been looking at the code in RecoveryStrategy for a while and I can't wrap my head around why a TLOG node replicating from leader would need to send a commit back to the leader and wait for a new searcher on the leader? https://github.com/apache/solr/blob/06a3b5e77e94771ee35c407cc90be0ce46d7a748/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L235

Can someone help explain this? Thanks

Re: Why recovery requires commit?

Posted by David Smiley <ds...@apache.org>.
FWIW I do think it's weird for a replica to tell the leader to do something
(anything) during recovery.  It'd be great to eliminate this somehow.  If
all tests pass without it; I'm in favor of making it opt-in internal
feature-flag for eventual removal.

On Fri, Oct 17, 2025 at 10:37 AM Kevin Liang (BLOOMBERG/ 919 3RD A) <
kliang78@bloomberg.net> wrote:

> Thanks for that source/tip. Will dig further there. The "it seems like
> forcing a commit on the leader might never be necessary" comment kind of
> reinforces where my thinking is going
>
> From: dev@solr.apache.org At: 10/16/25 17:17:37 UTC-4:00To:
> dev@solr.apache.org
> Subject: Re: Why recovery requires commit?
>
> Not a direct answer to your question but I find it helps tremendously to
> look at source control history.  You can get the history for a method (cool
> feature of Intellij), scan through, and voila --
> https://issues.apache.org/jira/browse/SOLR-16689 with great info
>
> IMO it doesn't hurt to ask questions on old JIRAs/PRs
>
> On Thu, Oct 16, 2025 at 4:38 PM Kevin Liang (BLOOMBERG/ 919 3RD A) <
> kliang78@bloomberg.net> wrote:
>
> > I've been looking at the code in RecoveryStrategy for a while and I can't
> > wrap my head around why a TLOG node replicating from leader would need to
> > send a commit back to the leader and wait for a new searcher on the
> leader?
> >
>
> https://github.com/apache/solr/blob/06a3b5e77e94771ee35c407cc90be0ce46d7a748/sol
> r/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L235
> <https://github.com/apache/solr/blob/06a3b5e77e94771ee35c407cc90be0ce46d7a748/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L235>
> >
> > Can someone help explain this? Thanks
>
>
>

Re: Why recovery requires commit?

Posted by "Kevin Liang (BLOOMBERG/ 919 3RD A)" <kl...@bloomberg.net>.
Thanks for that source/tip. Will dig further there. The "it seems like forcing a commit on the leader might never be necessary" comment kind of reinforces where my thinking is going

From: dev@solr.apache.org At: 10/16/25 17:17:37 UTC-4:00To:  dev@solr.apache.org
Subject: Re: Why recovery requires commit?

Not a direct answer to your question but I find it helps tremendously to
look at source control history.  You can get the history for a method (cool
feature of Intellij), scan through, and voila --
https://issues.apache.org/jira/browse/SOLR-16689 with great info

IMO it doesn't hurt to ask questions on old JIRAs/PRs

On Thu, Oct 16, 2025 at 4:38 PM Kevin Liang (BLOOMBERG/ 919 3RD A) <
kliang78@bloomberg.net> wrote:

> I've been looking at the code in RecoveryStrategy for a while and I can't
> wrap my head around why a TLOG node replicating from leader would need to
> send a commit back to the leader and wait for a new searcher on the leader?
> 
https://github.com/apache/solr/blob/06a3b5e77e94771ee35c407cc90be0ce46d7a748/sol
r/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L235
>
> Can someone help explain this? Thanks



Re: Why recovery requires commit?

Posted by David Smiley <ds...@apache.org>.
Not a direct answer to your question but I find it helps tremendously to
look at source control history.  You can get the history for a method (cool
feature of Intellij), scan through, and voila --
https://issues.apache.org/jira/browse/SOLR-16689 with great info

IMO it doesn't hurt to ask questions on old JIRAs/PRs

On Thu, Oct 16, 2025 at 4:38 PM Kevin Liang (BLOOMBERG/ 919 3RD A) <
kliang78@bloomberg.net> wrote:

> I've been looking at the code in RecoveryStrategy for a while and I can't
> wrap my head around why a TLOG node replicating from leader would need to
> send a commit back to the leader and wait for a new searcher on the leader?
> https://github.com/apache/solr/blob/06a3b5e77e94771ee35c407cc90be0ce46d7a748/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java#L235
>
> Can someone help explain this? Thanks