During upgrades from 7.x to 8.x if a node was holding a frozen cache file, the system considers that as an unknown file and prevents starting the node:
```
java.lang.IllegalStateException: unexpected file/folder encountered during data folder upgrade: /app/data/nodes/0/shared_snapshot_cache
	at org.elasticsearch.env.NodeEnvironment.upgradeLegacyNodeFolders(NodeEnvironment.java:443) ~[elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:290) ~[elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.node.Node.<init>(Node.java:388) ~[elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.node.Node.<init>(Node.java:277) ~[elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234) ~[elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234) ~[elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:358) [elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166) [elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) [elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) [elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) [elasticsearch-cli-8.0.1.jar:8.0.1]
	at org.elasticsearch.cli.Command.main(Command.java:77) [elasticsearch-cli-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122) [elasticsearch-8.0.1.jar:8.0.1]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-8.0.1.jar:8.0.1]
```
These files are expected files and should be ignored/accepted during the data folder upgrade.
server/src/internalClusterTest/java/org/elasticsearch/env/NodeEnvironmentIT.java
ise = expectThrows(IllegalStateException.class, () -> internalCluster().startNode(dataPathSettings));
            assertThat(ise.getMessage(), containsString("unexpected file/folder encountered during data folder upgrade"));
            Files.delete(badFolderInNodesDir);
            final Path badFile = Files.createTempFile(randomFrom(dataPaths).resolve("nodes").resolve("0"), "bad", "file");
            ise = expectThrows(IllegalStateException.class, () -> internalCluster().startNode(dataPathSettings));
            assertThat(ise.getMessage(), containsString("unexpected file/folder encountered during data folder upgrade"));
            Files.delete(badFile);
            final Path badFolder = Files.createDirectories(randomFrom(dataPaths).resolve("nodes").resolve("0").resolve("bad-folder"));
            ise = expectThrows(IllegalStateException.class, () -> internalCluster().startNode(dataPathSettings));
            assertThat(ise.getMessage(), containsString("unexpected folder encountered during data folder upgrade"));
            Files.delete(badFolder);
            final Path randomDataPath = randomFrom(dataPaths);
            final Path conflictingFolder = randomDataPath.resolve("indices");
            final Path sourceFolder = randomDataPath.resolve("nodes").resolve("0").resolve("indices");
            if (Files.exists(sourceFolder) && Files.exists(conflictingFolder) == false) {
                Files.createDirectories(conflictingFolder);
                ise = expectThrows(IllegalStateException.class, () -> internalCluster().startNode(dataPathSettings));
                assertThat(ise.getMessage(), containsString("target folder already exists during data folder upgrade"));
                Files.delete(conflictingFolder);
            }
        }
        
        dataPaths.forEach(path -> assertTrue(Files.isDirectory(path.resolve("nodes"))));
        internalCluster().startNode(dataPathSettings);
        dataPaths.forEach(path -> assertTrue(Files.isRegularFile(path.resolve("nodes"))));
        assertEquals(nodeId, client().admin().cluster().prepareState().get().getState().nodes().getMasterNodeId());
        assertTrue(indexExists("test"));
        ensureYellow("test");
        assertHitCount(client().prepareSearch().setQuery(matchAllQuery()).get(), 1L);
    }