Project

General

Profile

Refactor #12485

Consider replacing Rails counter_cache with counter_culture gem

Added by Tomer Brisker over 4 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

counter_culture provides more powerful cached counters and better deadlock handling then Rails counter_cache.
We should consider migrating all our counters to use it.
I recommend this be considered if needed after changing to rails 4.x which does a slightly better job of handling counters.
The reason not to do so right away is that this introduces a fairly complex gem as dependency, which is not very actively developed, and might lead to other issues then the ones we are currently facing (deadlocks, creating complex counting logic for some counters)


Related issues

Related to Foreman - Bug #7246: Remove counter workaround for #5692 on upgrade to rails 4.xRejected2014-08-25
Blocked by Foreman - Feature #7230: Upgrade Ruby on Rails to 4.1Closed2014-08-22

History

#1 Updated by Tomer Brisker over 4 years ago

#2 Updated by Tom Caspy over 4 years ago

don't. counter culture never ever works... specially when you have complex stuff like we do

#3 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #7246: Remove counter workaround for #5692 on upgrade to rails 4.x added

#4 Updated by Dominic Cleal almost 4 years ago

  • Status changed from New to Rejected

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

Also available in: Atom PDF