Tagged articles
concurrency control
95 articles · Page 1 of 1
This article dissects AgentScope's AgentOS workspace architecture, detailing its unified directory contract (.mcp/skills/data/sessions), eight pluggable execution backends, two-level lazy loading with mtime+SHA-256 incremental caching, and fine-grained locking (bind/MCP/skill locks plus Future placeholders) to prevent duplicate workspace creation under concurrent first-session requests.
AgentOSAgentScopeconcurrency control
0 likes · 24 min read

This article details the architecture of a Spring Boot-based customer service ticket and SLA platform, covering unified ticket modeling across four channels, domain entities with SQL schemas, adapter-pattern channel integration, skill-based auto-dispatch with load balancing, business-calendar-driven SLA timing with pause/resume and staged escalation via delayed queues, collaboration features, satisfaction surveys, and quality inspection.
Auto-DispatchMulti-Channel IntegrationSLA Management
0 likes · 37 min read

Spring Boot's multipart parser writes uploads to disk before your controller runs, filling /tmp during concurrent large files; the fix is direct browser-to-object-storage uploads via presigned URLs, plus temp directory isolation, concurrency limits, and content validation.
File UploadMinIOMultipart Upload
0 likes · 16 min read

A comprehensive guide to integrating hardware peripherals — ID card readers, USB Keys, receipt printers, and serial devices — into Spring Boot applications using JNA, covering library mapping, concurrency control, deployment patterns, and testability design.
Hardware IntegrationID Card ReaderJNA
0 likes · 24 min read

This article details a session-centric Java architecture for multi-device login, covering device session creation, JWT with session IDs, single-device logout, admin forced logout, per-device-type concurrency control using Redis atomic operations, login limits with LRU eviction, device ID generation, refresh token binding, and security considerations for immediate token revocation.
AuthenticationJWTJava
0 likes · 18 min read

This comprehensive guide explains how vLLM's three core parameters — gpu_memory_utilization, max_model_len, and max_num_seqs — form an interdependent constraint triangle, and provides formulas, profiling log analysis, benchmarking methods, deployment configs, and five real-world troubleshooting cases to systematically tune LLM inference services for latency, throughput, and stability.
GPU memory managementKV cacheKubernetes Deployment
0 likes · 67 min read

This comprehensive guide explores EF Core's ChangeTracker internals, performance optimization techniques including AsNoTracking and compiled queries, optimistic concurrency with Timestamp tokens, production migration strategies using SQL scripts and bundles, and previews EF Core 10 LTS features like vector search and JSON support.
ChangeTrackerDatabase MigrationEF Core 10
0 likes · 19 min read

This article presents five case analysis questions from the May 2026 System Architecture Designer exam, covering time-series databases, MQTT QoS levels, concurrency control strategies, knowledge graph construction, and pipe-filter architecture for intrusion detection, with detailed reference answers for each scenario.
Case AnalysisMQTTOptimistic Lock
0 likes · 21 min read

The article details the first week of the Aegis project, demonstrating why a naive while-loop agent loop fails in production and how to replace it with deterministic contracts, a finite state machine, bounded execution budgets, server-side tool authorization, and reproducible failure testing using local mocks.
AI agentGoProduction Engineering
0 likes · 25 min read

This article explains JavaScript's single-threaded event loop model, detailing microtask and macrotask queues, Promise chaining, async/await mechanics, common pitfalls, and practical concurrency control patterns with code examples. It covers classic output prediction exercises, Promise.all/race/allSettled/any usage, async/await error handling, loop await traps, and a reusable limited-concurrency pool implementation for batch requests.
Async/AwaitJavaScriptMacrotasks
0 likes · 12 min read

This article details the engineering behind a Claudix-style VS Code plugin that transforms a chat sidebar into a production-grade Agent host, covering the critical three-process architecture (Webview, Extension Host, CLI worker), PID recycling, permission handling without blocking the message pump, persistent configuration via symlinks and backups, and concurrency control for cloud IDE environments.
ACLAgent hostCLI worker
0 likes · 23 min read

This article analyzes four concurrency control patterns — conditional updates, pessimistic locking, optimistic locking with version numbers, and distributed locks — using inventory deduction, order editing, and third-party push examples. It explains when each pattern applies, how to combine them with idempotency, and provides concrete SQL and Redis implementations.
Distributed LocksIdempotencyRedis
0 likes · 32 min read

The article presents a Java solution for allocating order-level discounts to individual items using integer arithmetic and deterministic remainder distribution, ensuring accurate partial refunds by persisting per-unit prices, allocated discounts, and payable amounts at checkout, with database schema and concurrency considerations.
BigIntegerJavaOrder Processing
0 likes · 12 min read

This article demonstrates how to implement a correct waitlist auto-promotion system for limited-capacity events using Spring Boot, MySQL InnoDB row locks, and database transactions to atomically handle cancellations and promotions without race conditions, ensuring the first waitlisted user always gets the freed spot.
InnoDBJava 17MySQL
0 likes · 12 min read

This article demonstrates how to prevent race conditions between order timeout closure and payment callbacks using atomic conditional UPDATE statements and SELECT FOR UPDATE with a refund outbox pattern, ensuring either payment wins and order becomes PAID, or closure wins and late payments trigger automatic refund compensation.
InnoDBMySQLSpring Boot
0 likes · 11 min read

This article explains how MySQL's MVCC uses version chains and ReadViews to enable lock-free snapshot reads, why isolation levels control ReadView creation timing (per-statement vs per-transaction), and why READ UNCOMMITTED and SERIALIZABLE bypass MVCC entirely, while writes still require row locks.
InnoDBMVCCMySQL
0 likes · 8 min read

This article explains thread starvation in Java concurrency, demonstrates it with a code example showing unfair lock acquisition and cumulative wait times, and provides two solutions: moving slow operations outside synchronized blocks and using ReentrantLock tryLock with timeout to bound waiting.
Java ConcurrencyReentrantLockSynchronized
0 likes · 10 min read

The author details building a lightweight approval flow end-to-end using AI (Codex), covering process modeling, dynamic forms, conditional and parallel branches, task routing, path replay, and analytics, while explaining why Flowable was rejected due to excessive tables, steep learning curve, integration difficulty, and the need for a lightweight, configurable solution.
AI-assisted developmentFlowableProcess Modeling
0 likes · 29 min read

The author evolves a simple Spring Boot file upload to handle 5GB files by implementing 8MB chunked uploads, resumable upload via chunk tracking, instant upload via SHA-256 deduplication, with database schema, REST API design, streaming merge, database-level concurrency control, and automated cleanup of expired uploads.
Database DesignFile UploadSpring Boot
0 likes · 15 min read

This article details a systematic approach to diagnosing and resolving CPU and memory spikes when an Agent processes large document batches, covering backpressure propagation, concurrency budgeting, runtime profiling, and pipeline design to prevent OOM kills and throttling.
CPU spikeGoKubernetes
0 likes · 23 min read

Postal Savings Bank developed a parameter-driven, group-concurrent cross-unit data cleaning framework for its distributed core remittance system, reducing cleaning time for hundreds of millions of records from 4 hours to 40 minutes while ensuring consistency and minimizing business impact.
Data GovernanceShardingconcurrency control
0 likes · 9 min read

An API's sudden latency spike from 200ms to 8 seconds was traced not to slow SQL but to database connection pool exhaustion caused by @Transactional methods holding connections during external HTTP calls to a payment service; splitting transactions and moving external calls outside the transaction boundary resolved the issue.
Database Connection PoolHikariCPPerformance Troubleshooting
0 likes · 15 min read

This article explains how MySQL's MVCC mechanism uses version chains and ReadViews to enable lock-free snapshot reads, and why four isolation levels (READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE) are still necessary: they define when ReadViews are created, controlling which version a transaction sees, while MVCC only handles reads—writes still require row locks.
InnoDBMVCCMySQL
0 likes · 9 min read

The article analyzes a timeout-induced duplicate risk review incident, then presents a comprehensive production-grade MCP server design covering stateless protocol alignment, schema validation, dual-key idempotency (request_key + business_key), UNKNOWN state machine, recovery workers, MCP Tasks integration, concurrency control, observability, and fault-injection testing to ensure exactly-once business effects.
IdempotencyMCPModel Context Protocol
0 likes · 27 min read

This article explains PV operations (semaphores) using traffic light analogies, covering P/V definitions, mutual exclusion, synchronization, resource counting, the producer-consumer problem with complete code walkthrough, and critical pitfalls like deadlock from incorrect P-ordering.
DijkstraPV operationsProducer-Consumer
0 likes · 11 min read

Spring Framework 7 introduces @Retryable and @ConcurrencyLimit annotations for method-level retry and concurrency control, enabling developers to handle transient failures and limit parallel executions without third-party libraries, though they operate per-JVM and lack distributed coordination.
@RetryableConcurrencyLimitJava
0 likes · 9 min read

The article analyzes five reasons why Spring Cloud Gateway's Redis-based token bucket rate limiting fails to protect downstream services during traffic bursts, including QPS vs. concurrency confusion, burstCapacity spikes, multi-route quota multiplication, KeyResolver fallback flaws, and Redis bottleneck fail-open behavior, then recommends tightening burst limits, adding downstream concurrency isolation with Sentinel/Resilience4j, and hardening KeyResolver configuration.
Burst TrafficRedisResilience4j
0 likes · 13 min read

The article walks through building a true WeChat‑like message recall feature in Spring Boot, explaining why simply deleting a row is insufficient and detailing the required status change, concurrency‑safe conditional update, multi‑device session handling, and cross‑instance event propagation.
Spring Bootconcurrency controlconditional update
0 likes · 12 min read

This article provides a comprehensive guide to distributed locks in microservices, covering why local locks fail, four fatal flaws of basic implementations, advanced manual locks with Lua scripts, watchdog auto-renewal, Redisson production usage, Redlock for high availability, and a real-world seckill overselling case study.
Distributed LocksLua ScriptRedLock
0 likes · 10 min read

After encountering potential data overwrite when updating configuration via an API, the author implements an optimistic lock using version numbers and revisits the fundamentals, comparing pessimistic and optimistic locking mechanisms, their implementations in SQL and Java, performance traits, pitfalls, and guidelines for choosing the appropriate strategy.
JavaOptimistic Lockconcurrency control
0 likes · 8 min read

The article analyzes Redis distributed locks—its three‑step verification, the limited guarantees it provides, and why small‑to‑medium projects should often prefer database constraints, idempotency keys, or state machines over adding a lock that introduces extra complexity and maintenance overhead.
Distributed LockIdempotencyRedis
0 likes · 10 min read

The article compares interview‑style answers and real‑world production for a restaurant reservation system, outlining six design dimensions, three time‑slot strategies, five engineering challenges, and architectural considerations to help engineers choose the right granularity and avoid common pitfalls.
backend designconcurrency controldistributed systems
0 likes · 15 min read

The article explains how databases use Multi-Version Concurrency Control, Undo Logs, ReadViews, snapshot reads, and both pessimistic and optimistic locking to allow readers to see a stable historical version while writers modify data without causing inconsistency or performance loss.
LocksMVCCReadView
0 likes · 10 min read

The article uses a simple money‑transfer scenario to introduce database transactions, explains the four ACID properties, illustrates common concurrency anomalies such as dirty reads, non‑repeatable reads and phantom reads, and outlines the four isolation levels with their trade‑offs and default settings in MySQL and Oracle.
ACIDMySQLconcurrency control
0 likes · 8 min read

High‑concurrency systems must go beyond simple locking; the article breaks down four progressive strategies—optimistic locking, database pessimistic locking, Redis distributed locks, and finally message‑queue serialization—explaining their trade‑offs, implementation details, pitfalls, and how to combine them into a layered architecture that sustains million‑QPS workloads with consistency, throughput, and recoverability.
Message QueueOptimistic LockRedis Lock
0 likes · 32 min read

This article explains how to design and operate a scalable, multi‑tenant batch processing platform on Kubernetes using Argo Workflows, covering core concepts, DAG scheduling, concurrency control, controller scaling, artifact handling, event‑driven triggers, and practical best‑practice patterns for production reliability and cost efficiency.
Argo WorkflowsKubernetesWorkflow Orchestration
0 likes · 33 min read

Lance uses Multi-Version Concurrency Control to provide ACID guarantees, creating immutable table versions on each commit and employing atomic storage primitives, rebase logic, and retry mechanisms to handle concurrent writes, conflict detection, and resolution across multiple transaction types.
Database InternalsLanceMVCC
0 likes · 16 min read

This article dissects OpenClaw’s core Agent engine, explaining its workspace layout, overall architecture, scheduling and concurrency mechanisms, high‑availability safeguards, and context‑guard strategies that together enable robust, production‑grade AI agents.
AI agent architectureContext GuardLLM reliability
0 likes · 13 min read

The article provides an in‑depth technical analysis of DongSQL V1.1.0, detailing its syntax extensions, concurrency control mechanisms, query‑execution optimizations, thread‑pool redesign, and extensive benchmark results that demonstrate significant performance gains for e‑commerce workloads.
concurrency controle-commerceperformance benchmark
0 likes · 13 min read

This article explains MySQL InnoDB’s MVCC mechanism, why it replaces traditional locking, details the four SQL isolation levels, illustrates dirty, non‑repeatable and phantom reads with examples, and breaks down the hidden fields, undo‑log chain, and read‑view algorithm that enable high‑concurrency, non‑blocking reads and writes.
InnoDBMVCCMySQL
0 likes · 18 min read

This article provides an in‑depth technical analysis of DongSQL’s kernel redesign—including RETURNING clause, Inventory Hint, CCL concurrency control, Statement Outline, and thread‑pool optimizations—showing how each feature dramatically improves throughput and latency for high‑traffic e‑commerce workloads.
SQLconcurrency controldatabases
0 likes · 12 min read

The article details DongSQL’s kernel redesign—including RETURNING clause, Hint syntax, CCL concurrency control, statement outlines, and thread‑pool optimizations—showing concrete performance gains in high‑concurrency e‑commerce scenarios.
Database EngineDongSQLSQL
0 likes · 11 min read

This article explains MySQL's optimistic locking strategy, detailing how a version column enables conflict detection during updates, provides step‑by‑step SQL examples, compares it with pessimistic locking, and shows why it improves performance in read‑heavy, low‑conflict environments.
MySQLOptimistic LockVersioning
0 likes · 3 min read

This article walks through a complete Vue‑and‑Express solution for uploading massive files, detailing chunked splitting, hash‑based instant upload detection, resumable transfers, concurrency control, manual abort handling, and server‑side merging using streams, providing ready‑to‑use code snippets and performance optimizations.
ExpressFile UploadVue
0 likes · 18 min read

This article provides a detailed technical comparison of Apache Hudi, Delta Lake, and Apache Iceberg, covering core features such as incremental pipelines, concurrency control, merge‑on‑read, partition evolution, multi‑mode indexing, ingestion tools, and real‑world use cases, and explains why Hudi often leads for heavy update workloads.
Apache HudiApache IcebergDelta Lake
0 likes · 14 min read

When a page needs to fire many simultaneous requests—such as loading ten resources at once or uploading dozens of files—the browser can freeze and the server can be overwhelmed, so using a request queue to limit concurrency keeps both responsive and stable.
Async ProgrammingFrontend OptimizationJavaScript
0 likes · 7 min read

This article examines common interview scenarios involving distributed locks, explains why they are often misused, outlines their proper use cases such as rate limiting, ensuring data consistency, and achieving ordered processing, and compares distributed locks with distributed transactions.
Idempotencybackend architectureconcurrency control
0 likes · 8 min read

This article explains MySQL’s locking mechanisms, categorizing locks by performance, operation type, data granularity, and finer‑grained levels such as gap and next‑key locks, and offers guidance on selecting the appropriate lock strategy for reliable concurrent database operations.
Database LocksInnoDBMySQL
0 likes · 9 min read

ReactPHP‑MQ provides a lightweight, SOLID‑designed queue for managing concurrent asynchronous operations, offering features like configurable concurrency limits, solid test coverage, and advanced methods such as all(), any(), and timeout handling for robust rate‑limiting in PHP applications.
PHPReactPHPasynchronous queue
0 likes · 5 min read

This article explains the concept of MySQL optimistic locking, its underlying version‑or‑timestamp mechanism, and provides step‑by‑step SQL examples for adding a version column, reading data, and safely updating records while handling concurrent modifications.
MySQLOptimistic LockVersioning
0 likes · 4 min read

This article explains Hologres 3.0's Query Queue feature, covering its motivation, architecture, four core capabilities—concurrency control, queueing, query isolation, and circuit breaking—along with practical usage scenarios, management steps, classifier rules, and best‑practice recommendations.
HologresQuery QueueServerless Computing
0 likes · 13 min read

This article provides a comprehensive overview of MySQL 8.0's concurrency control mechanisms, detailing table‑level MDL locks, server‑ and engine‑layer table locks, page‑level B+Tree locking, and row‑level lock types with code examples and real‑world deadlock scenarios.
Database InternalsInnoDBMySQL
0 likes · 28 min read

The article explains Apache Hudi’s three‑layer architecture and details four major 1.0 enhancements—LSM‑tree timeline, non‑blocking concurrency control, file‑group reader/writer APIs, and function indexes—while providing a brief review and links to the Hudi 1.x RFC.
Apache HudiFunction IndexLSM-tree
0 likes · 9 min read

This article provides a comprehensive overview of concurrency control in Apache Hudi, explaining ACID properties, the role of MVCC and OCC, and how Hudi coordinates multiple writers and table services to achieve serializable scheduling while maintaining high performance.
Apache HudiMVCCOCC
0 likes · 8 min read

This article explains the inner workings of InnoDB’s lock‑wait timeout thread, detailing how it scans waiting slots, identifies timed‑out transactions, processes timeout logic, and notifies the affected transactions, while also covering related data structures and configuration variables.
Database InternalsInnoDBMySQL
0 likes · 8 min read

This article explains the slow‑path row‑locking algorithm used by InnoDB in MySQL 8.0.32, detailing how the engine checks whether a transaction already holds a lock, determines if it must wait, reuses existing lock structures, and allocates new ones when necessary.
Database InternalsInnoDBMySQL
0 likes · 15 min read

This article explains how InnoDB determines whether a transaction already holds a table lock, acquires a mutex token, checks for blocking locks, and creates or reuses lock structures, detailing the complete table‑lock acquisition workflow in MySQL 8.0.32.
InnoDBMySQLTable Locks
0 likes · 15 min read

This article explains the purpose of locks in concurrent environments, compares optimistic (CAS) and pessimistic locking mechanisms, outlines their advantages, disadvantages, suitable scenarios, and provides PHP/PDO code examples demonstrating implementation and performance testing under high concurrency.
MySQLOptimistic LockPHP
0 likes · 11 min read

This article explains MySQL InnoDB's concurrency control mechanisms—including read‑write locks, transaction isolation levels, MVCC, redo/undo logs, and rollback segments—and shows how they work together to ensure data consistency while maximizing read/write performance in high‑traffic environments.
InnoDBLocksMVCC
0 likes · 12 min read


政采云技术Oct 24, 2023 · Databases
This article explains MySQL InnoDB's Multi-Version Concurrency Control (MVCC), covering its basic concepts, read/write scenarios, implicit fields, undo logs, read view mechanisms, transaction handling, and differences between RC and RR isolation levels, providing a comprehensive guide for developers.
InnoDBMVCCMySQL
0 likes · 16 min read

This article examines the challenges of test data generation in fast‑moving software projects and presents a self‑developed Test Data Management solution that balances efficiency, usability, security, quality, generality, and cost through adaptive concurrency control, masking policies, and a multi‑master architecture.
DevOpsconcurrency controldata security
0 likes · 15 min read

This article explains how ByteHouse, an enhanced version of ClickHouse used at ByteDance, adds full upsert support, multi‑table joins, high‑availability features, and, most importantly, a Resource Group mechanism that provides fine‑grained CPU, memory, and concurrency isolation to improve query performance and stability.
ByteHouseClickHouseDatabase Performance
0 likes · 8 min read

This article explains how ByteHouse extends ClickHouse with a Resource Group mechanism that provides fine‑grained concurrency, memory, and CPU isolation, improving query latency, reducing variance, and increasing cluster stability for large‑scale ad‑tech workloads.
ByteHouseClickHouseconcurrency control
0 likes · 8 min read

The article explains why concurrent write transactions cause lost updates, then details practical solutions such as atomic update statements, explicit row‑level locking, automatic lost‑update detection, compare‑and‑swap (CAS) techniques, and special considerations for multi‑replica databases.
CASatomic writeconcurrency control
0 likes · 8 min read

This article examines the technical differences and feature sets of Apache Hudi, Delta Lake, and Apache Iceberg, highlighting incremental pipelines, concurrency control, merge‑on‑read storage, partition evolution, multi‑mode indexing, and real‑world use cases to help practitioners choose the most suitable lakehouse solution for their workloads.
Apache HudiApache IcebergDelta Lake
0 likes · 18 min read

This article demystifies MySQL's Multi‑Version Concurrency Control (MVCC) by explaining its Undo Log and Read View mechanisms, showing how InnoDB implements read‑committed and repeatable‑read isolation without locking, and illustrating the process with clear examples and diagrams.
InnoDBMVCCMySQL
0 likes · 13 min read

The guide recommends fine‑grained MySQL management in a MyBatis‑based order system—avoiding generic or dynamic SQL, explicitly using indexes, listing columns, limiting results, batching inserts, and checking row counts—while applying appropriate concurrency control (pessimistic FOR UPDATE or optimistic versioning) to improve performance, stability, and data integrity.
MyBatisSQLconcurrency control
0 likes · 18 min read

Optimistic and pessimistic locks are conceptual concurrency control strategies used across databases and caching systems; the article explains their principles, MySQL implementations with SELECT ... FOR UPDATE and version checks, compares their trade‑offs, and advises preferring optimistic locking in high‑concurrency scenarios.
MySQLOptimistic Lockconcurrency control
0 likes · 6 min read

This article analyzes the business scenario of flash‑sale (秒杀) systems, outlines their technical characteristics, dissects the request chain, compares optimistic and pessimistic locking mechanisms with code examples, and presents a comparative table of concurrency‑control outcomes.
Optimistic Lockbackend architectureconcurrency control
0 likes · 8 min read

The article explains how concurrent updates can cause data loss in high‑traffic scenarios and demonstrates using optimistic and pessimistic locking in PostgreSQL with Python, including EFCore‑style token checks and a retry mechanism via the tenacity library.
Optimistic LockPostgreSQLPython
0 likes · 7 min read

This article explains why rate limiting is essential, outlines common strategies such as circuit breaking, service degradation, delay processing, and privilege handling, compares counter, leaky‑bucket and token‑bucket algorithms, and provides practical Java and Nginx‑Lua implementation examples for backend systems.
Circuit Breakerconcurrency controldistributed systems
0 likes · 13 min read

This article explains the concepts, usage scenarios, and differences of various database locks—including shared (S) lock, exclusive (X) lock, mutex, pessimistic and optimistic locks—as well as row‑level, table‑level, and page‑level locks, and it discusses common concurrency problems such as lost updates, non‑repeatable reads, dirty reads, and deadlocks.
Database LocksMySQLOptimistic Lock
0 likes · 8 min read


ITPUBApr 9, 2021 · Databases
Tencent’s TDSQL team introduces a groundbreaking theory that precisely classifies an infinite set of database transaction anomalies, defines their categories via conflict‑graph analysis, and provides an open‑source Linux tool with step‑by‑step compilation instructions for interactive anomaly exploration.
Linux toolTDSQLconcurrency control
0 likes · 11 min read

This article examines Xianyu's two promotional features—Resale Lottery and Money Tree—detailing their gameplay, underlying business models, and the backend technical solutions such as event collection, idempotent reward accounting, concurrency control, fatigue management, and distributed locking.
Event ProcessingIdempotencybackend development
0 likes · 11 min read

This article explains the concept of Multiversion Concurrency Control (MVCC), how it solves read‑write blocking, deadlocks and consistency issues, and details InnoDB’s implementation—including transaction IDs, hidden columns, undo logs, and the behavior of snapshot and current reads under various isolation levels.
InnoDBMVCCMySQL
0 likes · 9 min read

This article explores the concurrency control strategies, persistence mechanisms, and compiled query processing techniques used by modern memory databases, comparing systems like Hekaton, Hyper, HANA, and others while highlighting performance trade‑offs and architectural considerations.
MVCCcheckpointconcurrency control
0 likes · 20 min read

This article explains MySQL's lock mechanisms—including row‑level, page‑level and table‑level locks, their shared and exclusive modes, the differences between optimistic and pessimistic concurrency control, and practical tips for avoiding deadlocks in InnoDB.
LocksMySQLOptimistic Lock
0 likes · 12 min read

This article examines the limitations of using database auto‑increment primary keys for distributed ID generation and presents a segment‑allocation approach, discusses concurrency challenges, and introduces a double‑buffer strategy to reduce database load and improve fault tolerance.
ID segment allocationconcurrency controldatabase auto-increment
0 likes · 8 min read

This article explains the principles of pessimistic concurrency control in relational databases, details the conditions under which MySQL's SELECT … FOR UPDATE works, compares it with optimistic locking, provides concrete SQL examples, and demonstrates lock behavior through multiple transaction test scenarios.
InnoDBMySQLconcurrency control
0 likes · 10 min read

This article details the evolution, architectural redesign, and performance optimizations of MaFengWo's membership system, covering identity strategy transformation, four‑layer service architecture, rights pool construction, third‑party integration, points integration, concurrency control, traffic shaping, and risk management to support scalable, high‑quality user experiences.
concurrency controlmembershiprisk-management
0 likes · 17 min read


ITPUBApr 25, 2019 · Databases
This article explains the concepts of concurrency control, detailing pessimistic and optimistic locking mechanisms, their implementation in MySQL, practical SQL examples, advantages, drawbacks such as deadlocks and ABA problems, and guidance on selecting the appropriate lock strategy for high‑concurrency applications.
CASMySQLOptimistic Lock
0 likes · 11 min read

The article explains the concepts, advantages, and drawbacks of optimistic and pessimistic locking, provides real‑world examples such as lost updates and inconsistent reads, and offers practical guidelines and implementation techniques for selecting the appropriate concurrency control strategy in database‑driven applications.
Optimistic Lockconcurrency controldatabase
0 likes · 10 min read

This article examines a distributed system concurrency problem, compares lock‑based transactions with multiversion concurrency control (MVCC), and explains why MVCC often outperforms pessimistic locking in scenarios demanding high read responsiveness and low contention.
MVCCconcurrency controldistributed systems
0 likes · 10 min read

This article explains why traditional in‑process locks fail under massive concurrency, how distributed locks using Redis or Zookeeper ensure atomic updates across many servers, and details practical implementations, pitfalls like deadlocks, and strategies such as key expiration and ephemeral sequential nodes.
Distributed LockRedisZooKeeper
0 likes · 14 min read

The article systematically explains MySQL’s locking mechanisms—including shared, exclusive, intention, gap, next‑key, insert‑intention, and auto‑increment locks—alongside transaction handling, isolation levels, MVCC‑based concurrency control, and deadlock detection and avoidance strategies, helping readers understand data consistency and performance.
LocksMVCCMySQL
0 likes · 23 min read

The article explains how MaFengWo built a custom travel transaction system that uses multi‑order distribution, a grab‑pool message queue, concurrency‑controlled locking, and long‑connection notifications to efficiently match personalized travel requests with multiple suppliers, boosting conversion rates and platform performance.
Long ConnectionMessage Queueconcurrency control
0 likes · 9 min read

The article explains the concepts, advantages, disadvantages, and practical selection criteria of optimistic and pessimistic locking in concurrent systems, illustrating the ideas with version‑control examples and offering implementation tips for both database and web applications.
concurrency controldatabaseoptimistic locking
0 likes · 10 min read

The guide explains MySQL/InnoDB deadlocks—how circular lock waits arise, the wait‑for‑graph detection that rolls back the transaction with fewer undo logs, the various lock modes and their behavior in UPDATE/INSERT/DELETE, and practical strategies such as proper indexing, consistent access order, and configuration tweaks to detect, handle, and prevent deadlocks.
Database LocksInnoDBInnoDB Lock Types
0 likes · 13 min read

This article uses a humorous story of two threads battling over inventory updates to illustrate the principles, advantages, and drawbacks of pessimistic and optimistic locking in distributed systems, helping readers understand when to apply each concurrency control method.
Optimistic Lockconcurrency controldatabase
0 likes · 8 min read

This article presents a chronological overview of Optimistic Concurrency Control (OCC), covering its early theoretical foundations, key research papers, prototype implementations such as MVCC+OCC+2PC and Hekaton, and its adoption in modern distributed NewSQL databases like Megastore, F1, and MaaT, highlighting both advantages and challenges.
NewSQLOCCconcurrency control
0 likes · 33 min read

This article provides a comprehensive overview of MySQL’s logical server architecture, lock types, transaction fundamentals, ACID properties, isolation levels, MVCC mechanisms, and deadlock handling, including practical SQL examples and strategies for ensuring data consistency and performance.
LocksMVCCMySQL
0 likes · 19 min read

This article explains how to avoid data races in high‑traffic distributed systems by comparing pessimistic and optimistic concurrency control, demonstrating RDBMS row locks and a Redis‑based distributed lock implementation with Python code examples.
Distributed LockPythonRDBMS
0 likes · 16 min read

This article shares practical patterns and built‑in mechanisms for dealing with duplicate messages, message ordering, concurrent updates, asynchronous acknowledgments, and batch processing in a large‑scale, message‑driven architecture, illustrated with QMQ examples from Qunar's platform.
Duplicate Message HandlingMessage Queuebackend development
0 likes · 16 min read


ITPUBMay 22, 2016 · Databases
Optimistic locking replaces heavyweight pessimistic locks with a version‑based approach, allowing concurrent reads and only checking a version or timestamp during updates, which reduces lock contention, improves performance under high concurrency, but requires careful handling of external updates to avoid dirty data.
Database PerformanceVersioningconcurrency control
0 likes · 5 min read

This article explains the concurrency problems that arise in databases, describes the five types of read/write anomalies, details the three‑level lock protocol and the two‑phase locking rule, and compares the four standard isolation levels—Read Uncommitted, Read Committed, Repeatable Read, and Serializable—highlighting their effects on performance and data consistency.
MySQLconcurrency controldatabases
0 likes · 10 min read
