smartxia's recent timeline updates
smartxia

smartxia

V2EX member #558577, joined on 2021-10-15 17:16:42 +08:00
smartxia's recent replies
Mar 20, 2023
Replied to a topic by smartxia Java 支付系统的并发处理方式
@kkk1234567 用户之间也有资金来往,此时管理员也有可能在发钱,所以这种方案不太好弄;我们这个给用户分组了,有可能同一个用户在不同组。
Mar 20, 2023
Replied to a topic by smartxia Java 支付系统的并发处理方式
这个系统有个中央仓库的概念,用户的钱都是来自这个仓库的,存在多个管理员并发操作的问题;给多个用户发钱的时候,有可能业务没处理完,有其他管理员操作导致余额不一致吧
Mar 20, 2023
Replied to a topic by smartxia Java 支付系统的并发处理方式
感谢各位大佬回复。我们讨论了 2 种方案,觉得 redis 的公平锁实现比较复杂,怕以后纠错追溯麻烦;乐观锁的,要考虑到重试时同一个事务读取的还是旧值,所以改了隔离级别,实现上比 redis 公平锁简单点,可能需要开发尽量缩小事务代码
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2389 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 11:32 · PVG 19:32 · LAX 04:32 · JFK 07:32
♥ Do have faith in what you're doing.