fix(order): блокировка Save во время пересчёта стоимости - #461
Open
Ibochkarev wants to merge 1 commit into
Open
Conversation
Ibochkarev
force-pushed
the
fix/issue-379-order-save-recalc-race
branch
2 times, most recently
from
July 29, 2026 11:32
086df3c to
d80bf0d
Compare
Prevent lost-update when Save PUT races with recalculate-cost by disabling the save action in UI and adding symmetric in-flight guards in OrderView.
Ibochkarev
force-pushed
the
fix/issue-379-order-save-recalc-race
branch
from
August 2, 2026 02:30
d80bf0d to
0e267a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
При параллельном Save и Recalculate cost PUT с snapshot старых
cost/cart_cost/delivery_costперезаписывал свежий результат пересчёта (lost update). Recalculate уже блокировался приsaving, но Save не учитывалrecalculatingCost.Добавлены симметричные in-flight guard'ы в
saveOrder/recalculateOrderCostи:disabledна кнопку Save, пока идёт пересчёт.Тип изменений
Связанные Issues
Closes #379
Как это было протестировано?
Конфигурация тестирования:
Скриншоты (если применимо)
n/a
Чеклист
Дополнительные заметки
Out of scope: etag/updatedon merge на backend (#379 упоминает как альтернативу). Текущий фикс — UI lock + guard'ы, как в AC issue.