Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: rgw: use unique_ptr for flat_map emplace in BucketTrimWatche #52996

Merged
merged 1 commit into from Nov 15, 2023

Conversation

k0ste
Copy link
Contributor

@k0ste k0ste commented Aug 15, 2023

backport tracker: https://tracker.ceph.com/issues/59026


backport of #50346
parent tracker: https://tracker.ceph.com/issues/57938

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

@github-actions github-actions bot added the rgw label Aug 15, 2023
@github-actions github-actions bot added this to the pacific milestone Aug 15, 2023
When emplacing objects into the trim notify handler of
BucketTrimWatcher, use a unique_ptr for the handler so that it is
destroyed if the emplace fails.

Though the destructor is already called, this behaviour cannot be relied
upon. std::map does not exhibit the same behaviour, and would have
leaked memory had it been used instead.

Fixes: https://tracker.ceph.com/issues/57938
Signed-off-by: Vedansh Bhartia <vedanshbhartia@gmail.com>
(cherry picked from commit 43ef475)
@yuriw
Copy link
Contributor

yuriw commented Nov 15, 2023

jenkins test api

@yuriw yuriw merged commit 2343316 into ceph:pacific Nov 15, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants