helloworld12
V2EX  ›  问与答

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

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

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

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

    还是有别的标记方式?

    谢谢

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