diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 18ca2fa7f4a..d08bab74d49 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -283,6 +283,10 @@ Bug Fixes * SOLR-13677: All Metrics Gauges should be unregistered by components that registered them. (noble, ab) +* SOLR-13855: DistributedZkUpdateProcessor should have been propagating URP.finish() lifecycle like it used to before + 8.1 (a regression). Impacts integrity since Run URP's finish() propagates this to the updateLog to fsync. + (David Smiley) + Other Changes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java index 5e04077fb39..72021b17b27 100644 --- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java +++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java @@ -1089,15 +1089,17 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { } @Override - public void finish() throws IOException { - assertNotFinished(); + public final void finish() throws IOException { + assert ! finished : "lifecycle sanity check"; + finished = true; + + doDistribFinish(); super.finish(); } - protected void assertNotFinished() { - assert ! finished : "lifecycle sanity check"; - finished = true; + protected void doDistribFinish() throws IOException { + // no-op for derived classes to implement } /** diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java index a76b6be2aac..569f877bb88 100644 --- a/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java +++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java @@ -1045,17 +1045,10 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor { super.processRollback(cmd); } - @Override - public void finish() throws IOException { + // TODO: optionally fail if n replicas are not reached... + protected void doDistribFinish() { clusterState = zkController.getClusterState(); - assertNotFinished(); - - doFinish(); - } - - // TODO: optionally fail if n replicas are not reached... - private void doFinish() { boolean shouldUpdateTerms = isLeader && isIndexChanged; if (shouldUpdateTerms) { ZkShardTerms zkShardTerms = zkController.getShardTerms(cloudDesc.getCollectionName(), cloudDesc.getShardId()); @@ -1195,6 +1188,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor { if (0 < errorsForClient.size()) { throw new DistributedUpdatesAsyncException(errorsForClient); } + } /**