Store: renameFilesSafe -> renameTempFilesSafe

relates to #9933
This commit is contained in:
Boaz Leskes 2015-03-02 13:00:48 +01:00
parent 9d99289074
commit 06c13dee07
2 changed files with 2 additions and 2 deletions

View File

@ -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 * 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. * value of the map. All successfully renamed files are removed from the map in-place.
*/ */
public void renameFilesSafe(Map<String, String> tempFileMap) throws IOException { public void renameTempFilesSafe(Map<String, String> tempFileMap) throws IOException {
// this works just like a lucene commit - we rename all temp files and once we successfully // 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. // renamed all the segments we rename the commit to ensure we don't leave half baked commits behind.
final Map.Entry<String, String>[] entries = tempFileMap.entrySet().toArray(new Map.Entry[tempFileMap.size()]); final Map.Entry<String, String>[] entries = tempFileMap.entrySet().toArray(new Map.Entry[tempFileMap.size()]);

View File

@ -140,7 +140,7 @@ public class RecoveryStatus extends AbstractRefCounted {
/** renames all temporary files to their true name, potentially overriding existing files */ /** renames all temporary files to their true name, potentially overriding existing files */
public void renameAllTempFiles() throws IOException { public void renameAllTempFiles() throws IOException {
ensureRefCount(); ensureRefCount();
store.renameFilesSafe(tempFileNames); store.renameTempFilesSafe(tempFileNames);
} }
/** /**