This project is archived and is in readonly mode.
counter_cache destroy concurrency issues
-
Dmitry Polushkin
You can also read about this bug on the ruby forum: http://www.ruby-forum.com/topic/...
Thanks, Dmitry from Estonia
-
Dmitry Polushkin
Attached patch. No tests yet.
-
Dmitry Polushkin
Fixed some stuff and written a test.
-
Dmitry Polushkin
- Tag changed from affected, before, concurrency, counter_cache, destroy, minus, negative, rows, synchronization to activerecord, affected, before, concurrency, counter_cache, destroy, minus, negative, patch, rows, synchronization
- Assigned user changed from Tarmo Tänav to DHH
-
Pratik
- Assigned user changed from DHH to Pratik
- State changed from new to wontfix
The patch doesn't really solve the actual issue as @affected_rows_destroy is just an instance variable of the AR object. Best way is to use AR provided locking mechanism.
Thanks.
-
Dmitry Polushkin
Pratik
Can you demonstrate how this could be done through locking mechanism?
Thanks
