当前位置:网站首页>@The problem of cross database query invalidation caused by transactional annotation
@The problem of cross database query invalidation caused by transactional annotation
2022-07-05 03:51:00 【Java Punk】
Related articles :
@Transactional Failure scenarios for annotations , I've seen too many people fall over this problem , A thorough inquiry , Shut up the interviewer _Java Punk The blog of -CSDN Blog Through the study of this article , You will master the general 【6 Kind of 】@Transactional Failure scenarios , And be able to understand their failure principles , Dig the source code into the grave .https://blog.csdn.net/weixin_44259720/article/details/110181822?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165655820616782395348213%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165655820616782395348213&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-4-110181822-null-null.nonecase&utm_term=%40Transactional&spm=1018.2226.3001.4450@Transactional Detailed explanation of annotation parameters , And the usage characteristics of annotations ( The collection edition )_Java Punk The blog of -CSDN Blog _transactional Annotation parameters Through this study , You will deepen your understanding of @Transactional Annotation and understanding of all attributes , You can also learn @Transactional Annotate common failure scenarios 【 At the end of the article 】.https://blog.csdn.net/weixin_44259720/article/details/110138972?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165655820616782395348213%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165655820616782395348213&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-110138972-null-null.nonecase&utm_term=%40Transactional&spm=1018.2226.3001.4450 If necessary , Please take away the relevant articles above .
background
Encountered during development , Record the problem .
It is recommended that a service be connected to a database during development , To realize business-oriented micro service configuration , stay RestFull Layer for business integration of services . however , A few days ago, there was a special case , You need to associate multiple databases in a service to complete the query ( Because several databases do not have their own services , No external HSF Interface ).
In this configuration , It is inevitable to query multiple databases in an interface , And need to modify the data .
problem
Due to the addition of @Transactional annotation , The original intention is to realize transaction management , It didn't actually come true , Instead, the database switching failed (master - > slave Failure ), Finally, the data query fails .
terms of settlement
Need to use cross library solutions , Cross database transaction middleware is recommended , Message middle table , Or make use of MQ Achieve best effort notification messages , Achieve the ultimate consistency of data .
边栏推荐
- [wp][introduction] brush weak type questions
- MySQL winter vacation self-study 2022 11 (10)
- Basic function learning 02
- [groovy] string (string splicing | multi line string)
- Excuse me, my request is a condition update, but it is blocked in the buffer. In this case, can I only flush the cache every time?
- Yuancosmic ecological panorama [2022 latest]
- Containerization Foundation
- JWT vulnerability recurrence
- Easy processing of ten-year futures and stock market data -- Application of tdengine in Tongxinyuan fund
- Basic authorization command for Curl
猜你喜欢
Official announcement! The third cloud native programming challenge is officially launched!
PlasticSCM 企业版Crack
[vérification sur le Web - divulgation du code source] obtenir la méthode du code source et utiliser des outils
Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
[an Xun cup 2019] not file upload
It took two nights to get Wu Enda's machine learning course certificate from Stanford University
How to define a unified response object gracefully
Clickhouse synchronization MySQL (based on materialization engine)
Use of kubesphere configuration set (configmap)
Clickhouse同步mysql(基于物化引擎)
随机推荐
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
Yuancosmic ecological panorama [2022 latest]
[vérification sur le Web - divulgation du code source] obtenir la méthode du code source et utiliser des outils
Yyds dry goods inventory embedded matrix
请问一下我的请求是条件更新,但在buffer中就被拦截了,这种情况我只能每次去flush缓存么?
IPv6 experiment
JWT漏洞复现
Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery
[安洵杯 2019]不是文件上传
[untitled]
An elegant program for Euclid‘s algorithm
v-if VS v-show 2.0
Clickhouse物化视图
[groovy] string (string type variable definition | character type variable definition)
【软件逆向-基础知识】分析方法、汇编指令体系结构
[array]566 Reshape the matrix - simple
[groovy] string (string splicing | multi line string)
花了2晚,拿到了吴恩达@斯坦福大学的机器学习课程证书
一文带你了解BI的前世今身与企业数字化转型的关系
Huawei MPLS experiment