Github user barrotsteindev commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/528#discussion_r241949194
--- 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 --
Well I could try,
I didn't want to introduce too many changes to the logic. Would changing
this and letting the full sold test suite run be of assurance that the change
is safe?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]