🤖 AI Summary
Document-oriented NoSQL databases, which typically adopt eventual consistency models, struggle to support highly reliable transaction processing. This work proposes a four-phase transaction management framework that achieves conflict-serializable consistency while preserving system scalability. By integrating transaction lifecycle management, operation classification, pre-execution conflict detection, and an adaptive locking strategy, the approach effectively eliminates deadlocks and significantly reduces both transaction abort rates and latency variance. Experimental results demonstrate that the abort rate decreases from 8.3% to 4.7%, and latency variance is reduced by 34.2%. Under high concurrency, throughput improves by 6.3%–18.4%, with a 15.2% increase observed in a 9-node cluster, accompanied by a 53% reduction in abort rate.
📝 Abstract
NoSQL databases are widely used in modern applications due to their scalability and schema flexibility, yet they often rely on eventual consistency models that limit reliable transaction processing. This study proposes a four-stage transaction management framework for document-oriented NoSQL databases, with MongoDB as the reference platform. The framework combines transaction lifecycle management, operation classification, pre-execution conflict detection, and an adaptive locking strategy with timeout-based deadlock prevention. Formal correctness analysis shows that the proposed approach guarantees conflict serializability under defined conditions. An experimental evaluation using the Yahoo Cloud Serving Benchmark (YCSB) workloads A, B, and F, with concurrency levels ranging from 1 to 100 clients, demonstrates a reduction in transaction abort rates from 8.3% to 4.7%, the elimination of observed deadlocks, and a 34.2% decrease in latency variance. Throughput improvements ranging from 6.3% to 18.4% are observed under high concurrency, particularly for read-modify-write workloads. Distributed experiments on clusters of up to 9 nodes confirm scalability, achieving 15.2% higher throughput and 53% lower abort rates than baseline systems. Comparisons with MongoDB's native transactions, CockroachDB, and TiDB indicate that the proposed framework strikes a good balance between consistency guarantees and performance overhead. Sensitivity analysis identifies optimal parameter settings, including a lock timeout of 100 ms, an initial backoff of 10 ms, and a maximum backoff of 500 ms. These results show that carefully designed consistency mechanisms can significantly improve data integrity in NoSQL systems without undermining scalability.