Skip to content

Commit 6ff54c0

Browse files
authored
Add searchable snapshot cache folder to NodeEnvironment (elastic#66297)
1 parent fe54c2f commit 6ff54c0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

server/src/main/java/org/elasticsearch/env/NodeEnvironment.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ public String toString() {
181181
public static final String INDICES_FOLDER = "indices";
182182
public static final String NODE_LOCK_FILENAME = "node.lock";
183183

184+
/**
185+
* Searchable snapshot's Lucene index directory.
186+
*/
187+
private static final String SNAPSHOT_CACHE_FOLDER = "snapshot_cache";
188+
184189
public static class NodeLock implements Releasable {
185190

186191
private final Lock[] locks;
@@ -381,7 +386,11 @@ private static boolean upgradeLegacyNodeFolders(Logger logger, Settings settings
381386
MetadataStateFormat.STATE_DIR_NAME,
382387

383388
// indices
384-
INDICES_FOLDER));
389+
INDICES_FOLDER,
390+
391+
// searchable snapshot cache Lucene index
392+
SNAPSHOT_CACHE_FOLDER
393+
));
385394

386395
try (DirectoryStream<Path> stream = Files.newDirectoryStream(legacyNodePath.path)) {
387396
for (Path subFolderPath : stream) {

0 commit comments

Comments
 (0)