github / github/gh-ost

Cut-off transaction is very slow, leading to downtimes in production[Question]

Open
#1,191 1 comment 0 reactions 0 assignees View on GitHub
enhancement performance
Dominant language
Go
Stars
13.6k
Forks
1.4k
Avg merge
2h 31m
Merged PRs (30d)
4

Description

MySql v8.0.23

1. I recently did multiple migrations in production. I noticed for table switch at the end, gh-ost takes a very long time. here are actual logs from production.
2. The row count in these tables ranged from 15k to 5M. Also, I did not see any correlation between table size and lock duration, which is as expected.
3. Below are actual logs from production run.

`2022-10-19 07:53:14 INFO Lock & rename duration: 1.017494674s. During this time, queries on entity were blocked

2022-10-19 07:21:28 INFO Lock & rename duration: 1.042562025s. During this time, queries on entity were blocked

2022-10-19 07:50:31 INFO Lock & rename duration: 2.022935482s. During this time, queries on entity were blocked

2022-10-19 07:45:12 INFO Lock & rename duration: 2.020735566s. During this time, queries on entity were blocked

2022-10-19 07:42:29 INFO Lock & rename duration: 1.01602586s. During this time, queries on entity were blocked`

5. Such high cut off time means a downtime. I expected some single digit millisecond operation for this transaction. One question here- does this timestamp include any lock wait time also for tx to even acquire a lock? However, these tables almost did not have any traffic.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.