Limit the number of object to delete at one time #37

Closed
opened 2023-02-20 09:44:59 +00:00 by KirillovDenis · 1 comment
KirillovDenis commented 2023-02-20 09:44:59 +00:00 (Migrated from github.com)

According to spec we shouldn't be able to delete more than 1000 objects.
So we should support this limitation.
We can add something like this:

	if len(requested.Objects) > 1000 {
		h.logAndSendError(w, "object limit exceeded", reqInfo, errors.GetAPIError(errors.ErrBadRequest))
		return
	}

here

Also, this fix the following ceph tests:

  • multi_object_delete_key_limit
  • multi_objectv2_delete_key_limit
According to [spec](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html) we shouldn't be able to delete more than 1000 objects. So we should support this limitation. We can add something like this: ``` if len(requested.Objects) > 1000 { h.logAndSendError(w, "object limit exceeded", reqInfo, errors.GetAPIError(errors.ErrBadRequest)) return } ``` [here](https://github.com/TrueCloudLab/frostfs-s3-gw/blob/3ab77c8990d02abf8a041a3f46abfe7a8964c21f/api/handler/delete.go#L178) Also, this fix the following ceph tests: * `multi_object_delete_key_limit` * `multi_objectv2_delete_key_limit`
dkirillov was assigned by alexvanin 2023-03-07 06:44:36 +00:00
Owner

Done in #38

Done in #38
alexvanin added this to the v0.27.0 milestone 2023-07-12 08:51:12 +00:00
Sign in to join this conversation.
No milestone
No project
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: TrueCloudLab/frostfs-s3-gw#37
No description provided.