From d49a6584662d9213eba156badfea669f4c52e7c5 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Sun, 1 Sep 2019 09:23:12 +0200 Subject: [PATCH] Remove Unused Method from BlobStoreRepository (#46204) This method isn't used anymore and I forgot to delete it. --- .../blobstore/BlobStoreRepository.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java b/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java index 9d32cc61d421b..d88068cf6cf51 100644 --- a/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java +++ b/server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java @@ -1304,31 +1304,4 @@ private static void failStoreIfCorrupted(Store store, Exception e) { } } } - - /** - * Checks if snapshot file already exists in the list of blobs - * @param fileInfo file to check - * @param blobs list of blobs - * @return true if file exists in the list of blobs - */ - private static boolean snapshotFileExistsInBlobs(BlobStoreIndexShardSnapshot.FileInfo fileInfo, Map blobs) { - BlobMetaData blobMetaData = blobs.get(fileInfo.name()); - if (blobMetaData != null) { - return blobMetaData.length() == fileInfo.length(); - } else if (blobs.containsKey(fileInfo.partName(0))) { - // multi part file sum up the size and check - int part = 0; - long totalSize = 0; - while (true) { - blobMetaData = blobs.get(fileInfo.partName(part++)); - if (blobMetaData == null) { - break; - } - totalSize += blobMetaData.length(); - } - return totalSize == fileInfo.length(); - } - // no file, not exact and not multipart - return false; - } }