File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3 Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -884,11 +884,10 @@ public void compareAndExchangeRegister(
884884 logger .trace (() -> Strings .format ("[%s]: compareAndExchangeRegister failed" , key ), e );
885885 if (e instanceof AmazonS3Exception amazonS3Exception
886886 && (amazonS3Exception .getStatusCode () == 404
887- || amazonS3Exception .getStatusCode () == 0 && "NoSuchUpload" .equals (amazonS3Exception .getErrorCode ()))) {
887+ || amazonS3Exception .getStatusCode () == 200 && "NoSuchUpload" .equals (amazonS3Exception .getErrorCode ()))) {
888888 // An uncaught 404 means that our multipart upload was aborted by a concurrent operation before we could complete it.
889889 // Also (rarely) S3 can start processing the request during a concurrent abort and this can result in a 200 OK with an
890- // <Error><Code>NoSuchUpload</Code>... in the response, which the SDK translates to status code 0. Either way, this means
891- // that our write encountered contention:
890+ // <Error><Code>NoSuchUpload</Code>... in the response. Either way, this means that our write encountered contention:
892891 delegate .onResponse (OptionalBytesReference .MISSING );
893892 } else {
894893 delegate .onFailure (e );
Original file line number Diff line number Diff line change @@ -474,6 +474,3 @@ tests:
474474- class : org.elasticsearch.xpack.test.rest.XPackRestIT
475475 method : test {p0=snapshot/10_basic/Create a source only snapshot and then restore it}
476476 issue : https://github.com/elastic/elasticsearch/issues/122755
477- - class : org.elasticsearch.repositories.blobstore.testkit.analyze.S3RepositoryAnalysisRestIT
478- method : testRepositoryAnalysis
479- issue : https://github.com/elastic/elasticsearch/issues/122799
You can’t perform that action at this time.
0 commit comments