From 06c13dee07157e745c16201d0005dc56c4fb4552 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Mon, 2 Mar 2015 13:00:48 +0100 Subject: [PATCH] Store: renameFilesSafe -> renameTempFilesSafe relates to #9933 --- src/main/java/org/elasticsearch/index/store/Store.java | 2 +- .../java/org/elasticsearch/indices/recovery/RecoveryStatus.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/store/Store.java b/src/main/java/org/elasticsearch/index/store/Store.java index 29f003f2437..7bb0a0dcb24 100644 --- a/src/main/java/org/elasticsearch/index/store/Store.java +++ b/src/main/java/org/elasticsearch/index/store/Store.java @@ -225,7 +225,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref * Renames all the given files form the key of the map to the * value of the map. All successfully renamed files are removed from the map in-place. */ - public void renameFilesSafe(Map tempFileMap) throws IOException { + public void renameTempFilesSafe(Map tempFileMap) throws IOException { // this works just like a lucene commit - we rename all temp files and once we successfully // renamed all the segments we rename the commit to ensure we don't leave half baked commits behind. final Map.Entry[] entries = tempFileMap.entrySet().toArray(new Map.Entry[tempFileMap.size()]); diff --git a/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java b/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java index 61d8175741b..cacd98005f9 100644 --- a/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java +++ b/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java @@ -140,7 +140,7 @@ public class RecoveryStatus extends AbstractRefCounted { /** renames all temporary files to their true name, potentially overriding existing files */ public void renameAllTempFiles() throws IOException { ensureRefCount(); - store.renameFilesSafe(tempFileNames); + store.renameTempFilesSafe(tempFileNames); } /**