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/main/java/org/elasticsearch/env/NodeEnvironment.java
Arrays.asList(
                        
                        MetadataStateFormat.STATE_DIR_NAME,
                        
                        INDICES_FOLDER,
                        
                        SNAPSHOT_CACHE_FOLDER
                    )
                );
                final Set<String> ignoredFileNames = new HashSet<>(
                    Arrays.asList(NODE_LOCK_FILENAME, TEMP_FILE_NAME, TEMP_FILE_NAME + ".tmp", TEMP_FILE_NAME + ".final")
                );
                try (DirectoryStream<Path> stream = Files.newDirectoryStream(legacyNodePath.path)) {
                    for (Path subFolderPath : stream) {
                        final String fileName = subFolderPath.getFileName().toString();
                        if (FileSystemUtils.isDesktopServicesStore(subFolderPath)) {
                            
                        } else if (FileSystemUtils.isAccessibleDirectory(subFolderPath, logger)) {
                            if (expectedFolderNames.contains(fileName) == false) {
                                throw new IllegalStateException(
                                    "unexpected folder encountered during data folder upgrade: " + subFolderPath
                                );
                            }
                            final Path targetSubFolderPath = nodePath.path.resolve(fileName);
                            if (Files.exists(targetSubFolderPath)) {
                                throw new IllegalStateException(
                                    "target folder already exists during data folder upgrade: " + targetSubFolderPath
                                );
                            }
                            folderNames.add(fileName);