Przeglądaj źródła

[PLUGIN] Don't use atomic move when installing plugin

the extract location might be on a different filesystem where
atomic move won't work. Yet this operation is not critical in terms
of visibility so there is no need to do this.
Simon Willnauer 11 lat temu
rodzic
commit
921e028e99

+ 1 - 1
src/main/java/org/elasticsearch/plugins/PluginManager.java

@@ -243,7 +243,7 @@ public class PluginManager {
             if (Files.exists(toLocation)) {
                 IOUtils.rm(toLocation);
             }
-            Files.move(binFile, toLocation, StandardCopyOption.ATOMIC_MOVE);
+            Files.move(binFile, toLocation);
             if (Files.getFileStore(toLocation).supportsFileAttributeView(PosixFileAttributeView.class)) {
                 final Set<PosixFilePermission> perms = new HashSet<>();
                 perms.add(PosixFilePermission.OWNER_EXECUTE);