当前位置:网站首页>解决异步接口慢导致的数据错乱问题
解决异步接口慢导致的数据错乱问题
2022-07-04 20:47:00 【暴躁李子 在线摆烂】
bug场景复现
通过下拉框筛选表格数据
快速筛选或者第一次筛选后,在数据还没返回来的时候马上又切换下拉框 筛选结果和筛选关键字不匹配
查看后端的接口 返回数据无误 基本可以判断是慢接口请求的问题
由于前一次请求服务器返回数据比较慢,还没等第一次请求返回结果,后一次请求就发起了,并且迅速返回了结果,这时表格肯定显示后一次的结果;
过了几秒,第一次请求的结果才返回,这时表格的数据又被第一次请求的结果覆盖 导致筛选结果和筛选关键字不匹配
最终导致了这个bug
最直观的方案就是再发起第二次请求之后,如果第一次请求未返回,那就直接取消这次请求,使用第二次请求的返回结果。
边栏推荐
- Jerry's ad series MIDI function description [chapter]
- Compréhension approfondie du symbole [langue C]
- [buuctf.reverse] 151_ [FlareOn6]DnsChess
- Kubeadm初始化报错:[ERROR CRI]: container runtime is not running
- Huawei ENSP simulator configures ACL access control list
- Redis pipeline
- 杰理之AD 系列 MIDI 功能说明【篇】
- Delphi SOAP WebService 服务器端多个 SoapDataModule 实现相同的接口方法,接口继承
- torch. Tensor and torch The difference between tensor
- Difference between ApplicationContext and beanfactory (MS)
猜你喜欢

ApplicationContext 与 BeanFactory 区别(MS)

【C语言】符号的深度理解

Enlightenment of maker thinking in Higher Education

华为ensp模拟器 DNS服务器的配置

LambdaQueryWrapper用法

华为ensp模拟器 三层交换机

Stealing others' vulnerability reports and selling them into sidelines, and the vulnerability reward platform gives rise to "insiders"

历史最全混合专家(MOE)模型相关精选论文、系统、应用整理分享

Flutter TextField示例

CAD中能显示打印不显示
随机推荐
Can be displayed in CAD but not displayed in print
torch. Tensor and torch The difference between tensor
Huawei ENSP simulator configures DHCP for router
[C language] deep understanding of symbols
Y56. Chapter III kubernetes from entry to proficiency -- business image version upgrade and rollback (29)
CloudCompare&Open3D DBSCAN聚类(非插件式)
Routing configuration and connectivity test of Huawei simulator ENSP
[leetcode] 17. Letter combination of telephone number
案例分享|金融业数据运营运维一体化建设
How to use concurrentlinkedqueue as a cache queue
__ init__ () missing 2 required positive arguments
torch.tensor和torch.Tensor的区别
redis管道
redis缓存
华为ensp模拟器 实现多个路由器的设备可以相互访问
Huawei ENSP simulator enables devices of multiple routers to access each other
redis事务
解读创客教育中的各类智能化组织发展
学习突围3 - 关于精力
股票开户佣金最低多少,炒股开户佣金最低网上开户安全吗