-
To ensure the accuracy of wallet balances under high concurrency, are optimistic locking or pessimistic locking used when updating wallet balances? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello. It depends on the cache and lock settings. If you leave array, then there will be no locks. I recommend using redis sentinel for cache and lock. But you can use a database for cache, then you will get full-fledged transactions at the database level. laravel-wallet/config/config.php Lines 65 to 79 in 9b0bd38 Hm. It will be necessary to add a functional test for the database as cache... Thank you) |
Beta Was this translation helpful? Give feedback.
Hello. It depends on the cache and lock settings. If you leave array, then there will be no locks.
I recommend using redis sentinel for cache and lock. But you can use a database for cache, then you will get full-fledged transactions at the database level.
laravel-wallet/config/config.php
Lines 65 to 79 in 9b0bd38