Closed prognostikos closed 4 years ago
https://github.com/RubyMoney/eu_central_bank/blob/b413b1c3dfbbc0146cbaa4de935eed8e8fc6fbd3/lib/money/rates_store/store_with_historical_data_support.rb#L13-L33 is horribly broken.
As soon as @in_transaction = true
is set, any other thread can enter in the block without synchronisation.
If result = block.call
raises an exception, @in_transaction = false
is never called.
I'm not even sure when options[:without_mutex]
is valid (semantically) or how the user should even know that during the construction of the store.
@ioquatix It would be helpful to know if you found any alternative.
@shailesh-kalamkar An alternative to what?
@ioquatix An alternative to this gem which is using the same API. Basically, would like to know how did you overcome the issue?
Thanks.
@shailesh-kalamkar https://github.com/ioquatix/latinum - it doesn't support the same interface (for good reasons), but it's pretty similar.
Thank you so much.
Sorry about this, 6.13.6 is now available that include a fix for this regression
Sorry again, just published eu_central_bank 1.5.0 that should finally fix this and rely on a thread-safe implementation of the superclass for synchronisation
Please ping me if you are still having issues with it
@antstorm great work!
Seems that this gem isn't compatible with the latest money version (6.13.5)
This looks like the change that causes the problem: https://github.com/RubyMoney/money/pull/898/files#diff-70409fffc5690f30fb7495abab7a7dbfL103