Adapt SearchableSnapshotsBlobStoreCacheIntegTests to Lucene 8.7.0 (#61989) (#62030)

Elasticsearch now uses #61957 which includes https://issues.apache.org/jira/browse/LUCENE-9456. 
We can remove the corresponding //TODO in SearchableSnapshotsBlobStoreCacheIntegTests.
This commit is contained in:
Tanguy Leroux 2020-09-07 10:25:44 +02:00 committed by GitHub
parent 0c8b438577
commit ebbf4df9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -217,12 +217,8 @@ public class SearchableSnapshotsBlobStoreCacheIntegTests extends BaseSearchableS
new SearchableSnapshotsStatsRequest()
).actionGet().getStats()) {
for (final SearchableSnapshotShardStats.CacheIndexInputStats indexInputStats : shardStats.getStats()) {
final boolean mayReadMoreThanHeader
// we read the header of each file contained within the .cfs file, which could be anywhere
= indexInputStats.getFileName().endsWith(".cfs")
// we read a couple of longs at the end of the .fdt file (see https://issues.apache.org/jira/browse/LUCENE-9456)
// TODO revisit this when this issue is addressed in Lucene
|| indexInputStats.getFileName().endsWith(".fdt");
final boolean mayReadMoreThanHeader = indexInputStats.getFileName().endsWith(".cfs");
if (indexInputStats.getFileLength() <= BlobStoreCacheService.DEFAULT_CACHED_BLOB_SIZE * 2
|| mayReadMoreThanHeader == false) {
assertThat(Strings.toString(indexInputStats), indexInputStats.getBlobStoreBytesRequested().getCount(), equalTo(0L));