⚖ Compare news

Put up to three stories side by side. Pick IDs from any article URL: /compare?id=123&id=456

Три раза ALLOW: в ERP оказалось 120 вместо разрешённых 100

habrahabr.ru ·Russian Federation · world
Words
59
Chars
411
AI summary
Yes
Full story

A person allowed a workflow to order no more than 100 units of a product. Three requests for 40 units each passed through the authorization layer and received ALLOW, and the ERP system ended up with 120 units. The case examines why locally permitted decisions can together exceed a shared limit, how check-then-act fails under concurrent execution, and why ALLOW should be tied to atomic reservation of the shared limit before any external effect.

Человек разрешил workflow заказать не больше 100 единиц товара. Три запроса по 40 прошли через слой авторизации и получили ALLOW. В ERP в итоге оказалось 120. Разбираю, почему локально допустимые решения могут вместе выйти за пределы общего лимита, как check-then-act ломается при конкурентном исполнении и почему ALLOW нужно связывать с атомарным резервированием общего лимита до внешнего эффекта. Читать далее

Open article