Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.qcloud.cos</groupId>
<artifactId>hadoop-cos</artifactId>
<version>8.3.27</version>
<version>8.3.28</version>
<packaging>jar</packaging>

<name>Apache Hadoop Tencent Cloud COS Support</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ private <X> Object innerCallWithRetry(X request) throws CosServiceException, IOE

// mpu might occur 503 access time out but already completed,
// if direct retry may occur 403 not found the upload id.
if (request instanceof CompleteMultipartUploadRequest && statusCode == 503) {
if (request instanceof CompleteMultipartUploadRequest && isServiceError(statusCode)) {
String key = ((CompleteMultipartUploadRequest) request).getKey();
FileMetadata fileMetadata = this.queryObjectMetadata(key);
if (null != fileMetadata) {
Expand Down Expand Up @@ -2116,6 +2116,10 @@ private boolean hasErrorCode(int statusCode, String errCode) {
return statusCode / 100 == 2 && errCode != null && !errCode.isEmpty();
}

private boolean isServiceError(int statusCode) {
return statusCode / 100 == 5;
}

public COSClient getCOSClient() {
return this.cosClient;
}
Expand Down