ahmarsuhail commented on PR #7882:
URL: https://github.com/apache/hadoop/pull/7882#issuecomment-3320014995

   able to reproduce the issue outside of S3A. Basically did what would happen 
when you run a test in S3A:
   
   * a probe for the `test/` directory, and then create the `test/` directory, 
and then do the `headObject()` call. 
   
   The head fails, but if you comment out 
`requestChecksumCalculation(RequestChecksumCalculation.WHEN_REQUIRED)` it works 
again. 
   
   no idea what's going on. but have shared this local reproduction with SDK 
team. And rules out that it's something in the S3A code. 
   
   
   
   ```
   public class TestClass {
   
       S3Client s3Client;
   
       public TestClass() {
           this.s3Client = S3Client.builder().region(Region.US_EAST_1)
                   .addPlugin(LegacyMd5Plugin.create())
                   
.requestChecksumCalculation(RequestChecksumCalculation.WHEN_REQUIRED)
                   
.responseChecksumValidation(ResponseChecksumValidation.WHEN_SUPPORTED)
                   .overrideConfiguration(o -> o.retryStrategy(b -> 
b.maxAttempts(1)))
                   .build();
       }
   
   
       public void testS3Express(String bucket, String key) {
           s3Client.listObjectsV2(ListObjectsV2Request.builder()
                   .bucket("<>")
                   .maxKeys(2)
                   .prefix("test/")
                   .build());
   
   
           try {
               s3Client.headObject(HeadObjectRequest.builder().bucket("<>")
                       .key("test")
                       .build());
           } catch (Exception e) {
               System.out.println("Exception thrown: " + e.getMessage());
           }
   
           s3Client.putObject(PutObjectRequest
                   .builder()
                   .bucket("<>")
                   .key("test/").build(), RequestBody.empty());
   
           s3Client.headObject(HeadObjectRequest.builder().bucket("<>")
                   .key("<>")
                   .build());
       }
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to