I have two application servers (Spring Boot Apps) that are working with MySQL InnoDB Cluster. I have request to process all data from specific table in parallel - both app servers have to do the processing. Each app server have to take portion of data that is not used by another app server and to send HTTP request to third party service.
I've tried to do that with MySQL transactions and locking (PESSIMISTIC_WRITE LOCK TYPE) but I think I'm losing concurrency in that way because app server 1 is waiting for app server 2 transaction to be committed and vice versa.
Does anyone have a sophisticated solution for this problem?
Thank you in advance.
question from:
https://stackoverflow.com/questions/65940093/parallel-processing-and-locking-in-mysql-innodb-cluster-issue 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…