Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/528#discussion_r243847609 --- Diff: solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java --- @@ -1250,23 +1250,10 @@ private UpdateCommand fetchFullUpdateFromLeader(AddUpdateCommand inplaceAdd, lon params.set("onlyIfActive", true); SolrRequest<SimpleSolrResponse> ur = new GenericSolrRequest(METHOD.GET, "/get", params); - String leaderUrl = req.getParams().get(DISTRIB_FROM); - - if (leaderUrl == null) { - // An update we're dependent upon didn't arrive! This is unexpected. Perhaps likely our leader is - // down or partitioned from us for some reason. Lets force refresh cluster state, and request the - // leader for the update. - if (zkController == null) { // we should be in cloud mode, but wtf? could be a unit test - throw new SolrException(ErrorCode.SERVER_ERROR, "Can't find document with id=" + id + ", but fetching from leader " - + "failed since we're not in cloud mode."); - } - Replica leader; - try { - leader = zkController.getZkStateReader().getLeaderRetry(collection, cloudDesc.getShardId()); - } catch (InterruptedException e) { - throw new SolrException(ErrorCode.SERVER_ERROR, "Exception during fetching from leader.", e); - } - leaderUrl = leader.getCoreUrl(); + String leaderUrl = getLeaderUrl(id); --- End diff -- I looked again and it seems fine. I could be the diff I was looking at confused the matter.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org