Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点赞线程安全问题 #68

Open
winter1215 opened this issue Nov 8, 2023 · 2 comments
Open

点赞线程安全问题 #68

winter1215 opened this issue Nov 8, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@winter1215
Copy link

bug描述

连续多次的点击点赞按钮会出现点赞数跳动的bug

复现

bug复现步骤:
连续多次的点击点赞按钮

bug产生原因(若您已发现具体的bug产生原因,请直接贴上,也可以提merge进行修复)

可能是点赞代码块没有做线程安全的控制,可能使用 synconized(userId) { vote code }会解决此问题

@winter1215 winter1215 added the bug Something isn't working label Nov 8, 2023
@z15511002058
Copy link

我猜跟后台没关系纯前端问题 点赞接口没有返回点赞后的数量 如果不刷新页面的话点赞数值只会在第一次加载页面时从后台获取 所以我推测跟后台完全没关系

@winter1215
Copy link
Author

建议仔细阅读issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants