In general, how it SHOULD work:
The database begins a transaction, a block of instructions, that if fails, reverts all changes to the state from before the transaction, but if it succeeds it commits(does) all the changes in the block of instructions at once.
1. the crafting process begins...