Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
750 views
in Technique[技术] by (71.8m points)

redis incr失效并发问题

如果再并发环境中incr的key 失效了使用set从数据库导出数据填充,会导致数据缺失,如果把数据库的数据之间incrby数据会可能会导致数据过多,这个大佬们一般是怎么解决的


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

set的时候加锁,禁止incr


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...