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

Performance: Do not queue no-op destroy action #15080

Merged
merged 4 commits into from
May 16, 2017

Conversation

isimluk
Copy link
Member

@isimluk isimluk commented May 12, 2017

What?

  1. Avoid the queue overhead, i.e. worker_queue_lock, sql (insert, selects, updates, deletes) of this queue item

  2. Avoid the log overhead (lock, sync, etc).

  3. Profit

Previously we did this:

SQL (0.3ms)  INSERT INTO "miq_queue" ("priority", "method_name", "state", "created_on", "updated_on", "queue_name", "class_name", "args", "zone", "msg_timeout", "lock_version") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"  [["priority", 100], ["method_name", "destroy"], ["state", "ready"], ["created_on", 2017-05-12 12:48:26 UTC], ["updated_on", 2017-05-12 12:48:26 UTC], ["queue_name", "generic"], ["class_name", "MiqTask"], ["args", "---\n- []\n"], ["zone", "default"], ["msg_timeout", 600], ["lock_version", 0]]

Note this gets called quite often with empty ids. Just grep your logs ;-)

@isimluk isimluk changed the title Do not queue no-op destroy action Performance: Do not queue no-op destroy action May 12, 2017
@chessbyte chessbyte self-assigned this May 12, 2017
@chessbyte
Copy link
Member

@isimluk please fix failing tests

Avoid queue overhead.
IIRC, being explicit is philosophy of rspec and also unit testing in
general.
So it actually asserts for what is assumed (by comment).
@miq-bot
Copy link
Member

miq-bot commented May 16, 2017

Checked commits isimluk/manageiq@ff93136~...12e4b60 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@chessbyte chessbyte merged commit f4d9e5c into ManageIQ:master May 16, 2017
@chessbyte chessbyte added this to the Sprint 61 Ending May 22, 2017 milestone May 16, 2017
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