helloworld12
V2EX  ›  问与答

分布式事务中,如何预留资源

  •  
  •   helloworld12 · May 21, 2018 · 1086 views
    This topic created in 2934 days ago, the information mentioned may be changed or developed.

    譬如有个货物,库存 100,存在数据库中

    把他减去 1,然后再插入一个单位的预留货物资源吗?后面提交后,再删去这条记录,或者回滚时候,删去这条记录,把 1 加回去?

    还是有别的标记方式?

    谢谢

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3388 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 12:18 · PVG 20:18 · LAX 05:18 · JFK 08:18
    ♥ Do have faith in what you're doing.