Skip to content

rgw: skip re-sent part if previous attempt succeeded - #48695

Closed
trociny wants to merge 1 commit into
ceph:mainfrom
trociny:wip-44660
Closed

trociny wants to merge 1 commit into
ceph:mainfrom
trociny:wip-44660

Conversation

@trociny

@trociny trociny commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

If by some reason a client re-sent a part of multipart upload, the reference to the previously successfully uploaded part was lost and it ended up in orphans.

To avoid orphans skip the newly uploaded part if the previous attempt succeeded (the first that comes wins).

Fixes: https://tracker.ceph.com/issues/44660
Signed-off-by: Mykola Golub [email protected]

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

If by some reason a client re-sent a part of multipart upload,
the reference to the previously successfully uploaded part was lost
and it ended up in orphans.

To avoid orphans skip the newly uploaded part if the previous
attempt succeeded (the first that comes wins).

Fixes: https://tracker.ceph.com/issues/44660
Signed-off-by: Mykola Golub <[email protected]>
@github-actions github-actions Bot added the rgw label Nov 1, 2022
@trociny trociny added the DNM label Nov 1, 2022
@mattbenjamin
mattbenjamin requested a review from cbodley November 1, 2022 16:16
@mattbenjamin

Copy link
Copy Markdown
Contributor

does this generalize to all cases? work is ongoing that will do so

@mattbenjamin
mattbenjamin self-requested a review November 1, 2022 16:19
@trociny

trociny commented Nov 1, 2022 •

Copy link
Copy Markdown
Contributor Author

This is an attempt to fix https://tracker.ceph.com/issues/44660

It is not complete as it uses rados backend specific omap_get_vals_by_keys that does not support other backends. And the additional problem with the current omap_get_vals_by_keys that it uses sync rados call.

But before working on the improvement I would like to see what other people think about the approach. Does it look right?

@mattbenjamin

Copy link
Copy Markdown
Contributor

I don't think so, to be honest (but I appreciate the effort a lot, this defect has been around a long while). My proposed approach is to just use CLS to accumulate all generated part names for an uploaded part (#37260). Yixin Jin ( @yima77 ) came up with a revised version after reading my 2020 PR, and we've been working to combine the changes and finish the cleanup steps.

@trociny

trociny commented Nov 1, 2022

Copy link
Copy Markdown
Contributor Author

does this generalize to all cases? work is ongoing that will do so

@mattbenjamin I am not sure I understand the question. I was not aware someone had already been working on this. If it is true and there will be a more generic solution, I will be happy to close this PR.

@trociny

trociny commented Nov 1, 2022 •

Copy link
Copy Markdown
Contributor Author

I don't think so, to be honest (but I appreciate the effort a lot, this defect has been around a long while). My proposed approach is to just use CLS to accumulate all generated part names for an uploaded part (#37260). Yixin Jin ( @yima77 ) came up with a revised version after reading my 2020 PR, and we've been working to combine the changes and finish the cleanup steps.

Ah, great news! I was not aware of it. Then this PR may be closed.

@cbodley

cbodley commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

thanks @trociny

@cbodley cbodley closed this Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants