使用 Maven Shade 插件时需注意若 Jar 中含有 so 等 native 库且使用的静态绑定时,若进行了 relocation 可能导致 UnsatisfiedLinkError
。
Reference
UnsatisfiedLinkError: how to shade native · Issue #6665 · netty/netty
使用 Maven Shade 插件时需注意若 Jar 中含有 so 等 native 库且使用的静态绑定时,若进行了 relocation 可能导致 UnsatisfiedLinkError
。
UnsatisfiedLinkError: how to shade native · Issue #6665 · netty/netty
谨慎使用 Discard*Policy
策略,若与 Future#get()
同时使用存在风险,丢弃的任务默认未进行取消操作。
JDK-8257671 ThreadPoolExecutor.Discard*Policy: rejected tasks are not cancelled
JDK-8286463 DiscardPolicy may block invokeAll forever
JDK-8160037 ExecutorService::shutdownNow may block invokeAll indefinitely
ThreadPoolExecutor.DiscardOldestPolicy (Java SE 17 & JDK 17)
排查性能问题时发现的 Arthas 的几个小问题,顺手优化一下。
Make thread id uniformly displayed in decimal format by tianshuang · Pull Request #2662 · alibaba/arthas · GitHub
Adjust time display accuracy to milliseconds by tianshuang · Pull Request #2663 · alibaba/arthas · GitHub
一个存在多年的问题,当消费者端消息发送耗时超过设置的调用超时时间时,目前的实现中提示信息为 Waiting server-side response timeout
,此时应该提示 Sending request timeout in client-side
。记录该问题是因为前一段时间有上游找过来说我这边的服务有问题,最后查出来是消费者端发送消息超时导致的,但是因为提示信息给得不对让消费者端误以为是提供者端服务的问题。
Fix incorrect timeout message by tianshuang · Pull Request #13001 · apache/dubbo · GitHub
2022 年 11 月提交的 PR,修复因拦截器返回 false
导致预检请求 CORS 拦截器未得到执行的问题,2023 年 9 月才处理:Polishing contribution · spring-projects/spring-framework@53133d9,自 Spring 6.1.0-RC1 才能得到修复。
Execute preflight check logic before all interceptors by tianshuang · Pull Request #29509 · spring-projects/spring-framework · GitHub
Chapter 4. Handling preflight requests · CORS in Action: Creating and consuming cross-origin APIs