https://issues.apache.org/jira/browse/SOLR-3437
On May 5, 2012, at 12:46 PM, Mark Miller wrote: > > On May 5, 2012, at 2:37 AM, Trym R. Møller wrote: > >> Hi >> >> Using Solr trunk with the replica feature, I see the below exception >> repeatedly in the Solr log. >> I have been looking into the code of RecoveryStrategy#commitOnLeader and >> read the code as follows: >> 1. sends a commit request (with COMMIT_END_POINT=true) to the Solr instance >> containing the leader of the slice >> 2. sends a commit request to the Solr instance containing the leader of the >> slice >> The first results in a commit on the shards in the single leader Solr >> instance and the second results in a commit on the shards in the single >> leader Solr plus on all other Solrs having slices or replica belonging to >> the collection. >> >> I would expect that the first request is the relevant (and enough to do a >> recovery of the specific replica). >> Am I reading the second request wrong or is it a bug? > > Your right - that second server.commit() looks like a bug - I don't think it > should be harmful - it would just send out a commit to the cluster - but it > should not be there. > > I'm not sure why that second commit is timing out though. I guess it may be > that reopening the searcher so quickly twice in a row is taking longer than > the 30 second timeout. I guess we have to consider if we even need that > commit to open a new searcher - but either way it should be a lot better once > we remove that second commit. > >> >> The code I'm referring to is >> UpdateRequest ureq = new UpdateRequest(); >> ureq.setParams(new ModifiableSolrParams()); >> ureq.getParams().set(DistributedUpdateProcessor.COMMIT_END_POINT, true); >> ureq.getParams().set(RecoveryStrategy.class.getName(), baseUrl); >> 1. ureq.setAction(AbstractUpdateRequest.ACTION.COMMIT, false, >> true).process( >> server); >> 2. server.commit(); >> >> Thanks in advance for any input. >> >> Best regards Trym R. Møller >> >> Apr 21, 2012 10:14:11 AM org.apache.solr.common.SolrException log >> SEVERE: Error while trying to >> recover:org.apache.solr.client.solrj.SolrServerException: >> http://myIP:8983/solr/myShardId >> at >> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:493) >> at >> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:264) >> at >> org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:103) >> at org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:180) >> at org.apache.solr.client.solrj.SolrServer.commit(SolrServer.java:156) >> at >> org.apache.solr.cloud.RecoveryStrategy.commitOnLeader(RecoveryStrategy.java:170) >> at >> org.apache.solr.cloud.RecoveryStrategy.replicate(RecoveryStrategy.java:120) >> at >> org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:341) >> at >> org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:206) >> Caused by: java.net.SocketTimeoutException: Read timed out >> at java.net.SocketInputStream.socketRead0(Native Method) >> at java.net.SocketInputStream.read(SocketInputStream.java:129) >> at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) >> at java.io.BufferedInputStream.read(BufferedInputStream.java:237) >> at >> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) >> at >> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) >> at >> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) >> at >> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) >> at >> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) >> at >> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) >> at >> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) >> at >> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) >> at >> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) >> at >> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) >> at >> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) >> at >> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:440) >> ... 8 more > > - Mark Miller > lucidimagination.com > > > > > > > > > > > - Mark Miller lucidimagination.com