From 93b33b5fdb3dcb1d3840fb6537ede97592693c5c Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Fri, 22 Aug 2014 00:11:00 +0000 Subject: [PATCH] SOLR-4895: An error should be returned when a rollback is attempted in SolrCloud mode. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1619637 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 6 ++++++ .../java/org/apache/solr/update/DirectUpdateHandler2.java | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index b5e6c42a33b..acd77d32c98 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -112,6 +112,12 @@ Apache ZooKeeper 3.4.6 Detailed Change List ---------------------- +Bug Fixes +---------------------- + +* SOLR-4895: An error should be returned when a rollback is attempted in SolrCloud mode. + (Vamsee Yarlagadda via Mark Miller) + Other Changes --------------------- diff --git a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java index 9dff50e28df..f1cfbfdbdbf 100644 --- a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java +++ b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java @@ -670,6 +670,10 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState */ @Override public void rollback(RollbackUpdateCommand cmd) throws IOException { + if (core.getCoreDescriptor().getCoreContainer().isZooKeeperAware()) { + throw new UnsupportedOperationException("Rollback is currently not supported in SolrCloud mode. (SOLR-4895)"); + } + rollbackCommands.incrementAndGet(); boolean error=true;