HoustonPutman commented on a change in pull request #271:
URL: https://github.com/apache/solr/pull/271#discussion_r695978425



##########
File path: 
solr/contrib/s3-repository/src/java/org/apache/solr/s3/S3StorageClient.java
##########
@@ -253,17 +256,20 @@ void deleteDirectory(String path) throws S3Exception {
    * @return true if path exists, otherwise false?
    */
   boolean pathExists(String path) throws S3Exception {
-    path = sanitizedPath(path);
+    final String s3Path = sanitizedPath(path);
 
     // for root return true
-    if (path.isEmpty() || S3_FILE_PATH_DELIMITER.equals(path)) {
+    if (s3Path.isEmpty() || S3_FILE_PATH_DELIMITER.equals(s3Path)) {
       return true;
     }
 
     try {
-      return s3Client.doesObjectExist(bucketName, path);
-    } catch (AmazonClientException ase) {
-      throw handleAmazonException(ase);
+      s3Client.headObject(builder -> builder.bucket(bucketName).key(s3Path));

Review comment:
       Yeah it's unfortunate 😞 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to