Sample Header Ad - 728x90

Row Locks in Partitioned Aurora MySQL Table

3 votes
1 answer
185 views
I'm experiencing many row locks in a AWS Aurora AWS MySQL MySQL version=8.0 Aurora Version=3.04.0 The table is pretty big close to 1 Billion rows. The table is partitioned in 24 partitions based on the created at column. In one of the production issue we found 26 rows have been locked. ---TRANSACTION 19670234666, ACTIVE 299 sec 53 lock struct(s), heap size 8312, 26 row lock(s), undo log entries 1 MySQL thread id 7015846, OS thread handle 70369603010432, query id 12207362320 IP username We update only one row of the table using id condition, we do not pass created_at in the update query. What could have been the reason of 26 rows being locked? DB query UPDATE OrderEntity e SET e.state = :state, e.metadata= :metadata WHERE e.id = :id Table Structure ``` id: BIGINIT state: INT metadata: TEXT created_at: DATETIME updated_at: DATETIME ... Primary Key: id, created_at
Asked by sonus21 (131 rep)
Dec 20, 2023, 08:30 AM
Last activity: Jul 1, 2025, 04:02 AM