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

Simplify the records iterator #76

Merged
merged 8 commits into from
Apr 16, 2019

Conversation

Ladas
Copy link
Contributor

@Ladas Ladas commented Apr 8, 2019

Simplify the iterator and allow it to run pure sql fetch (which will cause speedup). Make sure specs with this pass with serialized format too (there was a timestamp comparing change needed to pass all specs, since the pure SQL doesn't cast the timestamp for us)

Since everything is targeted, this is not used anymore.
And simplify the iterator, since we use just one branch now
To make sure we test all posibilities, we should test serialized
and deserialized persister
That should be enough for comparing changes and we will still
able to evaluate equality.
@Ladas Ladas changed the title Simplify the records iterator [WIP] Simplify the records iterator Apr 8, 2019
@miq-bot miq-bot added the wip label Apr 8, 2019
@Ladas Ladas changed the title [WIP] Simplify the records iterator Simplify the records iterator Apr 8, 2019
@Ladas Ladas added enhancement New feature or request performance and removed wip labels Apr 8, 2019
@Ladas Ladas force-pushed the simplify_the_records_iterator branch from 1f44fca to 30be1d4 Compare April 8, 2019 11:20
@@ -2,19 +2,11 @@ module InventoryRefresh
class ApplicationRecordIterator
attr_reader :inventory_collection, :manager_uuids_set, :iterator, :query
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ladas can @manager_uuids_set be deleted now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually are any of these ivars still used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@miq-bot
Copy link
Member

miq-bot commented Apr 16, 2019

Checked commits Ladas/inventory_refresh@86bf292~...604cd07 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
8 files checked, 5 offenses detected

lib/inventory_refresh/inventory_collection.rb

spec/persister/parallel_saving_spec.rb

  • ❗ - Line 15, Col 6 - Layout/IndentHash - Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
  • ❗ - Line 17, Col 4 - Layout/IndentHash - Indent the right brace the same as the start of the line where the left brace is.

spec/persister/sweep_inactive_records_spec.rb

@agrare agrare merged commit 84fa1f7 into ManageIQ:master Apr 16, 2019
d-m-u added a commit to d-m-u/inventory_refresh that referenced this pull request Jun 29, 2020
more core ext's on 4.1.0

update for update sake

https://github.com/ManageIQ/more_core_extensions/compare/179bf40..e5b4501
 - Added Ruby 2.7 support [[ManageIQ#79](ManageIQ/more_core_extensions#79)]
 - Added Process#pause, Process#resume, and Process#alive? [[ManageIQ#73](ManageIQ/more_core_extensions#73)]

array added * `#compact_map` - Collect non-nil results from the block
array added `#tabular_sort` - Sorts an Array of Hashes by specific columns

hierarchy added `#descendant_get` - Returns the descendant with a given name

the two breaking changes:
- **BREAKING**: Moved Object#descendant_get to Class#descendant_get [[ManageIQ#75](ManageIQ/more_core_extensions#75)]
- **BREAKING**: Removed deprecated Enumerable#stable_sort_by [[ManageIQ#76](ManageIQ/more_core_extensions#76)]

a minor header output change was made that hasn't been released yet to make tableize more markdown compliant

see ManageIQ/linux_admin#221
d-m-u added a commit to d-m-u/inventory_refresh that referenced this pull request Jul 14, 2020
more core ext's on 4.1.0

update for update sake

https://github.com/ManageIQ/more_core_extensions/compare/179bf40..e5b4501
 - Added Ruby 2.7 support [[ManageIQ#79](ManageIQ/more_core_extensions#79)]
 - Added Process#pause, Process#resume, and Process#alive? [[ManageIQ#73](ManageIQ/more_core_extensions#73)]

array added * `#compact_map` - Collect non-nil results from the block
array added `#tabular_sort` - Sorts an Array of Hashes by specific columns

hierarchy added `#descendant_get` - Returns the descendant with a given name

the two breaking changes:
- **BREAKING**: Moved Object#descendant_get to Class#descendant_get [[ManageIQ#75](ManageIQ/more_core_extensions#75)]
- **BREAKING**: Removed deprecated Enumerable#stable_sort_by [[ManageIQ#76](ManageIQ/more_core_extensions#76)]

a minor header output change was made that hasn't been released yet to make tableize more markdown compliant

see ManageIQ/linux_admin#221
agrare added a commit to agrare/inventory_refresh that referenced this pull request Feb 3, 2022
…s_iterator"

This reverts commit 84fa1f7, reversing
changes made to 334a945.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants