Skip to content

TK's blog

This world is full of logic.

  • Tomcat
    • About Tomcat session cluster
    • How to setup Tomcat cluster
    • The problem of Tomcat session cluster
    • About Tomcat’s default session manager
    • About Tomcat DeltaManager
    • About Tomcat BackupManager
    • Tips on customizing session manager
    • Tomcat sticky session
    • Tuning Connection Pool for production system
  • Java
    • How to analyze high cpu usage of a Java program?
    • Java runtime parameters to enable JMX
    • Oracle JDBC slow connection on some virtual server
    • Java heap dump from command line
    • Mockito thenReturn() vs thenAnswer()
  • Spring framework
    • 8 ways to declare Spring beans
    • The inner working of DispatcherServlet
    • Implementing REST API with Spring MVC
    • About Spring ViewResolver
    • Sending data from controller to view
    • Spring Transaction with @Transactional explained
    • Combining multiple transactional method in one transaction
    • Simple ETL with Spring Batch
    • More on Spring Batch Reader
    • More on Spring Batch Writer
    • Spring Batch – Read once, Write multi example
    • Spring Batch tip – Partitioning
  • Mybatis
    • Mybatis cache mechanism
    • Integrating Mybatis with Spring
    • Using Ehcache instead of Mybatis internal cache
    • Some points to consider when using Mybatis cache
    • Implementing dynamic SQL on Mybatis
    • Parameterizing SQL on Mybatis
    • Handling big data on Mybatis
    • A tip on using user transaction on Mybatis
  • Redis
    • Installing Redis on Linux
    • Redis configuration for standalone mode
    • Setting Redis replication
    • Managing Redis replication with sentinel
    • Important Sentinel options
    • Internal working of Sentinel
    • Redis architecture for production
    • Tips on developing with Jedis
    • Redis replication gap tuning
  • Zookeeper
    • The use of Zookeeper
    • Building Zookeeper cluster
    • Programming Zookeeper – Connecting to Zookeeper
    • Programming Zookeeper – Watcher
    • Building a robust Zookeeper client : connection management
  • Kafka
    • Kafka first step – running a simple server
    • Building Kafka cluster
    • How Kafka Topic failover works?
    • How Kafka consumer works?
    • Managing Kafka log
    • At which point does Kafka consumer start to read
    • Some useful commands to manage Kafka
    • Kafka tip – keeping the order of delivery
  • MySQL
    • The difference of Isolation level – Read Committed vs Repeatable Read
    • MySQL gap lock, next key lock by example
  • Contact

Tag: lock

MySQL gap lock, next key lock by example

MySQL's gap lock or next key lock is a specific mechanism to guarantee it's isolation level. Gap lock is set on before or after values of the accessed record. Next key lock is the accessed row lock + gap lock. Therefore they have similar features. Gap lock is activated in the following conditions. Isolation level … Continue reading MySQL gap lock, next key lock by example →

TK mysql Leave a comment June 27, 2019June 27, 2019
  • Tomcat
    • About Tomcat session cluster
    • How to setup Tomcat cluster
    • The problem of Tomcat session cluster
    • About Tomcat’s default session manager
    • About Tomcat DeltaManager
    • About Tomcat BackupManager
    • Tips on customizing session manager
    • Tomcat sticky session
    • Tuning Connection Pool for production system
  • Java
    • How to analyze high cpu usage of a Java program?
    • Java runtime parameters to enable JMX
    • Oracle JDBC slow connection on some virtual server
    • Java heap dump from command line
    • Mockito thenReturn() vs thenAnswer()
  • Spring framework
    • 8 ways to declare Spring beans
    • The inner working of DispatcherServlet
    • Implementing REST API with Spring MVC
    • About Spring ViewResolver
    • Sending data from controller to view
    • Spring Transaction with @Transactional explained
    • Combining multiple transactional method in one transaction
    • Simple ETL with Spring Batch
    • More on Spring Batch Reader
    • More on Spring Batch Writer
    • Spring Batch – Read once, Write multi example
    • Spring Batch tip – Partitioning
  • Mybatis
    • Mybatis cache mechanism
    • Integrating Mybatis with Spring
    • Using Ehcache instead of Mybatis internal cache
    • Some points to consider when using Mybatis cache
    • Implementing dynamic SQL on Mybatis
    • Parameterizing SQL on Mybatis
    • Handling big data on Mybatis
    • A tip on using user transaction on Mybatis
  • Redis
    • Installing Redis on Linux
    • Redis configuration for standalone mode
    • Setting Redis replication
    • Managing Redis replication with sentinel
    • Important Sentinel options
    • Internal working of Sentinel
    • Redis architecture for production
    • Tips on developing with Jedis
    • Redis replication gap tuning
  • Zookeeper
    • The use of Zookeeper
    • Building Zookeeper cluster
    • Programming Zookeeper – Connecting to Zookeeper
    • Programming Zookeeper – Watcher
    • Building a robust Zookeeper client : connection management
  • Kafka
    • Kafka first step – running a simple server
    • Building Kafka cluster
    • How Kafka Topic failover works?
    • How Kafka consumer works?
    • Managing Kafka log
    • At which point does Kafka consumer start to read
    • Some useful commands to manage Kafka
    • Kafka tip – keeping the order of delivery
  • MySQL
    • The difference of Isolation level – Read Committed vs Repeatable Read
    • MySQL gap lock, next key lock by example
  • Contact
Blog at WordPress.com.
  • Follow Following
    • TK's blog
    • Already have a WordPress.com account? Log in now.
    • TK's blog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar