You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2016/02/25 02:57:42 UTC
[22/50] [abbrv] lucene-solr git commit: SOLR-8690: add
solr.disableFingerprint system property
SOLR-8690: add solr.disableFingerprint system property
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f47e6b22
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f47e6b22
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f47e6b22
Branch: refs/heads/jira/SOLR-445
Commit: f47e6b220066565cd7741ac76b75b9eb56091b87
Parents: dfd95df
Author: yonik <yo...@apache.org>
Authored: Mon Feb 22 12:41:30 2016 -0500
Committer: yonik <yo...@apache.org>
Committed: Mon Feb 22 12:44:30 2016 -0500
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
solr/core/src/java/org/apache/solr/update/PeerSync.java | 2 +-
solr/core/src/test/org/apache/solr/update/PeerSyncTest.java | 8 ++++++++
3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f47e6b22/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6f6133f..f005ae8 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -294,6 +294,9 @@ Other Changes
* SOLR-8711: Upgrade Carrot2 clustering dependency to 3.12.0. (Dawid Weiss)
+* SOLR-8690: Make peersync fingerprinting optional with solr.disableFingerprint system
+ property. (yonik)
+
======================= 5.5.0 =======================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f47e6b22/solr/core/src/java/org/apache/solr/update/PeerSync.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/PeerSync.java b/solr/core/src/java/org/apache/solr/update/PeerSync.java
index ea71783..a1ef5f4 100644
--- a/solr/core/src/java/org/apache/solr/update/PeerSync.java
+++ b/solr/core/src/java/org/apache/solr/update/PeerSync.java
@@ -140,7 +140,7 @@ public class PeerSync {
this.maxUpdates = nUpdates;
this.cantReachIsSuccess = cantReachIsSuccess;
this.getNoVersionsIsSuccess = getNoVersionsIsSuccess;
- this.doFingerprint = doFingerprint;
+ this.doFingerprint = doFingerprint && !("true".equals(System.getProperty("solr.disableFingerprint")));
this.client = core.getCoreDescriptor().getCoreContainer().getUpdateShardHandler().getHttpClient();
this.onlyIfActive = onlyIfActive;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f47e6b22/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java b/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
index bcaf846..64edd21 100644
--- a/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
+++ b/solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
@@ -181,6 +181,14 @@ public class PeerSyncTest extends BaseDistributedSearchTestCase {
// client0 now has an additional add beyond our window and the fingerprint should cause this to fail
assertSync(client1, numVersions, false, shardsArr[0]);
+ // if we turn of fingerprinting, it should succeed
+ System.setProperty("solr.disableFingerprint", "true");
+ try {
+ assertSync(client1, numVersions, true, shardsArr[0]);
+ } finally {
+ System.clearProperty("solr.disableFingerprint");
+ }
+
// lets add the missing document and verify that order doesn't matter
add(client1, seenLeader, sdoc("id",Integer.toString((int)v),"_version_",v));
assertSync(client1, numVersions, true, shardsArr[0]);