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

Optimize number of transactions sent in refresh #14670

Merged

Commits on Apr 6, 2017

  1. Check for dirty records in save_inventory

    Allow save inventory to skip starting a transaction if the record being
    saved was not actually changed by the provider's inventory data.
    
    VMs and Storages still directly call `update_attributes!`.  At the
    moment, it doesn't seem like those object counts are limiting factors.
    If that changes, we can look at applying the same change there.
    blomquisg authored and Ladas committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    8ad0ac2 View commit details
    Browse the repository at this point in the history
  2. Do not do a blank transaction if the record hasn't changed

    Do not do a blank transaction if the record hasn't changed,
    becaiuse it causes extra 2 queries, transaction BEGIN and END
    Ladas committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    4afb8a4 View commit details
    Browse the repository at this point in the history
  3. Wrap updating&deleting in 1 big transaction

    Wrap updating&deleting in 1 big transaction. Doing transaction per
    update is expensive, since we do BEGIN, update, END, so 3 queries
    per one updateand the same for delete. With remote DB, this will
    add a lot of processing time.
    Ladas committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    1ae950e View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2017

  1. Add a comment about rails issue causing nil transaction

    Add a comment about rails issue causing nil transaction
    Ladas committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    77147eb View commit details
    Browse the repository at this point in the history
  2. Do a transaction only if there are items to be deleted

    Do a transaction only if there are items to be deleted, to
    avoind empty transactions.
    Ladas committed Apr 7, 2017
    Configuration menu
    Copy the full SHA
    2b2862e View commit details
    Browse the repository at this point in the history