Tagged articles
143 articles
Page 1 of 2
Xiaohongshu Tech REDtech
Xiaohongshu Tech REDtech
Jan 19, 2026 · Databases

How Merged Seckill Boosts MySQL Write Throughput 5× for High‑Traffic E‑Commerce

The article details a MySQL kernel‑level merged‑seckill optimization that replaces traditional queue‑based flash‑sale handling, achieving up to 5.5× higher TPS (up to 23,543 TPS on 128 threads) and sustaining 1.5W+ orders per second, while remaining transparent to applications and preserving compatibility with existing SQL.

CacheLockPerformance Optimization
0 likes · 11 min read
How Merged Seckill Boosts MySQL Write Throughput 5× for High‑Traffic E‑Commerce
Tech Freedom Circle
Tech Freedom Circle
Aug 18, 2025 · Interview Experience

How to Hand‑Write a Simple AbstractQueuedSynchronizer (AQS) for High‑Pay Java Interviews

This article walks through the fundamentals of Java's AbstractQueuedSynchronizer, covering lock‑queue relationships, CLH lock internals, dummy head nodes, state management, and step‑by‑step implementations of acquire, addWaiter, acquireQueued, shouldParkAfterFailedAcquire, and release methods, complete with runnable example code.

AQSAbstractQueuedSynchronizerJava
0 likes · 29 min read
How to Hand‑Write a Simple AbstractQueuedSynchronizer (AQS) for High‑Pay Java Interviews
Cognitive Technology Team
Cognitive Technology Team
Aug 17, 2025 · Backend Development

synchronized vs Lock in Java: When to Choose Each for Thread Safety

This article examines the core differences between Java's synchronized keyword and the Lock interface, covering their principles, performance, flexibility, visibility guarantees, reentrancy, interruption handling, and practical selection guidelines with code examples, tables, and real‑world scenarios to help developers choose the appropriate locking mechanism.

JavaLockReentrantLock
0 likes · 9 min read
synchronized vs Lock in Java: When to Choose Each for Thread Safety
Tech Freedom Circle
Tech Freedom Circle
Jul 8, 2025 · Backend Development

How to Diagnose and Prevent Java Deadlocks (Alibaba & Other Big‑Company Interviews)

This article explains what a deadlock is, the four necessary conditions that cause it, demonstrates classic synchronized‑based and Lock‑based deadlock examples in Java, shows how to detect deadlocks with tools such as Arthas, jstack, jvisualvm and JMC, and provides practical strategies—including lock ordering, timeout locks, and two‑phase locking—to break each condition and avoid deadlocks in production code.

ArthasJavaLock
0 likes · 24 min read
How to Diagnose and Prevent Java Deadlocks (Alibaba & Other Big‑Company Interviews)
Deepin Linux
Deepin Linux
May 20, 2025 · Fundamentals

Understanding and Preventing Deadlocks in C++ Multithreaded Programming

This article explains what deadlocks are in C++ multithreaded programming, outlines their causes and four necessary conditions, presents common scenarios and code examples, and offers practical strategies such as consistent lock ordering, std::lock, std::scoped_lock, recursive mutexes, and lock hierarchies to avoid them.

C++Lockconcurrency
0 likes · 20 min read
Understanding and Preventing Deadlocks in C++ Multithreaded Programming
Architect's Must-Have
Architect's Must-Have
May 7, 2025 · Backend Development

How ReentrantLock Works: Inside Java’s AbstractQueuedSynchronizer

This article dissects Java’s ReentrantLock implementation, detailing its delegation to AbstractQueuedSynchronizer, the lock acquisition process, the role of non‑fair and fair sync subclasses, the internal CLH queue mechanics, and how unlocking is handled, while comparing Lock with synchronized.

AbstractQueuedSynchronizerJavaLock
0 likes · 14 min read
How ReentrantLock Works: Inside Java’s AbstractQueuedSynchronizer
Python Programming Learning Circle
Python Programming Learning Circle
Apr 17, 2025 · Fundamentals

Understanding Processes, Threads, and the GIL in Python

This article explains the concepts of processes and threads, describes Python's Global Interpreter Lock (GIL) and its impact on concurrency, compares the low‑level _thread module with the higher‑level threading module, and provides example code illustrating thread creation, synchronization with locks, and common pitfalls.

GILLockconcurrency
0 likes · 5 min read
Understanding Processes, Threads, and the GIL in Python
Architect's Guide
Architect's Guide
Apr 2, 2025 · Backend Development

Implementing High‑Concurrency SecKill (Flash Sale) in SpringBoot: Locking, Transaction, and Queue Strategies

This article demonstrates how to simulate a high‑concurrency flash‑sale scenario with SpringBoot and MySQL, analyzes why naive lock‑and‑transaction code causes overselling, and presents six refined solutions—including early locking, AOP, pessimistic and optimistic database locks, blocking queues, and Disruptor queues—along with performance observations and a concise summary.

LockQueueSeckill
0 likes · 22 min read
Implementing High‑Concurrency SecKill (Flash Sale) in SpringBoot: Locking, Transaction, and Queue Strategies
Su San Talks Tech
Su San Talks Tech
Mar 28, 2025 · Backend Development

Unlocking Java’s Synchronized: How the JVM Implements Locks

This article explains the low‑level implementation of Java's synchronized keyword, covering monitorenter/monitorexit bytecode, object header structures, Mark Word layouts, and the evolution from heavyweight locks to biased and lightweight locks with lock‑upgrade mechanisms.

JVMJavaLock
0 likes · 11 min read
Unlocking Java’s Synchronized: How the JVM Implements Locks
Su San Talks Tech
Su San Talks Tech
Jan 23, 2025 · Backend Development

How to Prevent Overselling in High‑Concurrency Flash Sale Systems

This article explores common overselling problems in high‑concurrency flash‑sale scenarios and presents seven practical solutions—including lock timing adjustments, AOP locking, pessimistic and optimistic database locks, and queue‑based approaches—each illustrated with SpringBoot code and performance test results.

JavaLockSeckill
0 likes · 20 min read
How to Prevent Overselling in High‑Concurrency Flash Sale Systems
Architect
Architect
Jan 18, 2025 · Backend Development

Mastering High‑Concurrency Flash‑Sale: 7 Locking & Queue Strategies in SpringBoot

This article analyzes a high‑concurrency flash‑sale scenario using SpringBoot, MySQL, and JMeter, demonstrates seven implementations—from service‑level locks to AOP, pessimistic/optimistic locks, and queue‑based designs—examines their trade‑offs with concrete code, test results, and practical recommendations.

JMeterLockQueue
0 likes · 20 min read
Mastering High‑Concurrency Flash‑Sale: 7 Locking & Queue Strategies in SpringBoot
Senior Tony
Senior Tony
Jan 13, 2025 · Backend Development

How Java’s AQS Powers ReentrantLock – A Deep Dive into the Source

This article explains the core concepts of Java’s AbstractQueuedSynchronizer (AQS), its exclusive and shared modes, the template‑method design it uses, and walks through the actual source code showing how ReentrantLock implements both fair and non‑fair locking, complete with diagrams and code snippets for interview preparation.

AQSJavaLock
0 likes · 10 min read
How Java’s AQS Powers ReentrantLock – A Deep Dive into the Source
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 9, 2025 · Fundamentals

Master Java Thread Communication: wait/notify, Locks, Conditions & BlockingQueue

This article explores Java's thread communication techniques—including the basic wait/notify mechanism, advanced Lock and Condition usage, and the thread‑safe BlockingQueue—providing detailed explanations, producer‑consumer examples, and additional concurrency utilities like CountDownLatch, illustrating how to coordinate threads efficiently in multithreaded applications.

BlockingQueueConditionCountDownLatch
0 likes · 18 min read
Master Java Thread Communication: wait/notify, Locks, Conditions & BlockingQueue
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 6, 2025 · Backend Development

Master Thread Sequencing in Java: 8 Proven Techniques

This article explains why thread execution order is nondeterministic and presents eight Java techniques—join, single‑thread executor, CountDownLatch, CyclicBarrier, Semaphore, synchronized with wait/notify, and Lock with Condition—to reliably enforce sequential execution, complete with clear code examples for each method.

CountDownLatchExecutorServiceJava
0 likes · 13 min read
Master Thread Sequencing in Java: 8 Proven Techniques
FunTester
FunTester
Dec 31, 2024 · Backend Development

Mastering Java ReentrantLock: Blocking, Interruptible, and Timeout Locks Explained

This article explains the Java java.util.concurrent.locks.Lock interface and its ReentrantLock implementation, detailing the advantages of reentrancy, interruptibility, and timeout features, and provides practical code examples for blocking, interruptible, and timed lock acquisition along with best‑practice recommendations.

LockReentrantLockconcurrency
0 likes · 12 min read
Mastering Java ReentrantLock: Blocking, Interruptible, and Timeout Locks Explained
Su San Talks Tech
Su San Talks Tech
Oct 23, 2024 · Backend Development

Unlocking Java’s AQS: A Deep Dive into AbstractQueuedSynchronizer and Concurrency Primitives

This article explores the origins of Java's JUC package, explains the core concepts of AbstractQueuedSynchronizer—including template methods, exclusive and shared acquisition, CLH queues, CAS, and LockSupport—and demonstrates how locks, conditions, and synchronization mechanisms are implemented and used in real-world Java concurrency.

AQSConditionJava
0 likes · 30 min read
Unlocking Java’s AQS: A Deep Dive into AbstractQueuedSynchronizer and Concurrency Primitives
macrozheng
macrozheng
Oct 11, 2024 · Backend Development

Does Spring Commit Before Unlock? Unraveling Transaction Timing in High‑Concurrency

This article dissects the exact moment a Spring @Transactional method commits relative to a surrounding lock, explains why committing after unlock can cause overselling, and provides source‑level debugging techniques to verify transaction start, commit, and rollback behavior in MySQL under high concurrency.

JavaLockconcurrency
0 likes · 21 min read
Does Spring Commit Before Unlock? Unraveling Transaction Timing in High‑Concurrency
Java Architect Essentials
Java Architect Essentials
Aug 11, 2024 · Backend Development

Why @Transactional Can Invalidate Locks in Spring and How to Fix It

This article explains how using Spring's @Transactional annotation together with explicit locks can cause unexpected concurrency issues, demonstrates the problem with sample code, analyzes why the lock becomes ineffective, and presents solutions such as separating transactional methods, using programmatic transactions, or locking the entire transaction.

JavaLockconcurrency
0 likes · 6 min read
Why @Transactional Can Invalidate Locks in Spring and How to Fix It
MaGe Linux Operations
MaGe Linux Operations
Jul 25, 2024 · Fundamentals

Unlock Python Multithreading: A Complete Guide to Threads, Locks, and Queues

This article provides a comprehensive overview of Python multithreading, covering basic concepts, the _thread and threading modules, thread creation methods, synchronization primitives like Lock and RLock, thread-local storage, thread pools, and the differences between multithreading and multiprocessing for both CPU‑bound and I/O‑bound workloads.

LockPythonQueue
0 likes · 24 min read
Unlock Python Multithreading: A Complete Guide to Threads, Locks, and Queues
Meituan Technology Team
Meituan Technology Team
Jul 18, 2024 · Fundamentals

Multithreading Programming: Concepts, Synchronization, and Best Practices

Multithreaded programming splits tasks across logical and hardware threads to exploit multicore CPUs, requiring careful use of synchronization primitives such as mutexes, read‑write locks, condition variables, and lock‑free atomics, while avoiding pitfalls like race conditions, deadlocks, and false sharing for correct, high‑performance software.

CLockSynchronization
0 likes · 65 min read
Multithreading Programming: Concepts, Synchronization, and Best Practices
macrozheng
macrozheng
May 11, 2024 · Backend Development

When Does @Transactional Commit? Before or After Unlock?

This article explains the timing of Spring's @Transactional commit relative to lock release, analyzes why committing after unlock can cause overselling, shows how to trace the transaction lifecycle in the source code, and offers practical solutions to ensure atomicity in high‑concurrency scenarios.

JavaLockconcurrency
0 likes · 19 min read
When Does @Transactional Commit? Before or After Unlock?
Java Architect Essentials
Java Architect Essentials
Feb 2, 2024 · Databases

Understanding KeyDB: Multithreaded Architecture, Connection Management, Fastlock, and Active‑Replica

This article introduces KeyDB, a high‑performance multithreaded fork of Redis, explaining its architecture, thread model, connection management, fastlock mechanism, and active‑replica features, while providing code examples and performance comparisons, and highlighting their impact on throughput and latency.

KeyDBLockReplication
0 likes · 10 min read
Understanding KeyDB: Multithreaded Architecture, Connection Management, Fastlock, and Active‑Replica
Selected Java Interview Questions
Selected Java Interview Questions
Dec 28, 2023 · Databases

KeyDB Multithreaded Architecture, Connection Management, Fastlock, and Active‑Replica Mechanism

This article explains how KeyDB, a multithreaded fork of Redis, restructures the original single‑threaded design by introducing worker threads, per‑thread connection handling, a fastlock spin‑lock implementation, and an active‑replica feature that enables writable replicas with conflict‑resolution using timestamped keys.

Active-ReplicaKeyDBLock
0 likes · 9 min read
KeyDB Multithreaded Architecture, Connection Management, Fastlock, and Active‑Replica Mechanism
HelloTech
HelloTech
Jul 28, 2023 · Backend Development

Understanding Java's AbstractQueuedSynchronizer (AQS) and ReentrantLock Implementation

The article explains Java’s AbstractQueuedSynchronizer framework and how ReentrantLock uses its inner Sync classes—FairSync and NonfairSync—to manage lock acquisition via CAS, queueing, spinning, and parking, detailing the acquire/release loops, fair vs non‑fair behavior, and interview‑ready insights.

AQSJavaLock
0 likes · 12 min read
Understanding Java's AbstractQueuedSynchronizer (AQS) and ReentrantLock Implementation
Code Ape Tech Column
Code Ape Tech Column
Jul 25, 2023 · Backend Development

High‑Concurrency Seckill Implementation in SpringBoot: Locking Strategies and Performance Testing

This article demonstrates how to simulate a high‑concurrency flash‑sale scenario using SpringBoot, MySQL and JMeter, analyzes why naive lock‑and‑transaction code causes overselling, and presents six refined solutions—including controller‑level locking, AOP locking, pessimistic and optimistic database locks, and queue‑based approaches—along with performance test results.

JMeterLockQueue
0 likes · 20 min read
High‑Concurrency Seckill Implementation in SpringBoot: Locking Strategies and Performance Testing
dbaplus Community
dbaplus Community
Jul 16, 2023 · Databases

How Do MySQL Locks Cause Deadlocks? Real‑World Cases and Solutions

This article explains MySQL deadlocks through practical examples, covering lock types, exclusive vs. shared locks, lock‑in‑share‑mode vs. FOR UPDATE differences, real‑world deadlock scenarios, and multiple strategies—including isolation level tweaks, optimistic locking, and distributed locks—to prevent and resolve them.

Lockfor updatemysql
0 likes · 19 min read
How Do MySQL Locks Cause Deadlocks? Real‑World Cases and Solutions
Aikesheng Open Source Community
Aikesheng Open Source Community
May 11, 2023 · Databases

Why MySQL 8.0 Upgrade Can Suddenly Slow Down Queries: The Hidden Lock Table Trap

After upgrading from MySQL 5.7 to 8.0, a client experienced a flood of slow queries despite low system load; the root cause was a change in the sys.innodb_lock_waits view that now relies on performance_schema.data_locks, whose large lock table holds a global mutex and blocks other transactions, a problem solved by adding an index to reduce lock volume.

InnoDBLockdatabase
0 likes · 11 min read
Why MySQL 8.0 Upgrade Can Suddenly Slow Down Queries: The Hidden Lock Table Trap
Selected Java Interview Questions
Selected Java Interview Questions
May 5, 2023 · Backend Development

High‑Frequency Java Concurrency Questions: AQS, Locks, Thread Pools, Blocking Queues, CountDownLatch, Semaphore, CopyOnWriteArrayList, and ConcurrentHashMap

This article explains the core concepts and common pitfalls of Java's AbstractQueuedSynchronizer (AQS) and its derived utilities such as ReentrantLock, ReentrantReadWriteLock, CountDownLatch, Semaphore, as well as the design and behavior of blocking queues, thread‑pool parameters, CopyOnWriteArrayList, and ConcurrentHashMap, providing code examples and practical guidance.

AQSBlockingQueueConcurrentHashMap
0 likes · 21 min read
High‑Frequency Java Concurrency Questions: AQS, Locks, Thread Pools, Blocking Queues, CountDownLatch, Semaphore, CopyOnWriteArrayList, and ConcurrentHashMap
JD Retail Technology
JD Retail Technology
Feb 21, 2023 · Fundamentals

Understanding Java Object Memory Layout, Monitor, and Synchronization Mechanisms

This article explains the JVM object memory layout—including object header, instance data, and alignment padding—details the structure of the Mark Word and Klass Word, describes how monitors and the synchronized keyword work at the bytecode level, and covers lock states, inflation, bias revocation, and spin optimizations with practical code examples.

JVMJavaLock
0 likes · 20 min read
Understanding Java Object Memory Layout, Monitor, and Synchronization Mechanisms
Java High-Performance Architecture
Java High-Performance Architecture
Feb 1, 2023 · Backend Development

7 Proven Ways to Prevent Overselling in High‑Concurrency Flash Sales with Java

This article explores why simple @Transactional locking can still cause product overselling under high concurrency, then presents seven detailed Java/SpringBoot solutions—including improved locking, AOP, pessimistic and optimistic database locks, and queue‑based approaches—complete with code, performance tests and best‑practice recommendations.

JavaLockSpringBoot
0 likes · 21 min read
7 Proven Ways to Prevent Overselling in High‑Concurrency Flash Sales with Java
IT Xianyu
IT Xianyu
Dec 2, 2022 · Databases

How MySQL InnoDB Implements ACID: Locks, MVCC, and Logging

This article explains how MySQL's InnoDB engine guarantees ACID properties by describing the four components of ACID, the four isolation levels, lock granularity and types, the MVCC mechanism with version chains and read views, and the roles of undo, redo, and bin logs in ensuring atomicity, consistency, isolation, and durability.

ACIDInnoDBLock
0 likes · 14 min read
How MySQL InnoDB Implements ACID: Locks, MVCC, and Logging
DaTaobao Tech
DaTaobao Tech
Sep 16, 2022 · Databases

Investigation of Hanging Transactions and Lock Wait Timeout in MySQL InnoDB

The article investigates MySQL InnoDB lock‑wait timeouts caused by hanging transactions that lack proper commit or rollback, explains ACID and lock mechanisms, shows how stale ThreadLocal bindings let pooled threads reuse unfinished transactions, and recommends using @Transactional with robust try‑catch handling to prevent such deadlocks.

DebuggingHangingTransactionInnoDB
0 likes · 14 min read
Investigation of Hanging Transactions and Lock Wait Timeout in MySQL InnoDB
dbaplus Community
dbaplus Community
Aug 29, 2022 · Databases

Why Parallel DELETEs on a MySQL Table Trigger Lock Wait Timeouts

When trying to change a table’s primary key from int to bigint, a 500‑million‑row MySQL table required data archiving and a bulk MODIFY, but parallel DELETE statements caused lock‑wait timeouts; experiments reveal that under REPEATABLE READ the range scan locks the boundary row, leading to contention.

DELETELarge TablesLock
0 likes · 11 min read
Why Parallel DELETEs on a MySQL Table Trigger Lock Wait Timeouts
Top Architect
Top Architect
Aug 23, 2022 · Backend Development

Understanding the Implementation of synchronized in Java and Its Differences with Lock

This article explains how Java's synchronized keyword works at the JVM level, detailing monitorenter/monitorexit bytecode, the role of object monitors, differences between synchronized methods and blocks, and compares its behavior and performance with explicit Lock implementations such as ReentrantLock, including code examples and practical considerations.

JVMJavaLock
0 likes · 8 min read
Understanding the Implementation of synchronized in Java and Its Differences with Lock
Selected Java Interview Questions
Selected Java Interview Questions
Aug 22, 2022 · Backend Development

Understanding Java synchronized and Lock Mechanisms: From Basic Locks to Advanced Optimizations

This article explains Java thread‑safety concepts, the synchronized keyword, its underlying monitor implementation, lock‑upgrade stages, JVM optimizations such as lock elimination and coarsening, and compares explicit Lock interfaces like ReentrantLock and ReadWriteLock, helping developers choose the appropriate synchronization tool.

JVMLockReadWriteLock
0 likes · 16 min read
Understanding Java synchronized and Lock Mechanisms: From Basic Locks to Advanced Optimizations
Su San Talks Tech
Su San Talks Tech
Aug 19, 2022 · Fundamentals

Master Java Concurrency: 60+ Interview Q&A on Threads, Locks & Thread Pools

This comprehensive guide explores Java concurrency fundamentals, covering thread creation, lifecycle, synchronization mechanisms, lock implementations, thread-local storage, memory model, atomic classes, common concurrency utilities, and detailed explanations of thread pools, their configurations, states, and best practices, accompanied by over sixty interview-style questions and code examples.

JavaLockSynchronization
0 likes · 81 min read
Master Java Concurrency: 60+ Interview Q&A on Threads, Locks & Thread Pools
Python Programming Learning Circle
Python Programming Learning Circle
Aug 10, 2022 · Fundamentals

Implementing Thread‑Safe Singleton Pattern in Python

This article explains the purpose of the Singleton design pattern, demonstrates multiple Python implementations—including module‑level singletons, decorators, class‑based approaches, __new__ method, and metaclass techniques—and shows how to add thread‑safety with locks to ensure only one instance exists across concurrent executions.

DecoratorLockMetaclass
0 likes · 10 min read
Implementing Thread‑Safe Singleton Pattern in Python
JavaEdge
JavaEdge
Jun 2, 2022 · Backend Development

How Does Java’s synchronized Work? A Deep Dive into Lock Mechanisms

This article simulates a Baidu interview to explain the underlying implementation of Java’s synchronized keyword, covering monitorenter/monitorexit bytecode, object header Mark Word, lock states, lock escalation from biased to heavyweight, and the role of CAS in lock acquisition and release.

JVMJavaLock
0 likes · 10 min read
How Does Java’s synchronized Work? A Deep Dive into Lock Mechanisms
IT Architects Alliance
IT Architects Alliance
Apr 29, 2022 · Fundamentals

Why Your Java Producer‑Consumer Code Deadlocks and How to Fix It

This article explains the root causes of thread‑safety problems in Java producer‑consumer scenarios, demonstrates how race conditions and deadlocks arise, and provides step‑by‑step solutions using synchronized blocks, wait/notify, notifyAll, and explicit Lock with Condition objects.

JavaLockProducer Consumer
0 likes · 20 min read
Why Your Java Producer‑Consumer Code Deadlocks and How to Fix It
Top Architect
Top Architect
Apr 27, 2022 · Fundamentals

Understanding Thread Safety, Synchronization, and Locks in Java

This article explains the fundamentals of thread safety in Java, illustrating common pitfalls in producer‑consumer scenarios, demonstrating how synchronized, wait/notify, and the explicit Lock/Condition mechanisms can be used to avoid data races, deadlocks, and inconsistent state while providing complete code examples.

JavaLockSynchronization
0 likes · 20 min read
Understanding Thread Safety, Synchronization, and Locks in Java
Java Backend Technology
Java Backend Technology
Apr 7, 2022 · Backend Development

Does @Transactional Commit Before Unlock? Deep Dive into Spring Transaction Timing

This article explores the precise moment a Spring @Transactional transaction is committed relative to a surrounding lock release, revealing that commits occur after the method finishes, and demonstrates how to verify this through source code inspection, debugging techniques, and proper lock‑usage to prevent overselling.

DebuggingLockmysql
0 likes · 21 min read
Does @Transactional Commit Before Unlock? Deep Dive into Spring Transaction Timing
DaTaobao Tech
DaTaobao Tech
Mar 7, 2022 · Databases

MySQL InnoDB Lock Types and Deadlock Analysis

The article explains MySQL InnoDB lock scopes and modes—including record, gap, next‑key and insert‑intention locks—illustrates a deadlock caused by concurrent inserts on a distributed lock table, and recommends limiting concurrency, sharding by business key, and splitting lock operations into smaller sub‑transactions to avoid such deadlocks.

InnoDBLockdatabase
0 likes · 16 min read
MySQL InnoDB Lock Types and Deadlock Analysis
Selected Java Interview Questions
Selected Java Interview Questions
Oct 11, 2021 · Fundamentals

Understanding Java Thread Interruption: Methods, Checks, and Best Practices

This article explains how Java's thread interruption works, covering the interrupt() method, proper ways to check interrupt status, handling InterruptedException in loops, using interrupt‑aware locks, dealing with blocking I/O, and common pitfalls such as swallowing exceptions or attempting to interrupt deadlocked threads.

Interruptible I/OJavaLock
0 likes · 16 min read
Understanding Java Thread Interruption: Methods, Checks, and Best Practices
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 22, 2021 · Fundamentals

Understanding and Solving Deadlocks in Java: Demonstrations, Causes, Detection Tools, and Solutions

This article explains Java deadlocks with synchronized and Lock examples, outlines the four necessary conditions, introduces detection tools such as jstack, jconsole, jvisualvm and jmc, and presents practical solutions including sequential locking and polling lock techniques with optimizations to avoid loops and starvation.

DebuggingLockSynchronization
0 likes · 27 min read
Understanding and Solving Deadlocks in Java: Demonstrations, Causes, Detection Tools, and Solutions
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Aug 11, 2021 · Databases

How MySQL InnoDB Guarantees ACID: Locks, MVCC, and Log Mechanics

This article explains how MySQL's InnoDB engine implements ACID properties by detailing transaction atomicity, consistency, isolation levels, lock granularity, MVCC version chains, undo/redo logs, buffer pool behavior, and the interplay between redo log and binlog to ensure durability and data integrity.

ACIDInnoDBLock
0 likes · 16 min read
How MySQL InnoDB Guarantees ACID: Locks, MVCC, and Log Mechanics
Java Architect Essentials
Java Architect Essentials
Aug 2, 2021 · Backend Development

Java Garbage Collection, JVM Memory Model, Concurrency Locks, Thread Pools and Distributed Locking

The article provides a comprehensive overview of Java garbage‑collection algorithms, JVM memory regions, object reachability analysis, the semantics of volatile, synchronized and ReentrantLock, thread‑pool creation and operation, deadlock examples, distributed‑lock strategies, and related tooling such as JUC utilities and Git conflict handling.

Garbage CollectionJVMJava
0 likes · 23 min read
Java Garbage Collection, JVM Memory Model, Concurrency Locks, Thread Pools and Distributed Locking
dbaplus Community
dbaplus Community
Jul 6, 2021 · Databases

Why Do MySQL Transactions Deadlock and How Can You Prevent It?

This article explains the root causes of MySQL deadlocks in InnoDB, walks through transaction and lock fundamentals, analyzes real‑world log cases, and presents practical solutions such as adjusting isolation levels, using SELECT FOR UPDATE, adding unique indexes, or checking existence before deletion to eliminate deadlocks.

InnoDBLockdatabase
0 likes · 12 min read
Why Do MySQL Transactions Deadlock and How Can You Prevent It?
Top Architect
Top Architect
May 26, 2021 · Databases

How MySQL InnoDB Implements ACID: Locks, MVCC, and Logging

This article explains how MySQL InnoDB guarantees the ACID properties—Atomicity, Consistency, Isolation, and Durability—through its lock mechanisms, multi‑version concurrency control, undo/redo logs, buffer pool management, and the interaction between binlog and redo log.

ACIDInnoDBLock
0 likes · 12 min read
How MySQL InnoDB Implements ACID: Locks, MVCC, and Logging
Tech Musings
Tech Musings
May 14, 2021 · Databases

How to Diagnose and Fix MySQL Deadlocks Using Locks and Indexes

This article explains why MySQL deadlocks occur in a test module, details table and row lock mechanisms, reproduces the deadlock scenario with two sessions, analyzes lock logs, and provides a solution by adding a composite index to prevent the conflict.

InnoDBLockSQL
0 likes · 19 min read
How to Diagnose and Fix MySQL Deadlocks Using Locks and Indexes
Python Crawling & Data Mining
Python Crawling & Data Mining
May 14, 2021 · Fundamentals

Master Python Threading: From Basics to Advanced Techniques

This article provides a comprehensive guide to Python threading, covering core concepts such as thread creation, synchronization primitives like locks, RLocks, conditions, semaphores, events, local storage, and timers, complete with practical code examples and explanations of their usage and pitfalls.

LockPythonSynchronization
0 likes · 12 min read
Master Python Threading: From Basics to Advanced Techniques
Architecture Digest
Architecture Digest
Apr 25, 2021 · Databases

MySQL Lock Types and Deadlock Analysis

This article explains MySQL's lock granularity (table, row, page), the different lock modes such as next‑key, gap and record locks, illustrates common deadlock scenarios with detailed SQL examples, and discusses InnoDB's deadlock prevention strategies and best‑practice solutions.

InnoDBLockSQL
0 likes · 14 min read
MySQL Lock Types and Deadlock Analysis
Java Backend Technology
Java Backend Technology
Apr 4, 2021 · Databases

Mastering MySQL Lock Types and Deadlock Prevention

This article explains MySQL's three lock levels, the algorithms behind next‑key, gap, and record locks, illustrates common deadlock scenarios with real SQL examples, and outlines InnoDB's lock‑prevention strategies to help developers avoid and resolve deadlocks.

InnoDBLockdatabase
0 likes · 15 min read
Mastering MySQL Lock Types and Deadlock Prevention
Alibaba Cloud Developer
Alibaba Cloud Developer
Jan 22, 2021 · Databases

Why Do MySQL Deadlocks Occur and How to Prevent Them?

This article examines the root causes of MySQL deadlocks in online services, explains transaction and lock mechanisms such as UndoLog and RedoLog, analyzes real‑world cases, and presents practical strategies—including isolation level adjustments and pre‑delete checks—to avoid and resolve deadlock issues.

InnoDBLockdatabase
0 likes · 11 min read
Why Do MySQL Deadlocks Occur and How to Prevent Them?
360 Quality & Efficiency
360 Quality & Efficiency
Dec 25, 2020 · Backend Development

Evolution of Redis Distributed Locks and Redisson Implementation Analysis

This article explains how distributed lock requirements arise when scaling from monolithic to multi‑server architectures, reviews the evolution of Redis‑based locking mechanisms from simple SETNX to Lua scripts and Redisson's advanced features, and provides detailed source‑code analysis of Redisson's lock, unlock, and lock acquisition implementations.

Lockconcurrencyredis
0 likes · 12 min read
Evolution of Redis Distributed Locks and Redisson Implementation Analysis
php Courses
php Courses
Nov 2, 2020 · Backend Development

Using Laravel's RedisLock to Prevent Cache Breakdown

This article explains the cache breakdown problem, introduces Laravel 7's built‑in RedisLock class, details its constructor parameters, and provides a complete code example demonstrating how to acquire and release a Redis lock to safely populate and update cached data.

BackendCacheLaravel
0 likes · 3 min read
Using Laravel's RedisLock to Prevent Cache Breakdown
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 2, 2020 · Backend Development

Java Multithreaded Sequential Printing: Solutions Using Lock, wait/notify, Condition, Semaphore, and LockSupport

This article presents various Java solutions for common interview multithreading problems that require sequential printing, demonstrating implementations using Lock, wait/notify, Condition, Semaphore, and LockSupport, along with detailed code examples and explanations of thread communication mechanisms.

JavaLockconcurrency
0 likes · 15 min read
Java Multithreaded Sequential Printing: Solutions Using Lock, wait/notify, Condition, Semaphore, and LockSupport
ITPUB
ITPUB
Oct 9, 2020 · Databases

Understanding MySQL Lock Types and How to Resolve Common Deadlocks

This article explains MySQL's table, row, and page lock levels, the mechanics of next‑key locks, common deadlock scenarios with practical examples, and offers concrete SQL techniques and InnoDB strategies to prevent and troubleshoot deadlocks.

InnoDBLockdatabase
0 likes · 14 min read
Understanding MySQL Lock Types and How to Resolve Common Deadlocks
Su San Talks Tech
Su San Talks Tech
Oct 7, 2020 · Backend Development

8 Proven Java Techniques to Ensure Thread‑Safe Data in Concurrent Apps

This article outlines eight practical Java approaches—including stateless design, immutability, safe publication, volatile fields, synchronized blocks, explicit locks, CAS operations, and ThreadLocal—to guarantee data safety in multithreaded environments, explaining each concept and providing concise code examples.

CASLockSynchronization
0 likes · 6 min read
8 Proven Java Techniques to Ensure Thread‑Safe Data in Concurrent Apps
Architecture Digest
Architecture Digest
Sep 12, 2020 · Backend Development

Zookeeper Usage Scenarios and Interview Analysis

This article explains common Zookeeper usage scenarios—including distributed coordination, distributed locking, metadata/configuration management, and high‑availability—provides interview‑style analysis, and illustrates each case with diagrams, helping Java developers understand how Zookeeper supports core distributed system functions.

LockZooKeepercoordination
0 likes · 5 min read
Zookeeper Usage Scenarios and Interview Analysis
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 28, 2020 · Databases

MySQL 8.x Lightweight Backup Lock: LOCK INSTANCE FOR BACKUP Explained

MySQL 8.x adds a lightweight backup lock, LOCK INSTANCE FOR BACKUP, which permits DML during online backups while restricting only file creation, account changes, and certain table operations, requiring BACKUP_ADMIN privilege and offering a less disruptive alternative to FTWRL, used by MySQL Enterprise Backup and Percona Xtrabackup.

BackupLockOnlineBackup
0 likes · 3 min read
MySQL 8.x Lightweight Backup Lock: LOCK INSTANCE FOR BACKUP Explained
Code Ape Tech Column
Code Ape Tech Column
Aug 22, 2020 · Fundamentals

How ReentrantLock Works Under the Hood: A Deep Dive into Java’s AQS

This article breaks down the inner workings of Java’s ReentrantLock, explaining spin locks, the role of AbstractQueuedSynchronizer, fair vs. non‑fair locking, and step‑by‑step thread execution with code examples and diagrams to illustrate the complete lock acquisition and release process.

AQSJavaLock
0 likes · 17 min read
How ReentrantLock Works Under the Hood: A Deep Dive into Java’s AQS