huaweicloud-sdk-java-obs icon indicating copy to clipboard operation
huaweicloud-sdk-java-obs copied to clipboard

删除对象返回204

Open lb1942 opened this issue 3 years ago • 2 comments

调用删除方法,成功删除文件,但返回结果中deleteMarker属性却一直是false,即使桶里没有被删除的文件 代码:DeleteObjectResult result = getObsClient().deleteObject(bucketName, fileName); 日志信息:2021-06-17 16:13:17 468|com.obs.services.internal.RestStorageService|tryRequest|421|Response for 'DELETE'. Content-Type: null, ResponseCode:204, Headers: Server: OBS 华为云问题反馈

lb1942 avatar Jun 17 '21 09:06 lb1942

deleteMarker是指标识删除的对象是否是删除标记 ,不能作为判断是否删除成功的标准;只要返回码code status 是20x,就表示删除成功;

noaccident avatar Oct 30 '23 12:10 noaccident

同样遇到这个问题,这里明显是个bug。 删除不存在的文件,返回204. 成功删除存在的文件,也返回204.

猜测是删除成功的后置事件又尝试去读取文件。

fclxyz avatar Jun 03 '24 06:06 fclxyz