Interview - highlight issue

回到顶部(go to top)

--------2023--------

回到顶部(go to top)

量化选债,查询超时 - 优化查询时间从90s为1s

详见onenote

 

回到顶部(go to top)

数据库命中率突然从 99% 降低到了 75%,整个系统处于阻塞状态,更新语句全部堵住

而探究其原因后,我发现这个业务有大量插入数据的操作,而他在前一天把其中的某个普通索引改成了唯一索引。

知识点:mysql innodb 的唯一索引 vs 普通索引,在使用change buffer时的区别

详见:processon: https://www.processon.com/mindmap/655307fe6a2ff722ead8d9e4 

 

 

回到顶部(go to top)

--------2022--------

回到顶部(go to top)

1.通过springcboot starter的源码逻辑,解决Autowire注入OSSClient失败问题

 

 

回到顶部(go to top)

2.IOC子类,并不同时IOC父类

父类FatherEnricher,子类SonEnricher。注意:

  • 两者都是lazy-init="true"。除非显示调用Spring getBean(),否则不会IOC
  • 代码中明确只显示调用了(IOC了)子类SonEnricher
  • 而子类SonEnricher的构造函数中,调用了super(“...”,“...”,“...”)

 

结果:

  • 父类的两个红色的property并没有IOC注入

 

spring.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<bean id="FatherEnricher" class="com.FatherEnricher"
    lazy-init="true">
    <constructor-arg index="0" value="xxx"/>
    <constructor-arg index="1" value="xxx"/>
    <constructor-arg index="2" ref="xxx"/>
    <!--Attention here!!!-->
    <property name="param1" ref="param1_ref"/>
    <property name="param2" value="${param2_value}"/>
</bean>
 
<bean id="SonEnricher" class="com.SonEnricher"
    lazy-init="true">
    <constructor-arg index="0" value="xxx"/>
    <constructor-arg index="1" value="xxx"/>
    <constructor-arg index="2" ref="xxx"/>
</bean>

  

code

1
2
3
4
5
public class SonEnricher extends FatherEnricher{
    public SonEnricher(xxx,xxx,xxx){
        super(xxx,xxx,xxx)
    }
}

  

 

posted on   frank_cui  阅读(137)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

levels of contents
点击右上角即可分享
微信分享提示