当前位置:网站首页>解决异步接口慢导致的数据错乱问题
解决异步接口慢导致的数据错乱问题
2022-07-04 20:47:00 【暴躁李子 在线摆烂】
bug场景复现
通过下拉框筛选表格数据
快速筛选或者第一次筛选后,在数据还没返回来的时候马上又切换下拉框 筛选结果和筛选关键字不匹配
查看后端的接口 返回数据无误 基本可以判断是慢接口请求的问题
由于前一次请求服务器返回数据比较慢,还没等第一次请求返回结果,后一次请求就发起了,并且迅速返回了结果,这时表格肯定显示后一次的结果;
过了几秒,第一次请求的结果才返回,这时表格的数据又被第一次请求的结果覆盖 导致筛选结果和筛选关键字不匹配
最终导致了这个bug
最直观的方案就是再发起第二次请求之后,如果第一次请求未返回,那就直接取消这次请求,使用第二次请求的返回结果。
边栏推荐
- minidom 模塊寫入和解析 XML
- Lambdaquerywrapper usage
- [public class preview]: basis and practice of video quality evaluation
- 巅峰不止,继续奋斗!城链科技数字峰会于重庆隆重举行
- Delphi soap WebService server-side multiple soapdatamodules implement the same interface method, interface inheritance
- Jerry's ad series MIDI function description [chapter]
- flink1.13 sql基础语法(一)DDL、DML
- 每日一题-LeetCode1200-最小绝对差-数组-排序
- 刘锦程荣获2022年度中国电商行业创新人物奖
- 创客思维在高等教育中的启迪作用
猜你喜欢
TCP shakes hands three times and waves four times. Do you really understand?
IIC (STM32)
巅峰不止,继续奋斗!城链科技数字峰会于重庆隆重举行
Interpreting the development of various intelligent organizations in maker Education
Shutter textfield example
At the right time, the Guangzhou station of the city chain science and Technology Strategy Summit was successfully held
输入的查询SQL语句,是如何执行的?
TCP三次握手,四次挥手,你真的了解吗?
MP3是如何诞生的?
CAD中能显示打印不显示
随机推荐
redis RDB AOF
How to remove the black dot in front of the title in word document
redis布隆过滤器
杰理之AD 系列 MIDI 功能说明【篇】
Flutter TextField示例
[weekly translation go] how to code in go series articles are online!!
2021 CCPC Harbin I. power and zero (binary + thinking)
杰理之AD 系列 MIDI 功能说明【篇】
历史最全混合专家(MOE)模型相关精选论文、系统、应用整理分享
Kubeadm初始化报错:[ERROR CRI]: container runtime is not running
Hash table
解读创客教育中的各类智能化组织发展
【C語言】符號的深度理解
Jerry's ad series MIDI function description [chapter]
哈希表(Hash Tabel)
minidom 模塊寫入和解析 XML
minidom 模块写入和解析 XML
Learning breakout 3 - about energy
Redis bloom filter
Jerry's ad series MIDI function description [chapter]