mirror of https://github.com/apache/lucene.git
SOLR-8690: add solr.disableFingerprint system property
This commit is contained in:
parent
dfd95df2f1
commit
f47e6b2200
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue