Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:Concurrency control ensures correctness under concurrent access. Distributed databases add network partitions, message delays, and cross-site failures to the equation. This question evaluates whether distribution inherently complicates concurrency management.
Given Data / Assumptions:
Concept / Approach:Compared to a single-node database, a distributed system must coordinate locks or validations across sites, manage deadlock detection across networks, and ensure atomic commit (often via two-phase commit). Latency and partial failures complicate both pessimistic (locking) and optimistic (timestamp/MVCC) approaches. Replication (synchronous or asynchronous) introduces further ordering and conflict resolution challenges.
Step-by-Step Solution:
Identify the concurrency model (locking, MVCC, OCC, or hybrid).Define scope: single-partition transactions vs. cross-partition (distributed) transactions.Implement a coordinator for atomic commit and deadlock handling.Tune timeouts, retries, and backoff strategies for WAN conditions.Verification / Alternative check:Measure abort rates and lock wait graphs under cross-site load; expect higher complexity and overhead than on a centralized node due to coordination costs and failures.
Why Other Options Are Wrong:
Common Pitfalls:Underestimating network impact, neglecting idempotency, or failing to design for partitions and retries. Choose consistency levels and transaction scope intentionally.
Final Answer:Correct
Discussion & Comments