multiprocessing - Multiple access to database - Stack Overflow

How to anize safe multiple access to a database when users use isolated programs for migration manageme

How to anize safe multiple access to a database when users use isolated programs for migration management? For example, when one user is trying to load their version into the database, how is the program supposed to block other access? I have some ideas:

  1. The first idea is to have a general service to manage access to the database. For example, a simple queue where users can upload their changes. However, this method is challenging and requires creating an additional microservice.

  2. The second idea is to introduce a flag in the database that indicates whether it is busy. However, this approach can introduce vulnerabilities, such as a race condition when multiple users attempt to change the flag simultaneously. Additionally, if a program crashes, the flag may remain set to "busy" indefinitely.

Do you have any ideas for a better method?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742342832a4425969.html

相关推荐

  • multiprocessing - Multiple access to database - Stack Overflow

    How to anize safe multiple access to a database when users use isolated programs for migration manageme

    10小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信