helloworld12
V2EX  ›  问与答

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

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

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

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

    还是有别的标记方式?

    谢谢

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