SOLR-9310: addressing the test failures in jenkins

This commit is contained in:
Noble Paul 2016-08-23 23:00:27 +05:30
parent 43ca5078bf
commit c6c3166bf5
1 changed files with 1 additions and 6 deletions

View File

@ -627,20 +627,15 @@ public class RealTimeGetComponent extends SearchComponent
UpdateLog ulog = req.getCore().getUpdateHandler().getUpdateLog();
if (ulog == null) return;
//get all available versions by default
long maxVersion = Long.MAX_VALUE;
// get fingerprint first as it will cause a soft commit
// and would avoid mismatch if documents are being actively index especially during PeerSync
if (doFingerprint) {
IndexFingerprint fingerprint = IndexFingerprint.getFingerprint(req.getCore(), Long.MAX_VALUE);
rb.rsp.add("fingerprint", fingerprint.toObject());
// if fingerprint is calculated, it makes sense to get only those versions
// which were used in computing the the fingerprint
maxVersion = fingerprint.getMaxVersionEncountered();
}
try (UpdateLog.RecentUpdates recentUpdates = ulog.getRecentUpdates()) {
List<Long> versions = recentUpdates.getVersions(nVersions, maxVersion);
List<Long> versions = recentUpdates.getVersions(nVersions);
rb.rsp.add("versions", versions);
}
}