Wrong 'Get object' response for multipart objects #142

Closed
opened 2024-09-11 11:57:50 +00:00 by nzinkevich · 2 comments
Member

When attempting to get an object, uploaded before as a multipart data, I receive JSON with parts list instead of object data:

Expected Behavior

Expect to receive whole object data, regardless of how exactly it was uploaded.

Current Behavior

Returns json with list of parts addresses.

[{"key":"","uploadId":"","number":1,"oid":{"value":"F/AR6g1rCbt+GNly5f6mYph6wNZld9jJYqf3WFpZpEo="},"size":6000000,"etag":"2a482d3b5cf5c47afd166a5ae751b0bd14945c3e5cb0f0ae8532656488c93924","md5":"a59837523a52d9cd52446d5b69400981","created":"2024-08-09T09:44:19Z"},{"key":"","uploadId":"","number":2,"oid":{"value":"NUvQihd8+11ZT4eqG4M9HtPiKnlbd+FITFSGqhc74OA="},"size":6000000,"etag":"08901b73678ac2918e552b6bdc50e84010551516e2094e29e56e17b26359f326","md5":"6617ea0baebd17fc4db759947b01ed1a","created":"2024-08-09T09:44:35Z"},{"key":"","uploadId":"","number":3,"oid":{"value":"jhowesqOSIM57miG/fE7vJDsD9fw9b1NThTtiAo+QJg="},"size":6000000,"etag":"77ae8dc6fc40ca49d31decb3d074f169a5f24dad5ad582018ddbc1a10d22c258","md5":"b5d69bc42e841bb29a7e0ef338ce307c","created":"2024-08-09T09:44:44Z"},{"key":"","uploadId":"","number":4,"oid":{"value":"bMPNwSTSlCcXiBpJP8IZxTnLn8MSzCbtAU7uE+uPjrw="},"size":5753207,"etag":"74c359834f6c5ae4ca075b2705a427ef23ed6bb0993eb30bb1e289a616d2c681","md5":"3b09c3e50796ae66c172b3333f83ad09","created":"2024-08-09T09:44:53Z"}]

Steps to Reproduce (for bugs)

  1. Put-object as a multipart data.
  2. Try to get it via http-gw:
    GET /get/testBucket/testFile
When attempting to get an object, uploaded before as a multipart data, I receive JSON with parts list instead of object data: ## Expected Behavior Expect to receive whole object data, regardless of how exactly it was uploaded. ## Current Behavior Returns json with list of parts addresses. ```json [{"key":"","uploadId":"","number":1,"oid":{"value":"F/AR6g1rCbt+GNly5f6mYph6wNZld9jJYqf3WFpZpEo="},"size":6000000,"etag":"2a482d3b5cf5c47afd166a5ae751b0bd14945c3e5cb0f0ae8532656488c93924","md5":"a59837523a52d9cd52446d5b69400981","created":"2024-08-09T09:44:19Z"},{"key":"","uploadId":"","number":2,"oid":{"value":"NUvQihd8+11ZT4eqG4M9HtPiKnlbd+FITFSGqhc74OA="},"size":6000000,"etag":"08901b73678ac2918e552b6bdc50e84010551516e2094e29e56e17b26359f326","md5":"6617ea0baebd17fc4db759947b01ed1a","created":"2024-08-09T09:44:35Z"},{"key":"","uploadId":"","number":3,"oid":{"value":"jhowesqOSIM57miG/fE7vJDsD9fw9b1NThTtiAo+QJg="},"size":6000000,"etag":"77ae8dc6fc40ca49d31decb3d074f169a5f24dad5ad582018ddbc1a10d22c258","md5":"b5d69bc42e841bb29a7e0ef338ce307c","created":"2024-08-09T09:44:44Z"},{"key":"","uploadId":"","number":4,"oid":{"value":"bMPNwSTSlCcXiBpJP8IZxTnLn8MSzCbtAU7uE+uPjrw="},"size":5753207,"etag":"74c359834f6c5ae4ca075b2705a427ef23ed6bb0993eb30bb1e289a616d2c681","md5":"3b09c3e50796ae66c172b3333f83ad09","created":"2024-08-09T09:44:53Z"}] ``` ## Steps to Reproduce (for bugs) 1. Put-object as a multipart data. 2. Try to get it via http-gw: ```GET /get/testBucket/testFile```
nzinkevich added this to the v0.30.2 milestone 2024-09-11 11:57:50 +00:00
nzinkevich added the
bug
label 2024-09-11 11:57:50 +00:00
nzinkevich removed this from the v0.30.2 milestone 2024-09-11 11:59:19 +00:00
nzinkevich was assigned by alexvanin 2024-09-11 12:02:27 +00:00
alexvanin added this to the v0.31.0 milestone 2024-09-11 12:03:07 +00:00
Owner

Payload fetching in s3-gw that support both regular and multipart objects:

func (n *Layer) initObjectPayloadReader(ctx context.Context, p getParams) (io.Reader, error) {

Payload fetching in s3-gw that support both regular and multipart objects: https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/commit/d919e6cce2ed5777c9e9cdc6e0ead6d69862cbbf/api/layer/object.go#L81
Owner

Done in #143

Done in https://git.frostfs.info/TrueCloudLab/frostfs-http-gw/pulls/143
alexvanin modified the milestone from v0.31.0 to v0.30.3 2024-10-18 09:25:35 +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-http-gw#142
No description provided.