-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AT模式下数据库表中新建了一个字段,就会报空指针。 #4572
Comments
如果每次dml都去查询个新的表元数据那么极其影响性能,建议将自动刷新的间隔改短一些来处理 |
为了性能考虑,我们已经把表元数据缓存起来。同时提供了
用于定时刷新缓存中的表元数据 |
滚动发布的情况下重启期间还是会一直报错。TABLE_META_CHECKER_INTERVAL有一分钟的延迟(期间也会导致服务不可用),而且不支持配置修改。个人愚见还是a364176773大哥提的方案更好一点(只会去刷新一个表的元数据)。 |
个人认为此方案解决了长时间无法正常处理业务的问题,如不同步刷新,最大按默认值可能刷新需要1分钟,那么业务该表设计到的事务将1分钟持续失败这是不可接受,利用双检锁最大粒度减少对业务的吞吐影响,刷新元数据的动作虽然会短暂将rt飙高,但是起码系统可用性受到了保障 |
我也觉得遇到特定异常再去刷新比较好,这样完全是按需去触发这个事件,过程中双锁也能避免多余的资源消耗 |
plz assign to me~ |
Ⅰ. Issue Description
AT模式下,数据库A表中新建了一个字段,如果触发了A表的更新操作就会报空指针。只有重启或者等表结构的缓存(io.seata.rm.datasource.sql.struct.cache.TABLE_META_CACHE)刷新才不会异常
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Ⅲ. Describe what you expected to happen
期望在新建字段后,及时从缓存中获取不到也不要报错(在执行ddl脚本至项目发布成功期间会一直报错)。
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅴ. Anything else we need to know?
当resultSetMetaData从records中获取不到记录时就会报错。希望获取不到时能够刷新缓存或者其他更好的解决方式0.0
Ⅵ. Environment:
The text was updated successfully, but these errors were encountered: