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

Perfomance fix for Object Storage Manager deletion #14009

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

aiperon
Copy link
Contributor

@aiperon aiperon commented Feb 21, 2017

Recently, the inventorying of S3 objects was merged to the master.
ManageIQ/manageiq-providers-amazon#123
Since a lot of objects could be stored on S3, user wouldn't be able to delete Amazon provider.

This fix allows destroying of storage manager with 40K objects in 40 seconds.

@roliveri please, review

@miq-bot add_label euwe/no, providers, providers/storage, performance

@miq-bot
Copy link
Member

miq-bot commented Feb 21, 2017

Checked commit xlab-si@9215caa with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks good. 🍪

@roliveri roliveri merged commit c96e6a3 into ManageIQ:master Feb 21, 2017
@roliveri roliveri added this to the Sprint 55 Ending Feb 27, 2017 milestone Feb 21, 2017
@Ladas
Copy link
Contributor

Ladas commented Feb 22, 2017

@aiperon @roliveri so, this has a funky side effect for the refresh. If there is :dependent => :destroy missing, the refresh saving code does not delete the missing objects.

It uses association.delete(deletes), where association is ems.cloud_object_store_objects

This affect only old refresh, not graph refresh

Ladas added a commit to Ladas/manageiq-providers-amazon that referenced this pull request Feb 22, 2017
Disabling a broken spec caused by
ManageIQ/manageiq#14009
@aiperon
Copy link
Contributor Author

aiperon commented Feb 22, 2017

@Ladas Should I fix this spec?

@Ladas
Copy link
Contributor

Ladas commented Feb 22, 2017

@aiperon @roliveri disabling the spec in ManageIQ/manageiq-providers-amazon#148, could you guys figure out the way to pass the spec? This might be even a rails bug, cause I would not expect this would be interconnected like this.

@Ladas
Copy link
Contributor

Ladas commented Feb 22, 2017

@aiperon if you know how? :-) I am disabling it for now, so it doesn't block the AWS, with the knowledge that the refresh will create zombies for OpenStack and AWS old refresh

@aiperon
Copy link
Contributor Author

aiperon commented Feb 22, 2017

So, we (or I) need to fix the old refresh.

@Ladas
Copy link
Contributor

Ladas commented Feb 22, 2017

It might be, it's something already fixed in Rails master :-)

The hack that would not require changing of the saving_code (not sure if we can, it's the shared one) would be doing disconnect_inv method that would call destroy, on the cloud_object_store_object model. Then it will not be calling the association.delete

@Ladas
Copy link
Contributor

Ladas commented Feb 22, 2017

it's ugly, but acceptable for me, given all ^ code will hopefully be deleted soon :-D @roliveri is that fine with you?

@roliveri
Copy link
Member

@Ladas That's OK with me.

@Ladas
Copy link
Contributor

Ladas commented Feb 22, 2017

@aiperon should I send the fix, or you are working on that?

@aiperon
Copy link
Contributor Author

aiperon commented Feb 23, 2017

@Ladas, please do it. I haven't worked on that yet.

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.

4 participants