Github user dsmiley commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/528#discussion_r241945926 --- Diff: solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java --- @@ -1417,45 +1407,7 @@ private void doDeleteById(DeleteUpdateCommand cmd) throws IOException { return; } - if (zkEnabled && isLeader && !isSubShardLeader) { - DocCollection coll = zkController.getClusterState().getCollection(collection); - List<Node> subShardLeaders = getSubShardLeaders(coll, cloudDesc.getShardId(), cmd.getId(), null); - // the list<node> will actually have only one element for an add request - if (subShardLeaders != null && !subShardLeaders.isEmpty()) { - ModifiableSolrParams params = new ModifiableSolrParams(filterParams(req.getParams())); - params.set(DISTRIB_UPDATE_PARAM, DistribPhase.FROMLEADER.toString()); - params.set(DISTRIB_FROM, ZkCoreNodeProps.getCoreUrl( - zkController.getBaseUrl(), req.getCore().getName())); - params.set(DISTRIB_FROM_PARENT, cloudDesc.getShardId()); - cmdDistrib.distribDelete(cmd, subShardLeaders, params, true, null, null); - } - - final List<Node> nodesByRoutingRules = getNodesByRoutingRules(zkController.getClusterState(), coll, cmd.getId(), null); - if (nodesByRoutingRules != null && !nodesByRoutingRules.isEmpty()) { - ModifiableSolrParams params = new ModifiableSolrParams(filterParams(req.getParams())); - params.set(DISTRIB_UPDATE_PARAM, DistribPhase.FROMLEADER.toString()); - params.set(DISTRIB_FROM, ZkCoreNodeProps.getCoreUrl( - zkController.getBaseUrl(), req.getCore().getName())); - params.set(DISTRIB_FROM_COLLECTION, collection); - params.set(DISTRIB_FROM_SHARD, cloudDesc.getShardId()); - cmdDistrib.distribDelete(cmd, nodesByRoutingRules, params, true, null, null); - } - } - - if (nodes != null) { - ModifiableSolrParams params = new ModifiableSolrParams(filterParams(req.getParams())); - params.set(DISTRIB_UPDATE_PARAM, - (isLeader || isSubShardLeader ? DistribPhase.FROMLEADER.toString() - : DistribPhase.TOLEADER.toString())); - params.set(DISTRIB_FROM, ZkCoreNodeProps.getCoreUrl( - zkController.getBaseUrl(), req.getCore().getName())); - - if (req.getParams().get(UpdateRequest.MIN_REPFACT) != null) { - // TODO: Kept for rolling upgrades only. Remove in Solr 9 - params.add(UpdateRequest.MIN_REPFACT, req.getParams().get(UpdateRequest.MIN_REPFACT)); - } - cmdDistrib.distribDelete(cmd, nodes, params, false, rollupReplicationTracker, leaderReplicationTracker); - } + postProcessDeleteById(cmd); --- End diff -- I wonder if we actually need this postPorcessDeleteById(cmd) method... could the subclass put its logic after calling super.doDeleteById()?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org