Tagged articles
182 articles
Page 2 of 2
Top Architect
Top Architect
Oct 27, 2021 · Databases

Understanding MySQL InnoDB Deadlocks: Types, Causes, and Prevention Strategies

This article explains MySQL InnoDB lock types, analyzes common deadlock scenarios with detailed SQL examples, describes the underlying locking mechanisms such as next‑key and gap locks, and provides practical prevention and resolution techniques for developers working with transactional databases.

InnoDBconcurrencydatabase
0 likes · 13 min read
Understanding MySQL InnoDB Deadlocks: Types, Causes, and Prevention Strategies
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 10, 2021 · Databases

Understanding InnoDB Locking Mechanisms: Record Lock, Gap Lock, and Next-Key Lock

This article explains MySQL InnoDB's locking mechanisms—including record locks, gap locks, and next‑key locks—detailing how they work, their interaction with isolation levels such as Repeatable Read, and the principles, optimizations, and examples that illustrate their impact on concurrency and phantom reads.

InnoDBconcurrencydatabase
0 likes · 12 min read
Understanding InnoDB Locking Mechanisms: Record Lock, Gap Lock, and Next-Key Lock
Top Architect
Top Architect
Oct 3, 2021 · Databases

Understanding the INSERT Locking Process in MySQL by Analyzing the Source Code

This article examines MySQL's INSERT locking behavior, explains why phantom reads do not occur under REPEATABLE READ isolation, and walks through compiling the MySQL source, debugging lock acquisition, and the role of insert‑intention and gap locks using detailed code examples and execution traces.

Gap LockInnoDBInsert
0 likes · 18 min read
Understanding the INSERT Locking Process in MySQL by Analyzing the Source Code
Laravel Tech Community
Laravel Tech Community
Jul 8, 2021 · Databases

Understanding Optimistic and Pessimistic Locks in MySQL/InnoDB

This article explains the concepts, mechanisms, and practical code examples of optimistic and pessimistic locking in MySQL/InnoDB, including version‑based optimistic locks, shared (read) locks, exclusive (write) locks, and how to apply them with Laravel's query builder.

Database ConcurrencyLaravellocking
0 likes · 6 min read
Understanding Optimistic and Pessimistic Locks in MySQL/InnoDB
Youzan Coder
Youzan Coder
Jul 8, 2021 · Backend Development

Deep Dive into Java Thread States and Synchronized Lock Implementation

The article thoroughly explains Java thread states and how the synchronized keyword is implemented, detailing the mapping to OS thread states, the object header’s Mark Word, biased, lightweight and heavyweight locking, CAS‑based state transitions, bytecode monitor instructions, lock upgrades, and optimal usage scenarios.

JVM internalsjavalocking
0 likes · 39 min read
Deep Dive into Java Thread States and Synchronized Lock Implementation
dbaplus Community
dbaplus Community
May 9, 2021 · Databases

Why MySQL Index Merge Triggers Deadlocks and How to Fix Them

This article examines a real‑world MySQL deadlock caused by the Index Merge optimizer, explains InnoDB's lock‑on‑index mechanism, walks through the deadlock logs, and presents four practical solutions including force‑index hints, disabling Index Merge, creating a composite index, and a two‑step update approach.

InnoDBdeadlockindex merge
0 likes · 15 min read
Why MySQL Index Merge Triggers Deadlocks and How to Fix Them
Wukong Talks Architecture
Wukong Talks Architecture
Apr 17, 2021 · Backend Development

Practical Techniques for Ensuring API Idempotency

This article explains the concept of API idempotency, presents common scenarios that cause duplicate data, and details eight practical solutions—including pre‑select before insert, pessimistic and optimistic locking, unique indexes, anti‑duplicate tables, state‑machine checks, distributed locks, and token‑based approaches—along with their implementation steps and caveats.

APIBackendIdempotency
0 likes · 13 min read
Practical Techniques for Ensuring API Idempotency
Su San Talks Tech
Su San Talks Tech
Mar 28, 2021 · Backend Development

How to Ensure API Idempotency: 8 Proven Strategies for Backend Systems

Ensuring API idempotency prevents duplicate data caused by repeated requests, timeouts, or message reprocessing, and can be achieved through techniques such as pre‑insert checks, pessimistic and optimistic locking, unique indexes, anti‑duplicate tables, state‑machine checks, distributed locks, and token‑based validation.

Idempotencydistributed-systemslocking
0 likes · 13 min read
How to Ensure API Idempotency: 8 Proven Strategies for Backend Systems
Selected Java Interview Questions
Selected Java Interview Questions
Mar 18, 2021 · Databases

MySQL Lock Types and Deadlock Analysis

This article explains MySQL's lock levels (table, page, row), the next‑key, gap, and record lock algorithms, illustrates common deadlock scenarios with detailed session examples, and discusses InnoDB's deadlock prevention strategies and practical solutions for avoiding lock conflicts.

InnoDBdatabasedeadlock
0 likes · 16 min read
MySQL Lock Types and Deadlock Analysis
Liangxu Linux
Liangxu Linux
Mar 16, 2021 · Databases

Master MySQL Transactions, Locks, and Advanced Functions: A Hands‑On Guide

This tutorial walks through MySQL's transaction control, lock statements, autocommit settings, manual commit and rollback, savepoints, differences between transactional and non‑transactional tables, SQL mode configurations, common SQL tricks, regular expressions, and a comprehensive catalog of built‑in functions, all illustrated with step‑by‑step examples and code snippets.

SQL ModeSavepointTransactions
0 likes · 25 min read
Master MySQL Transactions, Locks, and Advanced Functions: A Hands‑On Guide
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Feb 19, 2021 · Fundamentals

Comprehensive Guide to Java synchronized Locks: Usage, Scenarios, and Pitfalls

This article explains the various usages of Java's synchronized keyword, including class locks, object locks, static and instance methods, code blocks, and important considerations such as non‑interruptibility, reentrancy, lack of timeout, and best‑practice performance tips, illustrated with multiple demo programs.

javalockingmultithreading
0 likes · 19 min read
Comprehensive Guide to Java synchronized Locks: Usage, Scenarios, and Pitfalls
ITPUB
ITPUB
Jan 28, 2021 · Databases

Why MySQL Index Merge Triggers Deadlocks and How to Fix It

This article explains how MySQL's index‑merge optimization can cause row‑level deadlocks during inventory updates, analyzes the lock sequence and deadlock logs, and presents practical solutions such as forcing a specific index, disabling index‑merge, and creating a composite index.

InnoDBdeadlockindex merge
0 likes · 15 min read
Why MySQL Index Merge Triggers Deadlocks and How to Fix It
vivo Internet Technology
vivo Internet Technology
Jan 20, 2021 · Databases

MySQL Deadlock Investigation Record

The article documents a MySQL 5.6.35 deadlock occurring during inventory deduction, explains how Index Merge caused inconsistent lock ordering across multiple indexes, and offers solutions such as forcing specific indexes, disabling Index Merge, adding composite indexes, or restructuring the SQL to prevent the deadlock.

databasedeadlockindexing
0 likes · 13 min read
MySQL Deadlock Investigation Record
Senior Brother's Insights
Senior Brother's Insights
Dec 8, 2020 · Databases

How MySQL Locks DELETE and SELECT: MVCC, Isolation Levels & Lock Types

This article explains how MySQL's InnoDB engine applies row‑level locks for DELETE and SELECT statements under various index configurations and isolation levels, covering MVCC, snapshot vs current reads, two‑phase locking, gap and next‑key locks, and the impact of primary, unique, non‑unique, and missing indexes.

InnoDBIsolation LevelsMVCC
0 likes · 15 min read
How MySQL Locks DELETE and SELECT: MVCC, Isolation Levels & Lock Types
Top Architect
Top Architect
Oct 14, 2020 · Fundamentals

Deep Dive into Java synchronized: Object Header, Lock Types, and JVM Implementation

This article provides a comprehensive analysis of the HotSpot JVM implementation of the synchronized keyword, covering object header layout, the three lock states (biased, lightweight, heavyweight), their acquisition and release processes, bytecode differences, and practical code examples to help readers understand Java concurrency internals.

JVMObject Headerconcurrency
0 likes · 16 min read
Deep Dive into Java synchronized: Object Header, Lock Types, and JVM Implementation
Tuhu Marketing Technology Team
Tuhu Marketing Technology Team
Oct 10, 2020 · Backend Development

Ensuring Idempotency in Distributed Systems: Strategies and Code Samples

This article explains the concept of idempotency, examines common failure scenarios such as duplicate order creation, coupon redemption, and inventory deduction, and presents practical solutions—including unique identifiers, locking, database constraints, and state‑machine approaches—accompanied by concrete SQL and pseudo‑code examples.

Code ExamplesDistributed SystemsIdempotency
0 likes · 12 min read
Ensuring Idempotency in Distributed Systems: Strategies and Code Samples
MaGe Linux Operations
MaGe Linux Operations
Oct 9, 2020 · Databases

How MySQL Implements Transaction Isolation: Locks, MVCC, and Gap Locks Explained

This article explores the underlying mechanisms MySQL uses to enforce transaction isolation levels, detailing how InnoDB leverages locking, multi-version concurrency control, gap locks, and explicit versus implicit locks to prevent dirty reads, non‑repeatable reads, and phantom reads across the four standard isolation levels.

Database ConcurrencyInnoDBMVCC
0 likes · 11 min read
How MySQL Implements Transaction Isolation: Locks, MVCC, and Gap Locks Explained
Selected Java Interview Questions
Selected Java Interview Questions
Sep 16, 2020 · Databases

In‑Depth Analysis of MySQL/InnoDB Locking Mechanisms

This article provides a comprehensive examination of MySQL/InnoDB locking, covering MVCC, snapshot vs. current reads, cluster indexes, two‑phase locking, isolation levels, detailed lock‑behaviour for various index and isolation combinations, complex query lock analysis, and deadlock detection techniques.

InnoDBIsolation LevelsMVCC
0 likes · 23 min read
In‑Depth Analysis of MySQL/InnoDB Locking Mechanisms
Programmer DD
Programmer DD
Aug 20, 2020 · Fundamentals

Unlocking Java’s synchronized: When Does It Really Protect?

This article explores Java’s synchronized keyword in depth, covering its purpose, usage with object and class locks, seven multithreading scenarios, core principles like reentrancy and visibility, performance drawbacks, and best practices for choosing between synchronized and explicit Lock implementations.

concurrencylockingmultithreading
0 likes · 18 min read
Unlocking Java’s synchronized: When Does It Really Protect?
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 23, 2020 · Databases

Understanding Half-Consistent Reads in InnoDB and Their Impact on Transactions

This article explains the concept of half‑consistent reads in MySQL InnoDB, describes the conditions under which they occur, presents two test cases with detailed lock‑waiting behavior, analyzes why certain sessions are blocked or not, and summarizes the optimization benefits for RC isolation level.

Database PerformanceHalf-Consistent ReadInnoDB
0 likes · 20 min read
Understanding Half-Consistent Reads in InnoDB and Their Impact on Transactions
Top Architect
Top Architect
Jun 17, 2020 · Fundamentals

Understanding Java synchronized: Overview, Usage, Scenarios, Principles, Drawbacks, and FAQs

This article provides a comprehensive guide to Java's synchronized keyword, covering its purpose, object and class lock usage, seven multithreading scenarios, reentrancy and non‑interruptibility properties, underlying lock and visibility mechanisms, performance drawbacks, and common questions with detailed code examples.

javalockingmultithreading
0 likes · 20 min read
Understanding Java synchronized: Overview, Usage, Scenarios, Principles, Drawbacks, and FAQs
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 20, 2020 · Fundamentals

An Introduction to Java synchronized: Features, Implementation, and Optimizations

This article explains the Java synchronized keyword, detailing its four core properties—atomicity, visibility, ordering, and reentrancy—while illustrating its bytecode behavior, lock types, upgrade mechanisms, and JVM optimizations such as biased, lightweight, and heavyweight locks, lock elimination, and lock coarsening.

lockingmultithreadingsynchronized
0 likes · 15 min read
An Introduction to Java synchronized: Features, Implementation, and Optimizations
Programmer DD
Programmer DD
Apr 23, 2020 · Databases

How INSERT INTO SELECT Nearly Crashed a MySQL DB – Lessons & Fix

An engineer’s attempt to migrate millions of orders using INSERT INTO SELECT caused massive table locking, payment failures, and system alerts, but by analyzing the locking behavior and adding an index on the timestamp column, the migration succeeded efficiently, illustrating the importance of proper indexing for large‑scale data moves.

INSERT INTO SELECTdatabase migrationindexing
0 likes · 7 min read
How INSERT INTO SELECT Nearly Crashed a MySQL DB – Lessons & Fix
Selected Java Interview Questions
Selected Java Interview Questions
Mar 13, 2020 · Databases

Can Repeatable Read Prevent Phantom Reads? A Deep Dive into MySQL Transaction Isolation Levels

This article explains MySQL’s transaction isolation levels, clarifies the differences between dirty reads, non‑repeatable reads and phantom reads, and demonstrates through experiments why the REPEATABLE READ level can prevent phantom reads, while also discussing its limitations, MVCC, and locking mechanisms.

MVCCRepeatable Readlocking
0 likes · 14 min read
Can Repeatable Read Prevent Phantom Reads? A Deep Dive into MySQL Transaction Isolation Levels
Java Backend Technology
Java Backend Technology
Mar 13, 2020 · Backend Development

Idempotency Strategies: Preventing Duplicate Operations in High‑Traffic Systems

Idempotency ensures that repeated execution of an operation yields the same result as a single execution, and this article explains its importance in backend systems, outlines concepts, and presents practical techniques such as unique indexes, token mechanisms, pessimistic and optimistic locks, distributed locks, and API design for reliable, duplicate‑free processing.

Distributed SystemsTokenbackend-development
0 likes · 9 min read
Idempotency Strategies: Preventing Duplicate Operations in High‑Traffic Systems
ITPUB
ITPUB
Mar 5, 2020 · Databases

Master MySQL: Transactions, Indexes, Storage Engines, and Performance Optimization

This comprehensive guide explains MySQL fundamentals, transaction handling, ACID properties, isolation levels, indexing strategies, storage engine differences, lock mechanisms, optimistic vs pessimistic locking, and techniques for optimizing large tables in production environments.

Isolation LevelsStorage EnginesTransactions
0 likes · 22 min read
Master MySQL: Transactions, Indexes, Storage Engines, and Performance Optimization
Liangxu Linux
Liangxu Linux
Feb 18, 2020 · Databases

Master MySQL Transactions, Indexes, and Locking: From ACID to Large‑Table Optimization

This guide explains MySQL fundamentals—including what a database is, transaction concepts and ACID properties, isolation levels and their effects, index structures and the left‑most prefix rule, storage engine differences, lock algorithms, and practical techniques for optimizing large tables such as partitioning and sharding.

Isolation LevelsTransactionsdatabase
0 likes · 23 min read
Master MySQL Transactions, Indexes, and Locking: From ACID to Large‑Table Optimization
Programmer DD
Programmer DD
Dec 25, 2019 · Databases

How MySQL Locks DELETE Rows: MVCC, Isolation Levels, and Index Types Explained

This article analyzes how MySQL/InnoDB applies row-level locks for DELETE and SELECT statements under various index configurations and isolation levels, explaining MVCC, current vs. snapshot reads, two‑phase locking, gap and next‑key locks, and the impact of primary, unique, non‑unique, and missing indexes.

InnoDBIsolation LevelsMVCC
0 likes · 15 min read
How MySQL Locks DELETE Rows: MVCC, Isolation Levels, and Index Types Explained
Programmer DD
Programmer DD
Dec 9, 2019 · Backend Development

How to Ensure Idempotency in Distributed Systems: Strategies and Code Examples

This article explains the importance of idempotent operations in backend systems, defines the concept, and presents practical techniques such as unique indexes, token mechanisms, pessimistic and optimistic locking, distributed locks, state‑machine design, and API patterns, complete with code snippets and diagrams.

BackendDistributed SystemsIdempotency
0 likes · 10 min read
How to Ensure Idempotency in Distributed Systems: Strategies and Code Examples
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 27, 2019 · Backend Development

Designing Idempotent Payment Callback Interfaces: Strategies and Implementation

The article explains the concept of idempotency and presents five practical designs—plain processing, JVM lock, pessimistic lock, optimistic lock, and unique‑constraint approaches—illustrated with Alipay recharge callback examples and SQL/Java code to ensure reliable, duplicate‑free payment handling in distributed backend systems.

lockingpayment
0 likes · 9 min read
Designing Idempotent Payment Callback Interfaces: Strategies and Implementation
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 16, 2019 · Databases

Analyzing MySQL InnoDB Deadlock with RC and RR Locks

This article demonstrates how to reproduce and analyze a MySQL InnoDB deadlock involving RC and RR lock modes by constructing a test table, enabling detailed lock logging, and walking through the transaction steps that lead to a circular lock wait, illustrated with logs and diagrams.

deadlocklockingtransaction
0 likes · 8 min read
Analyzing MySQL InnoDB Deadlock with RC and RR Locks
21CTO
21CTO
Jul 23, 2019 · Databases

Master MySQL Fundamentals: Transactions, Indexes, and Performance Optimization

This comprehensive guide covers MySQL basics, transaction concepts and ACID properties, isolation levels, common concurrency problems, indexing principles, storage engine differences, lock mechanisms, and practical optimization techniques for large tables, providing clear explanations and useful SQL examples.

Storage EnginesTransactionsindexes
0 likes · 23 min read
Master MySQL Fundamentals: Transactions, Indexes, and Performance Optimization
JD Retail Technology
JD Retail Technology
Jul 12, 2019 · Databases

Understanding MySQL Lock Mechanisms, Transaction Isolation, and Concurrency Control

This article explains MySQL's lock types—including table and row locks, InnoDB's shared, exclusive, and intention locks—covers lock algorithms such as record, gap, next‑key, and insert‑intention locks, discusses deadlock and blocking issues, and details transaction management, isolation levels, and related configuration parameters.

ACIDInnoDBIsolation
0 likes · 39 min read
Understanding MySQL Lock Mechanisms, Transaction Isolation, and Concurrency Control
dbaplus Community
dbaplus Community
Jul 7, 2019 · Databases

Master MySQL Locking: Table vs Row Locks, InnoDB Algorithms & Transaction Isolation

This article explains MySQL's locking mechanisms, comparing table‑level and row‑level locks, detailing InnoDB lock types such as shared, exclusive and intention locks, describing lock algorithms like record, gap, next‑key and insert‑intention locks, and covering lock‑related issues, transaction isolation levels, autocommit behavior, and group commit optimization.

Group CommitInnoDBIsolation Levels
0 likes · 43 min read
Master MySQL Locking: Table vs Row Locks, InnoDB Algorithms & Transaction Isolation
dbaplus Community
dbaplus Community
Jul 4, 2019 · Databases

How Tencent’s TDSQL Multi‑Source Sync Achieves High‑Performance, Consistent Data Distribution

This article explains the financial‑industry driven requirements for real‑time data sync, describes the TDSQL‑MULTISRCSYNC architecture—including producer, store, and consumer components—and details core designs such as row‑hash concurrency, idempotent binlog handling, and a lock‑based ordering mechanism that ensure high throughput and consistency.

Database ReplicationIdempotencyKafka
0 likes · 13 min read
How Tencent’s TDSQL Multi‑Source Sync Achieves High‑Performance, Consistent Data Distribution
ITPUB
ITPUB
Apr 23, 2019 · Databases

Understanding MySQL Locking Mechanisms: From Row Locks to Gap Locks

This article explains MySQL's three lock types, the storage engines that use them, detailed MyISAM and InnoDB lock behaviors, gap‑lock pitfalls, optimization tips, and how to monitor lock contention with built‑in status variables.

Database PerformanceInnoDBMyISAM
0 likes · 10 min read
Understanding MySQL Locking Mechanisms: From Row Locks to Gap Locks
Youzan Coder
Youzan Coder
Apr 10, 2019 · Databases

Why Does MySQL Hold Locks Until Commit? A Deep Dive into InnoDB Locking

This article explains why MySQL acquires row locks that persist until a transaction commits, using analogies with multithreading, detailed transaction scenarios, the role of intention locks, and how isolation levels affect lock behavior, all illustrated with code examples and diagrams.

InnoDBIsolationdatabase
0 likes · 7 min read
Why Does MySQL Hold Locks Until Commit? A Deep Dive into InnoDB Locking
Youzan Coder
Youzan Coder
Mar 8, 2019 · Databases

MySQL InnoDB Deadlock Case Study and Resolution

An InnoDB deadlock occurs when concurrent UPDATEs on a table with a composite (c,d) index generate conflicting GAP and Next‑Key locks during internal delete‑plus‑insert operations, and the simplest resolution is to drop column d from the index, leaving a single‑column index to prevent the lock clash.

InnoDBdeadlocklocking
0 likes · 10 min read
MySQL InnoDB Deadlock Case Study and Resolution
Youzan Coder
Youzan Coder
Mar 6, 2019 · Databases

Why Concurrent Inserts Trigger MySQL Deadlocks: An In‑Depth InnoDB Lock Analysis

This article examines a MySQL 5.6 InnoDB deadlock scenario caused by concurrent batch INSERTs, detailing the table schema, test cases, lock acquisition phases, log analysis, lock compatibility matrix, and discusses why typical SQL‑level fixes are limited, suggesting index redesign or data sharding as mitigation.

InnoDBconcurrencydatabase
0 likes · 11 min read
Why Concurrent Inserts Trigger MySQL Deadlocks: An In‑Depth InnoDB Lock Analysis
Youzan Coder
Youzan Coder
Mar 1, 2019 · Databases

Why Do MySQL Inserts Cause Deadlocks? A Deep Dive into a Real-World Case

This article analyzes a MySQL deadlock scenario where concurrent inserts and unique‑key conflicts lead to circular lock waits, explains the underlying lock behavior, walks through the full deadlock log, and proposes using INSERT ON DUPLICATE KEY UPDATE to prevent the issue.

InnoDBdatabasedeadlock
0 likes · 7 min read
Why Do MySQL Inserts Cause Deadlocks? A Deep Dive into a Real-World Case
Youzan Coder
Youzan Coder
Feb 22, 2019 · Databases

MySQL Deadlock Case Study and Analysis

The article examines a MySQL 5.6 deadlock caused by concurrent sessions locking a row via a non‑unique index and the primary key in different orders, explains the circular wait illustrated in the log, and recommends updating rows using the primary key to enforce consistent lock ordering and prevent such deadlocks.

InnoDBdeadlocklocking
0 likes · 7 min read
MySQL Deadlock Case Study and Analysis
Youzan Coder
Youzan Coder
Jan 30, 2019 · Operations

Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking

This article examines two MySQL deadlock scenarios under REPEATABLE READ isolation—one with a non‑unique index and another with a unique index—by presenting table definitions, test data, raw deadlock logs, and step‑by‑step analysis of lock acquisition and waiting, ultimately offering practical recommendations to avoid such deadlocks.

Database operationsInnoDBRR Isolation
0 likes · 12 min read
Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking
Programmer DD
Programmer DD
Jan 3, 2019 · Backend Development

Mastering Idempotence: Techniques to Ensure Safe Operations in Backend Systems

This article explains the concept of idempotence, provides real‑world examples such as duplicate form submissions and payment requests, and details practical backend techniques—including query handling, unique indexes, token mechanisms, pessimistic and optimistic locks, distributed locks, and API design—to guarantee that repeated operations produce consistent results without side effects.

IdempotenceTokendatabase
0 likes · 10 min read
Mastering Idempotence: Techniques to Ensure Safe Operations in Backend Systems
Architect's Tech Stack
Architect's Tech Stack
Dec 22, 2018 · Backend Development

Understanding Idempotency: Concepts, Examples, and Implementation Techniques

This article explains the mathematical and programming concept of idempotency, provides real‑world examples such as duplicate form submissions and payment requests, and details practical techniques—including query/select operations, unique indexes, token mechanisms, pessimistic and optimistic locks, distributed locks, and API design—to ensure idempotent behavior in backend systems.

Distributed SystemsIdempotencydatabase
0 likes · 9 min read
Understanding Idempotency: Concepts, Examples, and Implementation Techniques
Programmer DD
Programmer DD
May 28, 2018 · Backend Development

Unveiling Java’s synchronized: How the JVM Implements and Optimizes Locks

This article explains the inner workings of Java's synchronized keyword, covering its implementation via monitorenter/monitorexit, the structure of object headers and monitors, and the series of lock optimizations introduced since JDK 1.6 such as spin locks, lock elimination, lock coarsening, lightweight, biased, and heavyweight locks.

javalockingsynchronized
0 likes · 17 min read
Unveiling Java’s synchronized: How the JVM Implements and Optimizes Locks
Didi Tech
Didi Tech
May 18, 2018 · Backend Development

Understanding the Thundering Herd Problem in Linux and Nginx

The article explains the thundering herd problem where many processes wake for a single event, describes Linux’s kernel fixes for accept() and partial epoll solutions, and details how Nginx avoids the issue using a custom inter‑process accept mutex and lock design.

Linux kernelNginxconcurrency
0 likes · 14 min read
Understanding the Thundering Herd Problem in Linux and Nginx
ITPUB
ITPUB
Feb 8, 2018 · Databases

Understanding MySQL Locking Mechanisms: Types, Queues, and Optimization Tips

This article explains MySQL's row‑level, table‑level, and page‑level locks, maps them to storage engines, details MyISAM and InnoDB lock types, describes the four internal lock queues, and provides practical optimization and monitoring techniques to improve concurrency and performance.

Database OptimizationInnoDBMyISAM
0 likes · 10 min read
Understanding MySQL Locking Mechanisms: Types, Queues, and Optimization Tips
Architecture Digest
Architecture Digest
Jan 25, 2018 · Backend Development

Handling Concurrency and Preventing Duplicate Ticket Booking in Train Ticket Systems

The article examines how a train ticket ordering system can encounter duplicate bookings when multiple users concurrently request the same seat and evaluates four different locking strategies—including flag fields, pessimistic locks, synchronized blocks, and a hybrid optimistic‑pessimistic approach—to ensure data consistency and avoid over‑booking.

Backendlockingoptimistic-lock
0 likes · 5 min read
Handling Concurrency and Preventing Duplicate Ticket Booking in Train Ticket Systems
Qunar Tech Salon
Qunar Tech Salon
Dec 27, 2017 · Backend Development

Understanding the Implementation and Optimization of Java synchronized

This article explains how Java's synchronized keyword works internally, covering its implementation via monitorenter/monitorexit, the role of object headers and monitors, and the various lock optimizations introduced in JDK 1.6 such as spin locks, biased locks, lightweight locks, lock elimination, and lock coarsening.

concurrencyjavalocking
0 likes · 17 min read
Understanding the Implementation and Optimization of Java synchronized
ITPUB
ITPUB
Dec 19, 2017 · Databases

Why a Simple DELETE Triggers a MySQL Deadlock – Step‑by‑Step Log Analysis

The article walks through a puzzling MySQL deadlock caused by two concurrent transactions on a table with a unique index, explains how to read the InnoDB status output, identifies the lock types and order, and shows a detailed step‑by‑step reconstruction of the deadlock scenario.

InnoDBdeadlocklocking
0 likes · 11 min read
Why a Simple DELETE Triggers a MySQL Deadlock – Step‑by‑Step Log Analysis
Tencent Database Technology
Tencent Database Technology
Nov 24, 2017 · Databases

MySQL Metadata Lock (MDL): Usage, Implementation, Deadlock Detection, and Lock‑Free Optimizations

This article explains MySQL's Metadata Lock (MDL) subsystem, describing how MDL protects metadata, the lock types and modes, the transaction‑level implementation introduced in MySQL 5.5 and refined in 5.7, the lock acquisition and release algorithms, deadlock detection mechanisms, and the lock‑free hash table used to store lock objects.

Deadlock DetectionLock-Free HashMDL
0 likes · 25 min read
MySQL Metadata Lock (MDL): Usage, Implementation, Deadlock Detection, and Lock‑Free Optimizations
21CTO
21CTO
Oct 19, 2017 · Backend Development

How to Tackle 50k QPS Flash Sale: Backend Design, Overload Protection, and Anti‑Cheat Strategies

This article examines the technical challenges of handling 50,000 requests per second in flash‑sale systems, covering request interface design, high‑concurrency bottlenecks, overload protection, anti‑cheat mechanisms, and data‑safety techniques such as Redis caching, pessimistic and optimistic locking.

anti-cheatbackend optimizationflash sale
0 likes · 16 min read
How to Tackle 50k QPS Flash Sale: Backend Design, Overload Protection, and Anti‑Cheat Strategies
ITPUB
ITPUB
Oct 17, 2017 · Databases

Understanding MySQL Locking Mechanisms: Types, Queues, and Optimization Tips

This article explains MySQL's lock types across storage engines, details MyISAM and InnoDB locking behaviors, describes the four lock queues, outlines gap‑lock characteristics, and provides practical optimization and monitoring techniques to reduce lock contention.

Database PerformanceInnoDBMyISAM
0 likes · 10 min read
Understanding MySQL Locking Mechanisms: Types, Queues, and Optimization Tips
ITPUB
ITPUB
Sep 18, 2017 · Databases

Why MySQL 5.7 Partition Tables Slow Down: Uncovering an InnoDB Lock Regression

The article investigates a performance regression in MySQL 5.7.18 where partitioned tables cause excessive InnoDB row locking, leading to lock timeouts and slower updates, explains the root cause through source‑code analysis, reproduces the issue, validates the findings, and confirms it as a MySQL bug.

InnoDBPartition Tableslocking
0 likes · 10 min read
Why MySQL 5.7 Partition Tables Slow Down: Uncovering an InnoDB Lock Regression
Ctrip Technology
Ctrip Technology
Sep 4, 2017 · Databases

Investigation of Performance Degradation and Locking Issues in MySQL 5.7.18 Partition Tables

This article investigates the performance degradation and lock timeout issues observed in MySQL 5.7.18 partition tables, reproduces the problem with test cases, analyzes InnoDB lock behavior through source code debugging, validates the root cause related to partition scan locking, and confirms it as a regression bug in MySQL 5.7.

InnoDBPartition Tablesdatabase
0 likes · 8 min read
Investigation of Performance Degradation and Locking Issues in MySQL 5.7.18 Partition Tables
ITPUB
ITPUB
Mar 11, 2017 · Databases

How Does MySQL InnoDB Lock Rows? Deep Dive into MVCC, 2PL, and Deadlocks

This article explains MySQL InnoDB's locking mechanisms—including MVCC snapshot vs. current reads, two‑phase locking, isolation levels, lock types, GAP locks, and deadlock scenarios—by analyzing simple and complex SQL examples and showing how different index and isolation configurations affect lock acquisition.

InnoDBIsolationMVCC
0 likes · 25 min read
How Does MySQL InnoDB Lock Rows? Deep Dive into MVCC, 2PL, and Deadlocks
MaGe Linux Operations
MaGe Linux Operations
Aug 22, 2016 · Databases

Master MySQL Transaction Isolation Levels and Locking Mechanisms

An in‑depth guide explains MySQL’s four transaction isolation levels, how to modify them globally or per session, the role of autocommit, shared and exclusive lock mechanisms, and provides step‑by‑step InnoDB examples with screenshots illustrating each level’s behavior.

Database ConcurrencyInnoDBlocking
0 likes · 8 min read
Master MySQL Transaction Isolation Levels and Locking Mechanisms
ITPUB
ITPUB
Apr 26, 2016 · Databases

Why Deleting a Single Row by Unique Index Can Still Cause MySQL Deadlocks

This article analyzes a puzzling MySQL deadlock scenario where concurrent DELETE statements on a uniquely indexed row lead to a deadlock, explaining the lock modes, InnoDB's deadlock‑prevention strategy, and the conditions that make such deadlocks possible.

InnoDBRepeatable ReadUnique Index
0 likes · 13 min read
Why Deleting a Single Row by Unique Index Can Still Cause MySQL Deadlocks
21CTO
21CTO
Apr 16, 2016 · Databases

How MySQL InnoDB Locks Work: From MVCC Basics to Deadlock Analysis

This article provides an in‑depth analysis of MySQL/InnoDB locking mechanisms, covering MVCC snapshot vs current reads, cluster indexes, two‑phase locking, isolation levels, lock behavior for simple and complex SQL statements, and practical deadlock diagnosis techniques.

Database ConcurrencyInnoDBIsolation Level
0 likes · 26 min read
How MySQL InnoDB Locks Work: From MVCC Basics to Deadlock Analysis
Qunar Tech Salon
Qunar Tech Salon
Mar 15, 2016 · Databases

Analysis of MySQL InnoDB Locking Mechanisms and Deadlock Scenarios

This report details a series of MySQL InnoDB experiments that examine transaction locking, lock types, gap and next‑key locks, and deadlock behavior across various SQL operations, providing practical insights for optimizing concurrency and preventing deadlocks.

InnoDBTransactionsdeadlock
0 likes · 16 min read
Analysis of MySQL InnoDB Locking Mechanisms and Deadlock Scenarios
Architect
Architect
Feb 6, 2016 · Databases

Introduction to InnoDB Transaction Lock System

This article provides a comprehensive overview of InnoDB's transaction lock mechanisms, covering row‑level lock types, table‑level locks, lock management procedures, deadlock detection, and practical examples, all based on MySQL 5.7.10.

Database InternalsInnoDBTransaction Locks
0 likes · 30 min read
Introduction to InnoDB Transaction Lock System