Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.1
-
None
Description
In the process of upgrading to 4.1 from 3.6, I've noticed that our master servers do not show any commit points – e.g. via http://127.0.0.1:8983/solr/collection1/replication?command=commits – available until after a new commit happens. So, for static indexes, replication doesn't happen and for dynamic indexes, we have to wait until an incremental update of master for slaves to see any commits.
Tracing through the code, it looks like the change that may have effected us was part of SOLR-3911, specifically commenting out the initialization of the newIndexWriter in the replicateAfterStartup block [1]:
// TODO: perhaps this is no longer necessary then? // core.getUpdateHandler().newIndexWriter(true);
I'm guessing this is commented out because it is assumed that indexCommitPoint was going to be set by that block, but when a slave requests commits, that goes back to core.getDeletionPolicy().getCommits() to fetch the list of commits. If no indexWriter has been initialized, then, as far as I can tell, IndexDeletionPolicyWrapper#onInit will not have been called and there will be no commits available.
By uncommenting this line, I was able to see commits on startup and slaves began to replicate successfully.
Attachments
Issue Links
- relates to
-
SOLR-3911 Make Directory and DirectoryFactory first class so that the majority of Solr's features work with any custom implementations.
- Closed