Tagged articles
399 articles
Page 1 of 4
Top Architect
Top Architect
Apr 13, 2026 · Backend Development

Why Did a Forgotten Transaction Block Payments? A Deep Dive into Spring’s Transaction Management

An online payment service suffered invisible data loss and lock timeouts because a newly deployed business branch failed to commit its transaction, leading to polluted connections that were reused by other services, and the article explains the root cause, debugging steps, code fixes, and preventive measures.

Connection Pooldatabasespring
0 likes · 11 min read
Why Did a Forgotten Transaction Block Payments? A Deep Dive into Spring’s Transaction Management
Su San Talks Tech
Su San Talks Tech
Mar 10, 2026 · Backend Development

Rapid API Development with magic-api: From Setup to Swagger Integration

This guide walks through installing magic-api in a SpringBoot project, configuring data sources, creating CRUD endpoints with magic-script, adding validation, transaction handling, and integrating Swagger for API documentation, complete with code snippets and configuration examples.

API developmentCRUDSpringBoot
0 likes · 10 min read
Rapid API Development with magic-api: From Setup to Swagger Integration
macrozheng
macrozheng
Mar 5, 2026 · Backend Development

Rapid API Development with magic‑api: No Controllers, No Boilerplate

This guide shows how to use the Java‑based magic‑api framework to generate CRUD REST endpoints directly from a UI, covering Maven setup, datasource configuration, script‑based request handling, validation, result mapping, transactions, and Swagger integration.

API generationCRUDSpring Boot
0 likes · 10 min read
Rapid API Development with magic‑api: No Controllers, No Boilerplate
dbaplus Community
dbaplus Community
Feb 27, 2026 · Databases

Understanding MySQL Locks: From Global to Row‑Level and Deadlock Prevention

The article explains why concurrent transactions cause data inconsistencies, describes MySQL’s lock hierarchy—including global, table, and row locks—covers AUTO_INCREMENT locking, illustrates lock compatibility tables, details common deadlock scenarios, and offers practical strategies such as fixed access order, optimistic locking, short transactions, proper indexing, and isolation‑level tuning to prevent deadlocks.

InnoDBLocksconcurrency
0 likes · 18 min read
Understanding MySQL Locks: From Global to Row‑Level and Deadlock Prevention
Big Data Technology Tribe
Big Data Technology Tribe
Feb 25, 2026 · Databases

How Lance Implements MVCC Transactions with Optimistic Concurrency and Automatic Conflict Resolution

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.

Concurrency ControlDatabase InternalsLance
0 likes · 16 min read
How Lance Implements MVCC Transactions with Optimistic Concurrency and Automatic Conflict Resolution
java1234
java1234
Feb 24, 2026 · Backend Development

How to Handle Transactions in RabbitMQ with Java

This article explains RabbitMQ's transaction mechanism, walks through the four-step process of opening, executing, committing, or rolling back a transaction, provides a complete Java example with Maven setup, and discusses performance impacts and when to prefer acknowledgments over transactions.

AcknowledgmentJavaMessaging
0 likes · 6 min read
How to Handle Transactions in RabbitMQ with Java
Java Backend Technology
Java Backend Technology
Feb 5, 2026 · Backend Development

Why Your Spring @Transactional May Fail and How to Fix It

This article explains the common reasons Spring transactions become ineffective or fail to roll back—such as wrong method visibility, final modifiers, self‑invocation, non‑Spring beans, multithreading, unsupported table engines, misconfigured propagation, swallowed exceptions, and improper rollback settings—while providing practical code solutions and best‑practice recommendations.

Javaaopdatabase
0 likes · 20 min read
Why Your Spring @Transactional May Fail and How to Fix It
java1234
java1234
Jan 31, 2026 · Backend Development

How to Perform Transaction Processing in RabbitMQ with Java

RabbitMQ supports transactional messaging to guarantee atomic delivery, using txSelect to start, txCommit to finalize, and txRollback to abort; this article explains the mechanism, outlines its advantages and performance drawbacks, and provides a complete Java example with step‑by‑step code walkthrough.

JavaMessage QueueMessaging
0 likes · 5 min read
How to Perform Transaction Processing in RabbitMQ with Java
Java Companion
Java Companion
Jan 30, 2026 · Backend Development

When @Transactional and TransactionTemplate Clash: How to Choose the Right Spring Transaction Management

This article examines Spring's three transaction management options—@Transactional, TransactionTemplate, and TransactionManager—explaining their mechanisms, common pitfalls such as internal method calls and timeout settings, and provides guidance on when to use each approach with concrete code examples.

BackendTransactionManagerspring
0 likes · 12 min read
When @Transactional and TransactionTemplate Clash: How to Choose the Right Spring Transaction Management
dbaplus Community
dbaplus Community
Jan 25, 2026 · Databases

How MySQL’s Merged Flash‑Sale Engine Boosts Write Throughput 5×

The article explains how XiaoHongShu’s database team redesigned MySQL’s flash‑sale (秒杀) mechanism with a merged‑seckill kernel, achieving up to five‑fold write‑throughput improvements and handling over 15 k orders per second, while remaining transparent to existing SQL and compatible with existing tools.

Database Optimizationflash saletransaction
0 likes · 11 min read
How MySQL’s Merged Flash‑Sale Engine Boosts Write Throughput 5×
Coder Trainee
Coder Trainee
Jan 20, 2026 · Operations

Why You Should Avoid Using kill ‑9 to Stop Programs

The article explains that although kill ‑9 reliably kills a Linux process, using it in production can cause severe data corruption—especially with non‑transactional storage engines—making it unsuitable for safe program termination.

LinuxMyISAMkill
0 likes · 3 min read
Why You Should Avoid Using kill ‑9 to Stop Programs
Ray's Galactic Tech
Ray's Galactic Tech
Jan 18, 2026 · Backend Development

Designing a Robust Transaction System: From Domain Modeling to Distributed Consistency

This article explores how to build a reliable, scalable transaction module for e‑commerce and finance, covering business requirement analysis, domain modeling, state‑machine design, layered microservice architecture, order creation and payment flows, idempotency, anti‑oversell mechanisms, performance tuning, monitoring, and evolution strategies.

BackendDistributed ConsistencyIdempotency
0 likes · 10 min read
Designing a Robust Transaction System: From Domain Modeling to Distributed Consistency
Java Companion
Java Companion
Jan 17, 2026 · Backend Development

6 Ways to Overcome the Limits of @Transactional in Spring

The article examines five scenarios where Spring's @Transactional annotation falls short—stock shortage, MQ messaging, batch processing, logging, and isolation/timeout settings—and demonstrates six practical techniques, including programmatic transactions, parameter tuning, transaction synchronizers, event listeners, manual transaction control, and propagation strategies, all backed by runnable demo code.

JavaSpringBootevent-listener
0 likes · 19 min read
6 Ways to Overcome the Limits of @Transactional in Spring
Architect's Guide
Architect's Guide
Jan 17, 2026 · Backend Development

How We Split a 500M‑Row MySQL Table: Lessons and Strategies

Facing a 50‑million‑row financial transaction table that grew 600,000 rows each month, the team designed a sharding solution using sharding‑jdbc, tackled multi‑datasource transaction and pagination challenges, and executed a staged migration that kept the system stable while eliminating MySQL performance bottlenecks.

data-migrationpaginationsharding
0 likes · 13 min read
How We Split a 500M‑Row MySQL Table: Lessons and Strategies
Java Web Project
Java Web Project
Jan 11, 2026 · Backend Development

Why Your Spring @Transactional Fails: 7 Common Pitfalls and How to Fix Them

This article analyzes seven typical reasons why Spring transactions become ineffective or fail to roll back—such as wrong method visibility, final modifiers, self‑invocation, unmanaged beans, multithreading, non‑transactional tables, mis‑configured propagation or exception handling—and provides concrete code examples and practical solutions.

BackendJavaSpring Boot
0 likes · 21 min read
Why Your Spring @Transactional Fails: 7 Common Pitfalls and How to Fix Them
Java Companion
Java Companion
Jan 9, 2026 · Backend Development

Why Many Large Companies Discourage Using @Transactional in Spring

The article explains common pitfalls that cause Spring @Transactional to fail or not roll back, such as incorrect method visibility, final or static modifiers, internal method calls, beans not managed by Spring, multithreading, unsupported database engines, misconfigured propagation, swallowed exceptions, and improper rollback settings, and offers practical solutions for each case.

BackendJavaMyISAM
0 likes · 18 min read
Why Many Large Companies Discourage Using @Transactional in Spring
macrozheng
macrozheng
Dec 26, 2025 · Databases

NewSQL vs Middleware Sharding: Which Architecture Really Wins?

This article objectively compares middleware‑based sharding solutions with native NewSQL distributed databases, examining their architectural differences, transaction handling, high‑availability, scaling, SQL support, storage engines, and maturity to help engineers decide which approach best fits their workload.

CAP theoremNewSQLPaxos
0 likes · 20 min read
NewSQL vs Middleware Sharding: Which Architecture Really Wins?
Code Ape Tech Column
Code Ape Tech Column
Dec 18, 2025 · Backend Development

How to Co‑exist Multiple DataSources in Spring Without Switching?

This guide explains the concept of multi‑DataSource coexistence, when it is appropriate, step‑by‑step configuration for MySQL and TDengine, transaction manager handling, custom annotations, mapper scanning, differences from dynamic routing, common pitfalls, and best‑practice usage in a Spring‑MyBatis backend.

JavaMulti-DataSourceMyBatis
0 likes · 13 min read
How to Co‑exist Multiple DataSources in Spring Without Switching?
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Nov 24, 2025 · Databases

Mastering MySQL’s Three Core Logs: Redo, Undo, and Binlog Explained

This article provides a comprehensive guide to MySQL’s three essential logs—redo, undo, and binlog—detailing their hierarchy, purposes, write mechanisms, configuration parameters, and how they cooperate during transaction processing and replication, while also offering troubleshooting tips for common issues.

Binlogdatabaselogs
0 likes · 17 min read
Mastering MySQL’s Three Core Logs: Redo, Undo, and Binlog Explained
Sohu Tech Products
Sohu Tech Products
Nov 13, 2025 · Databases

Why MySQL Deadlocks Happen and How to Prevent Them

An in‑depth guide walks through MySQL InnoDB deadlock logs, explains two‑phase locking, reproduces the issue with step‑by‑step SQL commands, details lock types and compatibility, outlines common deadlock scenarios, and offers practical strategies and configuration tweaks to prevent and monitor deadlocks.

InnoDBdeadlocklocking
0 likes · 21 min read
Why MySQL Deadlocks Happen and How to Prevent Them
Architecture Digest
Architecture Digest
Nov 3, 2025 · Backend Development

Ensuring Transaction Rollback in Multithreaded Spring MyBatis Operations

This article explains why @Transactional fails in multithreaded MySQL insert scenarios, demonstrates how to split large data sets, configure a thread pool, and use SqlSession with manual commit to guarantee atomicity across parallel threads, complete with runnable code examples and test results.

JavaMyBatisconcurrency
0 likes · 8 min read
Ensuring Transaction Rollback in Multithreaded Spring MyBatis Operations
Sohu Tech Products
Sohu Tech Products
Oct 29, 2025 · Databases

Understanding MySQL InnoDB Deadlocks: Causes, Lock Types & Prevention

This article examines MySQL InnoDB deadlocks by analyzing error logs, explaining the two‑phase locking protocol and various lock types, demonstrates how to reproduce a deadlock scenario, categorizes lock behaviors, and offers practical strategies to prevent and monitor deadlocks in database applications.

InnoDBdatabasemysql
0 likes · 19 min read
Understanding MySQL InnoDB Deadlocks: Causes, Lock Types & Prevention
Ray's Galactic Tech
Ray's Galactic Tech
Oct 18, 2025 · Backend Development

How to Implement Exactly-Once Transactions in Spring Boot with Kafka

This guide explains how to configure Spring Boot and Kafka to achieve Exactly-Once semantics, covering core concepts, Maven dependencies, YAML settings, sample code for producers and consumers, execution flow, and advanced tips for reliable transactional messaging.

BackendExactly-Oncespring-boot
0 likes · 8 min read
How to Implement Exactly-Once Transactions in Spring Boot with Kafka
Architect's Tech Stack
Architect's Tech Stack
Sep 27, 2025 · Backend Development

Ensuring Transaction Rollback in Multi‑Threaded Java Services

This article explains why @Transactional fails in multi‑threaded Spring services, provides a utility for splitting large data sets, shows thread‑pool configuration, demonstrates a failing transaction scenario, and presents a solution using manual MyBatis sqlSession commit to guarantee atomic rollback across all threads.

JavaMyBatisThreadPool
0 likes · 10 min read
Ensuring Transaction Rollback in Multi‑Threaded Java Services
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 17, 2025 · Backend Development

Master Spring Transactions: Programming vs Declarative Approaches Explained

This article provides a comprehensive guide to Spring transaction management, covering both programmatic (TransactionTemplate) and declarative (@Transactional) methods, explaining their principles, code examples, and how Spring abstracts underlying JDBC steps to simplify database transaction handling for backend developers.

BackendJavaprogramming
0 likes · 4 min read
Master Spring Transactions: Programming vs Declarative Approaches Explained
dbaplus Community
dbaplus Community
Sep 14, 2025 · Databases

Why MySQL Updates Sometimes Disappear: InnoDB Read View Explained

A nighttime incident revealed that a MySQL transaction updated a row but subsequent reads returned the old value, prompting a deep investigation that uncovered InnoDB’s repeatable‑read snapshot behavior, concurrent updates, and how MySQL may skip updates when data appears unchanged, along with reproducible steps and mitigation advice.

InnoDBRead ViewUpdate Anomaly
0 likes · 16 min read
Why MySQL Updates Sometimes Disappear: InnoDB Read View Explained
IT Services Circle
IT Services Circle
Sep 11, 2025 · Databases

Understanding MySQL Redo Log vs Binlog: How They Ensure Data Safety

This article explains the distinct yet collaborative roles of MySQL's Redo Log and Binlog, covering two‑phase commit, write‑ahead logging, flushing mechanisms, performance trade‑offs, and their use cases in crash recovery, replication, and point‑in‑time restoration.

BinlogReplicationmysql
0 likes · 11 min read
Understanding MySQL Redo Log vs Binlog: How They Ensure Data Safety
Su San Talks Tech
Su San Talks Tech
Sep 9, 2025 · Backend Development

Why @Transactional Fails: 13 Hidden Pitfalls and How to Fix Them

Spring’s @Transactional annotation often appears simple, yet it can silently fail due to unnecessary usage, scope issues, proxy limitations, propagation settings, exception handling, and bean management, leading to unexpected non‑rollback behavior; this article categorizes thirteen common pitfalls and demonstrates each with concrete code examples.

Javaaopexceptionhandling
0 likes · 18 min read
Why @Transactional Fails: 13 Hidden Pitfalls and How to Fix Them
php Courses
php Courses
Sep 1, 2025 · Backend Development

How to Migrate Complex PHP Data Safely While Minimizing Downtime

This guide outlines essential strategies for PHP developers to execute complex data migrations—covering thorough planning, incremental migration, transaction safety, dual‑write architectures, feature‑flag rollouts, real‑time syncing, and comprehensive monitoring—to ensure data integrity and keep system downtime to a minimum.

Backend DevelopmentData MigrationPHP
0 likes · 7 min read
How to Migrate Complex PHP Data Safely While Minimizing Downtime
Zhuanzhuan Tech
Zhuanzhuan Tech
Aug 29, 2025 · Databases

Why MySQL Returns Old Values After Update: Inside InnoDB Snapshot Reads

This article investigates a puzzling MySQL behavior where a row updated within a transaction sometimes returns its previous value, explains the role of InnoDB's snapshot reads and ReadView, reproduces the issue, and offers practical ways to prevent the “update disappearance” scenario.

InnoDBSnapshot ReadUpdate Anomaly
0 likes · 18 min read
Why MySQL Returns Old Values After Update: Inside InnoDB Snapshot Reads
IT Xianyu
IT Xianyu
Jul 29, 2025 · Databases

Master PostgreSQL Transactions in DataGrip: BEGIN, COMMIT, ROLLBACK Explained

Learn how to safely manage PostgreSQL transactions using DataGrip by understanding ACID principles, executing BEGIN, COMMIT, and ROLLBACK commands, handling errors, and applying practical tips for visibility, connection loss, and Docker deployments, all illustrated with step‑by‑step screenshots.

ACIDBEGINDataGrip
0 likes · 9 min read
Master PostgreSQL Transactions in DataGrip: BEGIN, COMMIT, ROLLBACK Explained
Architect
Architect
Jul 16, 2025 · Backend Development

Mastering Spring Transaction Hooks: Async Kafka Logging After Commit

This article explains how to use Spring's TransactionSynchronizationManager to detect active transactions and reliably send Kafka messages either immediately or after transaction commit, illustrated with a payment‑system use case and complete code examples.

AsyncJavaKafka
0 likes · 10 min read
Mastering Spring Transaction Hooks: Async Kafka Logging After Commit
Java Captain
Java Captain
Jul 16, 2025 · Backend Development

Ensuring Transaction Rollback in Multi‑Threaded Spring Batch Inserts

This article explains why the @Transactional annotation fails in multithreaded Spring batch insert scenarios, demonstrates the problem with code examples, and shows how to use SqlSession for manual commit and rollback to guarantee atomicity across all threads.

JavaMyBatisThreadPool
0 likes · 10 min read
Ensuring Transaction Rollback in Multi‑Threaded Spring Batch Inserts
Tech Freedom Circle
Tech Freedom Circle
Jul 15, 2025 · Databases

One‑Order Four‑Split: Solving MySQL Deadlocks in Million‑Row Imports

During massive daily imports of up to one million reconciliation records, MySQL deadlocks can cripple performance; this article dissects the four classic deadlock conditions, then presents a systematic “One‑Order Four‑Split” strategy—ordered writes, transaction splitting, index management, partitioning, and gap‑lock removal—backed by benchmarks, code samples, and configuration tweaks that cut lock rates by up to 90% and reduce batch times to under ten minutes.

Batch InsertIndex OptimizationJava
0 likes · 27 min read
One‑Order Four‑Split: Solving MySQL Deadlocks in Million‑Row Imports
Java Architect Essentials
Java Architect Essentials
Jul 4, 2025 · Backend Development

5 Common Spring Transaction Pitfalls and How to Fix Them

This article explains five frequent scenarios where Spring @Transactional fails—such as internal method calls, non‑public methods, swallowed exceptions, final/static methods, and unsupported MySQL engines—and provides concrete solutions and best‑practice rules for reliable transaction management.

BackendJavaaop
0 likes · 9 min read
5 Common Spring Transaction Pitfalls and How to Fix Them
macrozheng
macrozheng
Jun 13, 2025 · Backend Development

Why MyBatis-Plus saveBatch Triggers Unexpected Transaction Rollback and How to Fix It

This article explains a puzzling Spring Boot transaction rollback caused by MyBatis-Plus's saveBatch method, reproduces the error with nested @Transactional calls, analyzes why the rollback flag is set, and offers a practical workaround by replacing the framework batch operation with a custom mapper implementation.

BackendJavaSpringBoot
0 likes · 6 min read
Why MyBatis-Plus saveBatch Triggers Unexpected Transaction Rollback and How to Fix It
Java Captain
Java Captain
Jun 10, 2025 · Databases

Master MySQL Performance: Slow Queries, Indexes, Transactions & Replication

This article explains how to locate and analyze MySQL slow queries, understand index structures and types, apply best practices for index creation, handle large pagination, manage transaction isolation and MVCC, and implement master‑slave replication and sharding strategies for high‑performance databases.

Index Optimizationmysqlsharding
0 likes · 13 min read
Master MySQL Performance: Slow Queries, Indexes, Transactions & Replication
Java Architect Essentials
Java Architect Essentials
May 20, 2025 · Backend Development

Ensuring Idempotency with Distributed Locks: Adjusting Aspect Order in Java Backend

This article explains how using a custom @DistributeLock annotation together with @Transactional can cause idempotency issues due to aspect execution order, and demonstrates how to prioritize the lock aspect using @Order to ensure the lock is applied before the transaction, with code examples and best‑practice recommendations.

IdempotencyJavaaspect order
0 likes · 6 min read
Ensuring Idempotency with Distributed Locks: Adjusting Aspect Order in Java Backend
Java Tech Enthusiast
Java Tech Enthusiast
May 7, 2025 · Backend Development

Why Redis Increment Returns Null When Using @Transactional with Transaction Support in Spring Boot

The production failure where a customer‑service event creation stopped each morning was traced to RedisTemplate’s increment returning null because @Transactional combined with enabled Redis transaction support caused the command to be queued in a MULTI/EXEC block, which is fixed by using separate non‑transactional and transactional StringRedisTemplate beans.

DebuggingJavaSpring Boot
0 likes · 11 min read
Why Redis Increment Returns Null When Using @Transactional with Transaction Support in Spring Boot
Architect
Architect
May 4, 2025 · Databases

NewSQL vs Middleware Sharding: Which Architecture Truly Wins?

This article objectively compares middleware‑based sharding with NewSQL distributed databases, examining architecture, distributed transactions, performance, high availability, scaling, SQL support, storage engines, and ecosystem maturity to help architects decide which solution fits their specific workload and operational constraints.

CAP theoremDatabase ArchitectureNewSQL
0 likes · 20 min read
NewSQL vs Middleware Sharding: Which Architecture Truly Wins?
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 2, 2025 · Databases

Demonstrating MySQL Deadlock with a Practical Example

This article explains MySQL deadlocks by creating a test table, running two concurrent transactions—one using SLEEP to hold a lock and another attempting the same resource—to reproduce a deadlock error, and discusses how this approach aids debugging and understanding of transaction conflicts.

SQLdatabasedeadlock
0 likes · 4 min read
Demonstrating MySQL Deadlock with a Practical Example
php Courses
php Courses
Apr 28, 2025 · Databases

Python Database Programming: SQLite and MySQL Basics

This tutorial explains how to use Python's sqlite3 module and MySQL connectors to perform essential database operations such as connecting, creating tables, inserting, querying, updating, deleting records, and managing transactions for both SQLite and MySQL.

SQLSQLitemysql
0 likes · 7 min read
Python Database Programming: SQLite and MySQL Basics
Top Architect
Top Architect
Apr 26, 2025 · Backend Development

Using Spring Transaction Hooks with TransactionSynchronizationManager for Asynchronous Kafka Messaging

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks that asynchronously send Kafka messages after transaction commit, illustrated with a practical payment‑system example and complete Java code snippets.

JavaTransactionSynchronizationManagerspring
0 likes · 11 min read
Using Spring Transaction Hooks with TransactionSynchronizationManager for Asynchronous Kafka Messaging
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 16, 2025 · Databases

Troubleshooting MySQL Transaction Lock Waits: Diagnosis and Resolution

This article explains how to reproduce a MySQL InnoDB lock‑wait scenario, use system tables such as information_schema.processlist, innodb_trx, sys.innodb_lock_waits and performance_schema to locate the blocking transaction, and finally resolve the issue by killing the offending session, while also providing quick‑check queries and parameter tuning advice.

InnoDBLock WaitSQL
0 likes · 9 min read
Troubleshooting MySQL Transaction Lock Waits: Diagnosis and Resolution
Java Captain
Java Captain
Apr 16, 2025 · Backend Development

Design and Implementation of a Generic Asynchronous Processing SDK for Spring Applications

This article describes a generic asynchronous processing SDK built on Spring that leverages transaction events, AOP, and a combination of Kafka, XXL‑Job, and MySQL to provide non‑intrusive, reliable, and idempotent async execution with configurable strategies, security levels, and monitoring dashboards.

AsynchronousEvent-driventransaction
0 likes · 11 min read
Design and Implementation of a Generic Asynchronous Processing SDK for Spring Applications
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 4, 2025 · Backend Development

Master Spring Boot Transaction Event Listeners: Code Samples & Real-World Use Cases

This article explains how to decouple business logic using Spring Boot transaction event listeners, demonstrates both manual TransactionSynchronization and @TransactionalEventListener implementations with full code examples, and shows a practical user‑registration scenario that avoids common pitfalls.

Backend DevelopmentJavaSpring Boot
0 likes · 9 min read
Master Spring Boot Transaction Event Listeners: Code Samples & Real-World Use Cases
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Apr 1, 2025 · Fundamentals

Why Do Deadlocks Happen and How Can You Prevent Them?

This article explains what deadlocks are, outlines the four classic conditions that cause them, provides Java thread and MySQL transaction examples, and offers practical solutions such as consistent lock ordering, timeout settings, batch updates, and shortening transaction duration to prevent deadlocks.

concurrencydatabasedeadlock
0 likes · 5 min read
Why Do Deadlocks Happen and How Can You Prevent Them?
Architecture Digest
Architecture Digest
Mar 3, 2025 · Databases

NewSQL vs Middleware Sharding: A Comparative Analysis of Distributed Databases

This article objectively compares NewSQL distributed databases with traditional middleware‑based sharding solutions, examining their architectures, distributed transaction support, high availability, scaling, SQL capabilities, and maturity to help readers decide which approach best fits their workload and operational constraints.

NewSQLdistributed databaseshigh availability
0 likes · 18 min read
NewSQL vs Middleware Sharding: A Comparative Analysis of Distributed Databases
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 26, 2025 · Backend Development

Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions

This article examines the challenges of using JPA optimistic locking for inventory deduction under high concurrency, demonstrates why naive retry logic can cause deadlocks and stale data, and walks through five progressively refined implementations that resolve transaction, caching, and isolation issues.

RetrySpring Bootconcurrency
0 likes · 13 min read
Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 11, 2025 · Backend Development

Mastering API Timeout Configurations in Spring Boot 3: From Transactions to NGINX

This article walks through multiple ways to configure API timeout in Spring Boot 3—including transaction timeouts, Resilience4j TimeLimiter, asynchronous request limits, RestTemplate/RestClient/WebClient HTTP client settings, and NGINX proxy timeouts—providing code samples and practical testing results.

API timeoutNGINXSpring Boot
0 likes · 12 min read
Mastering API Timeout Configurations in Spring Boot 3: From Transactions to NGINX
Java Tech Enthusiast
Java Tech Enthusiast
Feb 9, 2025 · Databases

Optimizing Database Insert Operations and Batch Insertion Strategies

The article explains how inserts work in relational databases, why fixed‑size pages and batch transactions dramatically reduce I/O and lock contention, and provides practical MyBatis guidelines—using the foreach tag, ExecutorType.BATCH, and an appropriate batchSize while estimating memory and disk limits to choose an optimal batch size and commit only once.

Batch InsertMyBatismysql
0 likes · 12 min read
Optimizing Database Insert Operations and Batch Insertion Strategies
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 3, 2025 · Backend Development

Code Review of Coupon Claim and Approval Workflow: Issues and Optimization Strategies

This article reviews Java Spring code for a coupon claim and approval workflow, identifies concurrency and transaction issues such as missing locks and inconsistent update order, and proposes optimizations including user‑level locking, simplifying lock management, and aligning transactional update sequences to prevent deadlocks.

Code reviewJavaconcurrency
0 likes · 12 min read
Code Review of Coupon Claim and Approval Workflow: Issues and Optimization Strategies
MaGe Linux Operations
MaGe Linux Operations
Feb 2, 2025 · Fundamentals

Unlock MySQL Storage Engines: InnoDB vs MyISAM and Transaction Essentials

This article explains MySQL's storage engine architecture, compares built‑in engines such as InnoDB and MyISAM, details their file system interactions, table‑space types, and transaction features—including ACID properties, isolation levels, locking mechanisms, and practical migration steps for production environments.

Database FundamentalsInnoDBStorage Engine
0 likes · 16 min read
Unlock MySQL Storage Engines: InnoDB vs MyISAM and Transaction Essentials
Architect
Architect
Jan 14, 2025 · Databases

How MySQL Guarantees ACID: Deep Dive into Undo, Redo, and Binlog

This article provides a comprehensive analysis of MySQL’s internal architecture, detailing the four-layer design, the server service layer’s parsing, optimization and execution components, and the critical roles of Undo Log, Redo Log, and Binlog in ensuring ACID transaction properties.

ACIDBinlogDatabase Architecture
0 likes · 29 min read
How MySQL Guarantees ACID: Deep Dive into Undo, Redo, and Binlog
Aikesheng Open Source Community
Aikesheng Open Source Community
Dec 18, 2024 · Databases

How MySQL InnoDB Allocates Undo Segments

This article explains the internal process MySQL 8.0.32 InnoDB uses to allocate, create, and manage Undo segments—including cached segment retrieval, new segment creation, insertion into rollback segment lists, conflict avoidance through mutexes, and a concise step‑by‑step summary of the entire workflow.

InnoDBUNDOdatabase
0 likes · 9 min read
How MySQL InnoDB Allocates Undo Segments
Chen Tian Universe
Chen Tian Universe
Dec 15, 2024 · Fundamentals

Mastering Payment Systems: 88 Diagrams and 66 Key Concepts Explained

This comprehensive guide demystifies the entire payment ecosystem—covering the nature of payment, transaction flow, clearing and settlement models, various payment modes, routing, accounting, and risk management—using 88 illustrations and 66 essential knowledge points for a quick reference handbook.

Payment Architectureaccountingclearing
0 likes · 32 min read
Mastering Payment Systems: 88 Diagrams and 66 Key Concepts Explained
Zhuanzhuan Tech
Zhuanzhuan Tech
Dec 13, 2024 · Databases

Understanding MySQL Architecture and Log Mechanisms for ACID Transactions

This article provides a comprehensive overview of MySQL's layered architecture, the functions and core components of the server layer, and detailed explanations of Undo Log, Redo Log, and Binlog mechanisms that together ensure the ACID properties of transactions, including practical execution flows for queries and updates.

ACIDBinlogDatabase Architecture
0 likes · 29 min read
Understanding MySQL Architecture and Log Mechanisms for ACID Transactions
Top Architect
Top Architect
Dec 12, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions, register synchronization callbacks, and asynchronously send Kafka messages only after a transaction successfully commits, illustrated with a payment‑system example and complete Java code snippets, while also noting thread‑local considerations and promotional offers.

JavaKafkaSpringBoot
0 likes · 12 min read
Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit
Top Architect
Top Architect
Nov 25, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks so that Kafka messages are sent asynchronously only after a transaction successfully commits, ensuring data consistency without impacting the main business flow.

JavaKafkaTransactionSynchronizationManager
0 likes · 12 min read
Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit
Top Architect
Top Architect
Nov 1, 2024 · Backend Development

Using Spring Transaction Hooks with TransactionSynchronizationManager for Asynchronous Kafka Messaging

The article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks that asynchronously send Kafka messages after a transaction commits, ensuring reliable fund‑flow archiving in payment systems while avoiding thread‑switch issues.

JavaKafkaspring
0 likes · 11 min read
Using Spring Transaction Hooks with TransactionSynchronizationManager for Asynchronous Kafka Messaging
Top Architect
Top Architect
Oct 18, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Commit

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions, register synchronization callbacks, and asynchronously send Kafka messages only after a transaction successfully commits, providing a practical example and detailed code snippets for building a reusable Spring Boot starter library.

JavaKafkaSpringBoot
0 likes · 12 min read
Using Spring Transaction Hooks to Send Kafka Messages After Commit
Architect
Architect
Oct 16, 2024 · Backend Development

Mastering Spring Transaction Hooks for Safe Kafka Publishing

This article explains how to use Spring's TransactionSynchronizationManager to detect active transactions, register synchronization callbacks, and asynchronously publish payment‑log messages to Kafka without affecting the main business flow, complete with practical code snippets and pitfalls to avoid.

BackendJavaKafka
0 likes · 11 min read
Mastering Spring Transaction Hooks for Safe Kafka Publishing
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
IT Services Circle
IT Services Circle
Sep 14, 2024 · Backend Development

Spring Transaction Pitfalls: Common Scenarios Where Transactions Fail and How to Fix Them

This article explains the most common reasons why Spring @Transactional annotations may become ineffective or fail to roll back, covering access‑modifier issues, final methods, internal calls, self‑injection, multithreading, unsupported table engines, mis‑configured propagation, exception handling, nested transactions, large‑transaction problems, and the advantages of programmatic transaction management.

Javaaopdatabase
0 likes · 20 min read
Spring Transaction Pitfalls: Common Scenarios Where Transactions Fail and How to Fix Them
Su San Talks Tech
Su San Talks Tech
Sep 9, 2024 · Backend Development

Why Your Spring @Transactional Might Fail: 7 Common Pitfalls and How to Fix Them

This article explains why Spring transactions can become ineffective or fail to roll back, covering issues such as wrong method visibility, final methods, internal calls, missing Spring bean registration, multithreading, unsupported table engines, misconfigured propagation, exception handling, and offers practical solutions for each case.

Javaaopdatabase
0 likes · 21 min read
Why Your Spring @Transactional Might Fail: 7 Common Pitfalls and How to Fix Them
Top Architect
Top Architect
Sep 3, 2024 · Backend Development

Design and Implementation of a General Asynchronous Processing SDK for Java Backend

This article introduces a reusable asynchronous processing SDK for Java backend systems, explaining its purpose, advantages, underlying principles, component choices, design patterns, database schema, configuration options, usage instructions, and best‑practice notes, while providing complete code snippets and deployment details.

AsyncBackendKafka
0 likes · 13 min read
Design and Implementation of a General Asynchronous Processing SDK for Java Backend
JavaEdge
JavaEdge
Sep 1, 2024 · Backend Development

How Kafka Implements Transactions and Achieves Exactly‑Once Guarantees

This article explains how Kafka implements transactions using a two‑phase commit protocol, compares its approach with RocketMQ, details the exactly‑once semantics for streaming workloads, and walks through the coordinator roles, message flow, and practical use‑case scenarios.

Kafkatransactiontwo-phase commit
0 likes · 10 min read
How Kafka Implements Transactions and Achieves Exactly‑Once Guarantees
Java High-Performance Architecture
Java High-Performance Architecture
Aug 28, 2024 · Databases

NewSQL vs Sharding: Which Database Architecture Truly Wins?

This article objectively compares NewSQL distributed databases with traditional middleware‑based sharding solutions, examining their architectural differences, transaction support, scalability, HA, storage engines, and ecosystem maturity, to help readers decide which approach best fits their performance, consistency, and operational needs.

HANewSQLScalability
0 likes · 18 min read
NewSQL vs Sharding: Which Database Architecture Truly Wins?