Incorrect behavior on UploadPart when a part already exists #197

Closed
opened 2022-01-18 16:32:41 +00:00 by quentin · 1 comment
Owner

The doc says we (silently) overwrite:

If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten.

https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html

We fail with BadRequest:

	// Check part hasn't already been uploaded
	if let Some(v) = version {
		if v.has_part_number(part_number) {
			return Err(Error::BadRequest(format!(
				"Part number {} has already been uploaded",
				part_number
			)));
		}
	}

https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/s3_put.rs#L452-L460

The doc says we (silently) overwrite: > If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten. https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html We fail with BadRequest: ```rust // Check part hasn't already been uploaded if let Some(v) = version { if v.has_part_number(part_number) { return Err(Error::BadRequest(format!( "Part number {} has already been uploaded", part_number ))); } } ``` https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/s3_put.rs#L452-L460
quentin added the
Low priority
S3 Compatibility
labels 2022-01-18 16:32:41 +00:00
Owner

Closing in favor of #204

Closing in favor of #204
lx closed this issue 2022-01-25 11:26:12 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#197
No description provided.