mirror of https://github.com/apache/lucene.git
SOLR-4303: On replication, if the generation of the master is lower than the slave we need to force a full copy of the index.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1432993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
00221fd947
commit
64dee0264b
|
@ -516,6 +516,9 @@ Bug Fixes
|
|||
* SOLR-4217: post.jar no longer ignores -Dparams when -Durl is used.
|
||||
(Alexandre Rafalovitch, ehatcher)
|
||||
|
||||
* SOLR-4303: On replication, if the generation of the master is lower than the
|
||||
slave we need to force a full copy of the index. (Mark Miller, Gregg Donovan)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -370,8 +370,10 @@ public class SnapPuller {
|
|||
filesDownloaded = Collections.synchronizedList(new ArrayList<Map<String, Object>>());
|
||||
// if the generateion of master is older than that of the slave , it means they are not compatible to be copied
|
||||
// then a new index direcory to be created and all the files need to be copied
|
||||
boolean isFullCopyNeeded = IndexDeletionPolicyWrapper.getCommitTimestamp(commit) >= latestVersion || forceReplication;
|
||||
|
||||
boolean isFullCopyNeeded = IndexDeletionPolicyWrapper
|
||||
.getCommitTimestamp(commit) >= latestVersion
|
||||
|| commit.getGeneration() >= latestGeneration || forceReplication;
|
||||
|
||||
String tmpIdxDirName = "index." + new SimpleDateFormat(SnapShooter.DATE_FMT, Locale.ROOT).format(new Date());
|
||||
tmpIndex = createTempindexDir(core, tmpIdxDirName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue