writer에서 in-place DDL 수행시 reader에서 해당 테이블을 인식하지 못하는 버그가 발견되었다.
관련 DDL: add column, drop column (offline ddl이나 instant ddl, add index는 해당 없음)
테스트 버전: Aurora MySQL 3.02.2
1. add column after
# session 1(Writer)
mysql> alter table test add col3 varchar(10) not null after col2;
Query OK, 0 rows affected (7.35 sec)
Records: 0 Duplicates: 0 Warinings: 0
# session 2(Writer)에서 processlist 확인
altering table | alter table test add col3 varchar(10) not null after col2 |
# session 3(Reader)
mysql> select * from test;
ERROR 1146 (42S02): Table 'sr.test' doesn't exist
2. drop column
# session 1(Writer)
mysql> alter table test drop col3;
Query OK, 0 rows affected (7.46 sec)
Records: 0 Duplicates: 0 Warinings: 0
# session 2(Writer)에서 processlist 확인
altering table | alter table test drop col3 |
# session 3(Reader)
mysql> select * from test;
ERROR 1146 (42S02): Table 'sr.test' doesn't exist
3. add index
# session 1(Writer)
mysql> alter table test add index idx_col3(col3);
Query OK, 0 rows affected (12.42 sec)
Records: 0 Duplicates: 0 Warinings: 0
# session 2(Writer)에서 processlist 확인
altering table | alter table test add index idx_col3(col3) |
# session 3(Reader)
mysql> select * from test limit 1;
+----+--------------------+------+
|col1| col2 | col3 |
+----+--------------------+------+
| 1 | ddl_test | |
+----+--------------------+------+
AWS SR을 통해 문의한 결과, 해당 현상은 inplace 알고리즘으로 수행한 DDL에 의해 획득한 meta lock 정보가 reader에서 정상으로 확인되지 않아 발생하는 버그로, 추후 버전에서 fix 예정이라는 답변을 받았다.
해당 버그는 2023년 8월 릴리즈된 Aurora MySQL 3.03.2에서 해결되었다.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/AuroraMySQL.Updates.3032.html
Aurora MySQL database engine updates 2023-08-29 (version 3.03.2, compatible with MySQL 8.0.26) - Amazon Aurora
Aurora MySQL database engine updates 2023-08-29 (version 3.03.2, compatible with MySQL 8.0.26) Version: 3.03.2 Aurora MySQL 3.03.2 is generally available. Aurora MySQL 3.04 versions are compatible with MySQL 8.0.28, Aurora MySQL 3.03 versions are compatibl
docs.aws.amazon.com
3.03.2버전(compatible with MySQL 8.0.26) 릴리즈 노트
- writer에서 in-place DDL 수행시 reader에서 해당 테이블을 인식하지 못하는 버그 fix(ERROR 1146)
- aurora3 메이저 업그레이드시 트리거에 예약어가 있을 때 실패하는 현상 fix
'MySQL' 카테고리의 다른 글
[GTID] 복제 환경 GTID 틀어졌을 때 해결하기 (0) | 2022.06.14 |
---|---|
[MacOS] MySQL 8.0 Debug 환경 Xcode로 만들기 (0) | 2022.05.31 |
Character set & Collation (0) | 2021.09.09 |
InnoDB flush method (0) | 2021.03.28 |
[Collation] UTF8 charset & collation 비교 (0) | 2021.02.26 |
writer에서 in-place DDL 수행시 reader에서 해당 테이블을 인식하지 못하는 버그가 발견되었다.
관련 DDL: add column, drop column (offline ddl이나 instant ddl, add index는 해당 없음)
테스트 버전: Aurora MySQL 3.02.2
1. add column after
# session 1(Writer)
mysql> alter table test add col3 varchar(10) not null after col2;
Query OK, 0 rows affected (7.35 sec)
Records: 0 Duplicates: 0 Warinings: 0
# session 2(Writer)에서 processlist 확인
altering table | alter table test add col3 varchar(10) not null after col2 |
# session 3(Reader)
mysql> select * from test;
ERROR 1146 (42S02): Table 'sr.test' doesn't exist
2. drop column
# session 1(Writer)
mysql> alter table test drop col3;
Query OK, 0 rows affected (7.46 sec)
Records: 0 Duplicates: 0 Warinings: 0
# session 2(Writer)에서 processlist 확인
altering table | alter table test drop col3 |
# session 3(Reader)
mysql> select * from test;
ERROR 1146 (42S02): Table 'sr.test' doesn't exist
3. add index
# session 1(Writer)
mysql> alter table test add index idx_col3(col3);
Query OK, 0 rows affected (12.42 sec)
Records: 0 Duplicates: 0 Warinings: 0
# session 2(Writer)에서 processlist 확인
altering table | alter table test add index idx_col3(col3) |
# session 3(Reader)
mysql> select * from test limit 1;
+----+--------------------+------+
|col1| col2 | col3 |
+----+--------------------+------+
| 1 | ddl_test | |
+----+--------------------+------+
AWS SR을 통해 문의한 결과, 해당 현상은 inplace 알고리즘으로 수행한 DDL에 의해 획득한 meta lock 정보가 reader에서 정상으로 확인되지 않아 발생하는 버그로, 추후 버전에서 fix 예정이라는 답변을 받았다.
해당 버그는 2023년 8월 릴리즈된 Aurora MySQL 3.03.2에서 해결되었다.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/AuroraMySQL.Updates.3032.html
Aurora MySQL database engine updates 2023-08-29 (version 3.03.2, compatible with MySQL 8.0.26) - Amazon Aurora
Aurora MySQL database engine updates 2023-08-29 (version 3.03.2, compatible with MySQL 8.0.26) Version: 3.03.2 Aurora MySQL 3.03.2 is generally available. Aurora MySQL 3.04 versions are compatible with MySQL 8.0.28, Aurora MySQL 3.03 versions are compatibl
docs.aws.amazon.com
3.03.2버전(compatible with MySQL 8.0.26) 릴리즈 노트
- writer에서 in-place DDL 수행시 reader에서 해당 테이블을 인식하지 못하는 버그 fix(ERROR 1146)
- aurora3 메이저 업그레이드시 트리거에 예약어가 있을 때 실패하는 현상 fix
'MySQL' 카테고리의 다른 글
[GTID] 복제 환경 GTID 틀어졌을 때 해결하기 (0) | 2022.06.14 |
---|---|
[MacOS] MySQL 8.0 Debug 환경 Xcode로 만들기 (0) | 2022.05.31 |
Character set & Collation (0) | 2021.09.09 |
InnoDB flush method (0) | 2021.03.28 |
[Collation] UTF8 charset & collation 비교 (0) | 2021.02.26 |