[TEST] fix extrasFS file filtering in OldIndexUtils
This commit is contained in:
parent
4db1ac931f
commit
2ba4dadea0
|
@ -1825,7 +1825,7 @@ public class InternalEngineTests extends ESTestCase {
|
|||
assertEquals(Arrays.toString(tlogFiles), tlogFiles.length, 2); // ckp & tlog
|
||||
Path tlogFile = tlogFiles[0].getFileName().toString().endsWith("tlog") ? tlogFiles[0] : tlogFiles[1];
|
||||
final long size = Files.size(tlogFile);
|
||||
logger.info("upgrading index {} file: {} size: {}", indexName, tlogFiles[0].getFileName(), size);
|
||||
logger.debug("upgrading index {} file: {} size: {}", indexName, tlogFiles[0].getFileName(), size);
|
||||
Directory directory = newFSDirectory(src.resolve("0").resolve("index"));
|
||||
Store store = createStore(directory);
|
||||
final int iters = randomIntBetween(0, 2);
|
||||
|
|
|
@ -125,7 +125,7 @@ public class OldIndexUtils {
|
|||
} else {
|
||||
final List<Path> indexFolders = new ArrayList<>();
|
||||
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dataDir.resolve("0/indices"),
|
||||
(p) -> p.getFileName().startsWith("extra") == false)) { // extra FS can break this...
|
||||
(p) -> p.getFileName().toString().startsWith("extra") == false)) { // extra FS can break this...
|
||||
for (final Path path : stream) {
|
||||
indexFolders.add(path);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue