Project

General

Profile

Actions

Bug #7246

closed

Remove counter workaround for #5692 on upgrade to rails 4.x

Added by Tomer Brisker over 9 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Rails
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Related issues 5 (0 open5 closed)

Related to Foreman - Bug #5692: Puppet environment counters not updatedClosedTomer Brisker05/13/2014Actions
Related to Foreman - Refactor #12485: Consider replacing Rails counter_cache with counter_culture gemRejected11/15/2015Actions
Related to Foreman - Tracker #3157: Rails 4.1 upgrade tasksClosed09/27/2013

Actions
Related to Foreman - Bug #10133: Massive db deadlocks in postgres from hosts_counter updates with counter_cache_fix.rbClosedTomer Brisker04/14/2015Actions
Blocked by Foreman - Feature #7230: Upgrade Ruby on Rails to 4.1ClosedDaniel Lobato Garcia08/22/2014Actions
Actions #1

Updated by Tomer Brisker over 9 years ago

  • Related to Bug #5692: Puppet environment counters not updated added
Actions #2

Updated by Tomer Brisker over 9 years ago

Actions #3

Updated by Ohad Levy over 9 years ago

  • translation missing: en.field_release set to 21
Actions #4

Updated by Ohad Levy over 9 years ago

  • translation missing: en.field_release deleted (21)
Actions #5

Updated by Tom Caspy about 9 years ago

this can't be removed if we want associations to be updated by the association_id setter.
we get this:

1) Failure:
DomainTest#test_0010_should update hosts_count on domain_id change [/Volumes/proj/foreman/test/unit/domain_test.rb:87]:
"domain.hosts_count" didn't change by 1.
Expected: 1
Actual: 0

when removing this patch.

Actions #6

Updated by Dominic Cleal over 8 years ago

  • Subject changed from Remove workaround for #5692 on upgrade to rails 4.x to Remove counter workaround for #5692 on upgrade to rails 4.x
  • Category set to Rails
Actions #7

Updated by Dominic Cleal over 8 years ago

Actions #8

Updated by Dominic Cleal over 8 years ago

Actions #9

Updated by Dominic Cleal over 8 years ago

Actions #10

Updated by Dominic Cleal over 8 years ago

  • Related to Refactor #12485: Consider replacing Rails counter_cache with counter_culture gem added
Actions #11

Updated by Dominic Cleal over 8 years ago

Actions #12

Updated by Dominic Cleal over 8 years ago

Actions #13

Updated by Dominic Cleal about 8 years ago

An issue remains in Rails 4 (4.1.14.1, 4.2.5 and master at the time of writing) where counters are double-counted on object reassignment, preventing this workaround from being removed still. Filed as https://github.com/rails/rails/issues/23265.

Unfortunately this means I think that counters are being updated three times on reassignment - twice by Rails and once by our workaround.

Actions #14

Updated by Tomer Brisker almost 8 years ago

  • Related to Bug #10133: Massive db deadlocks in postgres from hosts_counter updates with counter_cache_fix.rb added
Actions #15

Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Rejected

Cached counters were removed entirely in #12193, so this ticket is no longer applicable.

Actions

Also available in: Atom PDF