Skip to content

Commit 27c15f1

Browse files
Remove Unused Method from BlobStoreRepository (#46204) (#46593)
This method isn't used anymore and I forgot to delete it.
1 parent 8c9f15d commit 27c15f1

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java

-27
Original file line numberDiff line numberDiff line change
@@ -1332,31 +1332,4 @@ private static void failStoreIfCorrupted(Store store, Exception e) {
13321332
}
13331333
}
13341334
}
1335-
1336-
/**
1337-
* Checks if snapshot file already exists in the list of blobs
1338-
* @param fileInfo file to check
1339-
* @param blobs list of blobs
1340-
* @return true if file exists in the list of blobs
1341-
*/
1342-
private static boolean snapshotFileExistsInBlobs(BlobStoreIndexShardSnapshot.FileInfo fileInfo, Map<String, BlobMetaData> blobs) {
1343-
BlobMetaData blobMetaData = blobs.get(fileInfo.name());
1344-
if (blobMetaData != null) {
1345-
return blobMetaData.length() == fileInfo.length();
1346-
} else if (blobs.containsKey(fileInfo.partName(0))) {
1347-
// multi part file sum up the size and check
1348-
int part = 0;
1349-
long totalSize = 0;
1350-
while (true) {
1351-
blobMetaData = blobs.get(fileInfo.partName(part++));
1352-
if (blobMetaData == null) {
1353-
break;
1354-
}
1355-
totalSize += blobMetaData.length();
1356-
}
1357-
return totalSize == fileInfo.length();
1358-
}
1359-
// no file, not exact and not multipart
1360-
return false;
1361-
}
13621335
}

0 commit comments

Comments
 (0)