{"id":"concurrency-safety-strategy-varies-by-financial-risk","text":"Financial systems use domain-appropriate concurrency strategies: wallets use pessimistic sorted locking (guaranteed deadlock-free, zero conflict window) while hotels use optimistic versioned locking (retry on conflict, higher throughput), matching strategy strictness to violation cost.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["wallet-transfers-are-safe-under-concurrency","hotel-occ-prevents-overbooking"],"outlist":[],"label":"Wallets can't tolerate any conflict window (money at risk); hotels can retry (inventory contention is less costly)"}],"dependents":["financial-concurrency-is-comprehensively-safe","financial-correctness-combines-locking-with-structural-asymmetry"],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"concurrency-safety-strategy-varies-by-financial-risk","truth_value":"IN","reason":"SL justification valid","antecedents":["wallet-transfers-are-safe-under-concurrency","hotel-occ-prevents-overbooking"],"label":"Wallets can't tolerate any conflict window (money at risk); hotels can retry (inventory contention is less costly)"},{"node":"wallet-transfers-are-safe-under-concurrency","truth_value":"IN","reason":"SL justification valid","antecedents":["wallet-deadlock-free-concurrent-transfers"],"label":"sorted lock ordering prevents deadlock and frozen-check prevents TOCTOU, but `create_wallet` silently replacing an existing wallet could reset balance and lose in-flight transaction state for any concurrent transfer holding a lock on that wallet","outlist":["wallet-creation-silently-overwrites"]},{"node":"wallet-deadlock-free-concurrent-transfers","truth_value":"IN","reason":"SL justification valid","antecedents":["wallet-lock-ordering-prevents-deadlock","wallet-frozen-check-inside-lock","wallet-two-tier-locking"],"label":"Three complementary locking disciplines compose into a deadlock-free, race-free concurrency model"},{"node":"wallet-lock-ordering-prevents-deadlock","truth_value":"IN","reason":"premise"},{"node":"wallet-frozen-check-inside-lock","truth_value":"IN","reason":"premise"},{"node":"wallet-two-tier-locking","truth_value":"IN","reason":"premise"},{"node":"hotel-occ-prevents-overbooking","truth_value":"IN","reason":"SL justification valid","antecedents":["hotel-reservation-optimistic-locking","hotel-search-availability-is-bottleneck-date"],"label":"OCC prevents concurrent overbook, but negative inventory from cancel underflow corrupts the availability data that OCC is protecting","outlist":["hotel-cancel-no-underflow-guard"]},{"node":"hotel-reservation-optimistic-locking","truth_value":"IN","reason":"premise"},{"node":"hotel-search-availability-is-bottleneck-date","truth_value":"IN","reason":"premise"}]}}