These are chat archives for ManageIQ/manageiq/performance

15th
Apr 2016
Keenan Brock
@kbrock
Apr 15 2016 00:28
our stupid count(*)
Host.where(nodes).to_sql
"SELECT \"hosts\".* FROM \"hosts\" WHERE (SELECT COUNT(*) FROM \"taggings\" WHERE \"taggings\".\"taggable_id\" = \"hosts\".\"id\" AND \"taggings\".\"taggable_type\" = 'Host' AND \"taggings\".\"tag_id\" IN (89, 90)) = 2"

Host.where(nodes).count # => 
*** TypeError Exception: Cannot visit Arel::SelectManager
Keenan Brock
@kbrock
Apr 15 2016 00:37
aah, it is a bug in ar_virtual. I can do this :)
  1) Classification with hierarchy should test assign multi entry to
     Failure/Error: return super if real.equal?(self)

     TypeError:
       Cannot visit Arel::SelectManager
# arel-7.0.0/lib/arel/visitors/visitor.rb:35:in `rescue in visit'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:62:in `binary'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:57:in `block in nary'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:57:in `each'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:57:in `nary'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:169:in `block in visit_Array'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:169:in `each'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:169:in `visit_Array'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:146:in `visit_Arel_Nodes_SelectCore'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:169:in `block in visit_Array'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:169:in `each'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:169:in `visit_Array'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:153:in `visit_Arel_Nodes_SelectStatement'
# arel-7.0.0/lib/arel/visitors/visitor.rb:29:in `visit'
# arel-7.0.0/lib/arel/visitors/depth_first.rb:12:in `visit'
# arel-7.0.0/lib/arel/visitors/visitor.rb:9:in `accept'
# arel-7.0.0/lib/arel/nodes/node.rb:56:in `each'
# rails-65246f9b1d8a/activerecord/lib/active_record/relation/calculations.rb:198:in `grep'
# rails-65246f9b1d8a/activerecord/lib/active_record/relation/calculations.rb:198:in `perform_calculation'
# rails-65246f9b1d8a/activerecord/lib/active_record/relation/calculations.rb:118:in `calculate'
# ./lib/extensions/ar_virtual.rb:335:in `calculate'
# rails-65246f9b1d8a/activerecord/lib/active_record/relation/calculations.rb:40:in `count'
# rails-65246f9b1d8a/activerecord/lib/active_record/relation.rb:285:in `empty?'
looks like a rails bug w/ grep (or maybe arel)...
Keenan Brock
@kbrock
Apr 15 2016 04:45
cool. have a work around and a fix for arel. will need to write tests and then push. think this has been a problem for many years
Dennis Metzger
@dmetzger57
Apr 15 2016 15:09
QE filed https://bugzilla.redhat.com/show_bug.cgi?id=1327563 indicating the beta2 appliance is getting heavily into swapping, I’m taking a look now
Keenan Brock
@kbrock
Apr 15 2016 15:09
thnx
Keenan Brock
@kbrock
Apr 15 2016 22:03
@matthewd enhance apply_legacy_finder_options to support arrays?
specifically order, limit, offset
@matthewd YAY - ManageIQ/manageiq#8000 is GREEN! :tada:
Keenan Brock
@kbrock
Apr 15 2016 22:10
And I'm almost as excited about ManageIQ/manageiq#8009 a very gnarley +34/-118