Interview - highlight issue
--------2023--------
量化选债,查询超时 - 优化查询时间从90s为1s
详见onenote
数据库命中率突然从 99% 降低到了 75%,整个系统处于阻塞状态,更新语句全部堵住
而探究其原因后,我发现这个业务有大量插入数据的操作,而他在前一天把其中的某个普通索引改成了唯一索引。
知识点:mysql innodb 的唯一索引 vs 普通索引,在使用change buffer时的区别
详见:processon: https://www.processon.com/mindmap/655307fe6a2ff722ead8d9e4
--------2022--------
1.通过springcboot starter的源码逻辑,解决Autowire注入OSSClient失败问题
2.IOC子类,并不同时IOC父类
父类FatherEnricher,子类SonEnricher。注意:
- 两者都是lazy-init="true"。除非显示调用Spring getBean(),否则不会IOC
- 代码中明确只显示调用了(IOC了)子类SonEnricher
- 而子类SonEnricher的构造函数中,调用了super(“...”,“...”,“...”)
结果:
- 父类的两个红色的property并没有IOC注入
spring.xml
<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
public class SonEnricher extends FatherEnricher{
public SonEnricher(xxx,xxx,xxx){
super(xxx,xxx,xxx)
}
}
浙公网安备 33010602011771号