当前位置:网站首页>解决异步接口慢导致的数据错乱问题
解决异步接口慢导致的数据错乱问题
2022-07-04 20:47:00 【暴躁李子 在线摆烂】
bug场景复现
通过下拉框筛选表格数据
快速筛选或者第一次筛选后,在数据还没返回来的时候马上又切换下拉框 筛选结果和筛选关键字不匹配
查看后端的接口 返回数据无误 基本可以判断是慢接口请求的问题
由于前一次请求服务器返回数据比较慢,还没等第一次请求返回结果,后一次请求就发起了,并且迅速返回了结果,这时表格肯定显示后一次的结果;
过了几秒,第一次请求的结果才返回,这时表格的数据又被第一次请求的结果覆盖 导致筛选结果和筛选关键字不匹配
最终导致了这个bug
最直观的方案就是再发起第二次请求之后,如果第一次请求未返回,那就直接取消这次请求,使用第二次请求的返回结果。
边栏推荐
- Difference between ApplicationContext and beanfactory (MS)
- How was MP3 born?
- redis事务
- [early knowledge of activities] list of recent activities of livevideostack
- Daily question -leetcode1200- minimum absolute difference - array - sort
- 吐槽 B 站收费,是怪它没钱么?
- 历史最全混合专家(MOE)模型相关精选论文、系统、应用整理分享
- Huawei ENSP simulator realizes communication security (switch)
- numpy vstack 和 column_stack
- 杰理之AD 系列 MIDI 功能说明【篇】
猜你喜欢
应用实践 | 蜀海供应链基于 Apache Doris 的数据中台建设
【C語言】符號的深度理解
Difference between ApplicationContext and beanfactory (MS)
Master the use of auto analyze in data warehouse
Compréhension approfondie du symbole [langue C]
华为ensp模拟器 DNS服务器的配置
Huawei ENSP simulator layer 3 switch
WGCNA分析基本教程总结
TCP shakes hands three times and waves four times. Do you really understand?
Billions of citizens' information has been leaked! Is there any "rescue" for data security on the public cloud?
随机推荐
Day24: file system
Why does invariant mode improve performance
Configuration of DNS server of Huawei ENSP simulator
How was MP3 born?
WGCNA analysis basic tutorial summary
【C语言】符号的深度理解
MP3是如何诞生的?
redis RDB AOF
EhLib 数据库记录的下拉选择
Golang interview finishing three resumes how to write
Jerry's ad series MIDI function description [chapter]
Redis bloom filter
2021 CCPC 哈尔滨 B. Magical Subsequence(思维题)
Huawei ENSP simulator configures ACL access control list
How was MP3 born?
CloudCompare&Open3D DBSCAN聚类(非插件式)
华为ensp模拟器实现通信安全(交换机)
华为ensp模拟器 三层交换机
redis03——Redis的网络配置与心跳机制
TCP shakes hands three times and waves four times. Do you really understand?