ãã¼ã©ãã¢ã«ã¦ã³ãã§ã¯ã¤ãå æ¥ãAmazon RDS for MySQL ãã Amazon Aurora ã¸ã¨ç§»è¡ãã¾ãããããã§ã¯ããã®çµç·¯ã¨å®éã«å®æ½ããä½æ¥ãç°¡åã«ãç´¹ä»ããã¦ããã ãã¾ãã
移è¡ã®çµç·¯
ãã¼ã©ãã¢ã«ã¦ã³ã㯠Backlog ã CacooãTypetalk ã¨ãã£ããã¼ã©ãã®ãµã¼ãã¹ã¸ã®èªè¨¼æ©è½ãæä¾ãã¦ãã¾ããããèªè¨¼æ©è½ã使ããªãã¨ãã¹ã¦ã®ãµã¼ãã¹ãå©ç¨ã§ããªããªã£ã¦ãã¾ãã¾ãããã®ããããã¼ã©ãã¢ã«ã¦ã³ãã«ã¯å¸¸ã«èªè¨¼æ©è½ãæä¾ãç¶ãããããããªãé«ãã¢ãã¤ã©ããªãã£ãæ±ãããã¦ãã¾ãã
ãã¼ã©ãã¢ã«ã¦ã³ãã§ã¯ããã¾ã§ RDS for MySQL ãå©ç¨ãã¦ãã¾ããã®ã§ãMySQL äºæãæ²ãã Amazon Aurora ã¯ããªãªã¼ã¹ãããã¨ããã移è¡ã®å¯è½æ§ãæ¤è¨ããã¦ãã¾ãããAurora ã®ã¡ãªããã«ã¤ãã¦ã¯ãããããªã¨ããã§èªããã¦ãã¾ãããããã©ã¼ãã³ã¹é¢ã§ã®ã¡ãªãããããããã®ã¢ãã¤ã©ããªãã£(å¯ç¨æ§)ã¨ã¹ã±ã¼ã©ããªãã£(æ¡å¼µæ§)ã«æ³¨ç®ãã¾ããã
ã¢ãã¤ã©ããªãã£
FAQ ã®é«ãå¯ç¨æ§ã¨ã¬ããªã±ã¼ã·ã§ã³ã«ããããã« Amazon Aurora ã®ãã£ã¹ã¯é害ã«å¯¾ããé«ã対é害æ§ã¨é«åº¦ãªã¬ããªã±ã¼ã·ã§ã³ã¯ã大ããªã¡ãªããã§ãã
RDS for MySQL ã®ãã«ã AZ æ§æã«ããã¦ã¯ãDNS ãã¼ã¹ã¨ãããã¨ããããé害çºçãããã§ã¤ã«ãªã¼ãã¼ãå®äºããã¾ã§ã¯æ°åããã£ã¦ãã¾ãããAmazon Aurora ã§ã¯ãåä½ã§ã 15 å以å ã«é害ããå復ãã¾ãããè¤æ°å°ã®ãã¼ãã§ã¯ã©ã¹ã¿ã¼ãæ§æãã¦ããã° 1 å以å ã«ãã§ã¤ã«ãªã¼ãã¼ãå®äºããã¨ãããã¦ãã¾ãã
ããã¯é«ãå¯ç¨æ§ã«ã¤ãªããã¾ãã
ã¹ã±ã¼ã©ããªãã£
RDS for MySQL ã§ã¯ãã£ã¹ã¯ãå¢è¨ã§ãã¾ãããã·ã¹ãã ã稼åãããã¾ã¾å¢è¨ãããã¨ããã¨ãã©ããã¦ãæéããããã¾ãã
FAQã®ãã¼ãã¦ã§ã¢ã¨ã¹ã±ã¼ãªã³ã°ã«ããããã«ãAmazon Aurora ã®ã¹ãã¬ã¼ã¸ã¯ãã¼ã¿ãã¼ã¹ã®ä½¿ç¨éã«å¿ãã¦ããã¼ã¿ãã¼ã¹ã®ããã©ã¼ãã³ã¹ã«å½±é¿ãä¸ããã«æ¡å¼µããã¾ãã
ããã大ããªãã¤ã³ãã§ããã
çµè«
RDS for MySQL ã«æ¯ã¹ã¦é¸ã¹ãã¤ã³ã¹ã¿ã³ã¹ã¿ã¤ããå°ãªãã£ãããæéã RDS for MySQL ããã¯å°ãå²é«ã ã£ãããã¨ãããã¡ãªããã¯ããã¾ãããã¹ã±ã¼ã©ããªãã£ãã¢ãã¤ã©ããªãã£ã®é¢ã§ã¯ Aurora ã§ã¯ãªã MySQL ãé¸ã¶çç±ãç¹ã«è¦ã¤ããã¾ãããä»ã«ãæ¤è¨ãããã¨ã¯ããã¾ããã大ããã¯ä»¥ä¸ã®ãã¨ãããã¼ã©ãã¢ã«ã¦ã³ã㯠Amazon Aurora ã«ç§»è¡ãããã¨ã«æ±ºãã¾ããã
移è¡ã®æé
ãã¼ã©ãã¢ã«ã¦ã³ãã®ã¢ã¼ããã¯ãã£ã¨ã¢ãã¤ã©ããªãã£ã¸ã®åãçµã¿
ãã¼ã©ãã¢ã«ã¦ã³ã㯠Java ãµã¼ãã¬ããã¨ãã¦å®è£ ããããã㯠EC2 ã¤ã³ã¹ã¿ã³ã¹ä¸ã§åä½ãã¦ãã¾ãããã¼ã¿ãã¼ã¹ã«ã¯ RDS for MySQL ã使ã£ã¦ãã¾ããã
å ã«ãè¿°ã¹ãããã«ããã¼ã©ãã¢ã«ã¦ã³ãã«ã¯èªè¨¼æ©è½ãæä¾ãç¶ãããã¨ãæ±ãããã¾ãããã®ããããã¼ã¿ãã¼ã¹ãèªã¿åãå°ç¨ã«ãªã£ãã¨ãã«ã¯ä¸é¨ã®æ©è½ãåä½ãã¾ããããèªè¨¼æ©è½ã¯åé¡ãªãåä½ããããã«è¨è¨ããã¦ãã¾ãã
移è¡æé ã®æ¤è¨
ãã¼ã¿ãã¼ã¹ã移è¡ããã«ããã£ã¦æãéè¦è¦ããã®ã¯èªè¨¼æ©è½ãæä¾ãç¶ãããã¨ã§ããã
ã¹ãã¼ã¸ã³ã°ç°å¢ã¯ä¸è¶³å ã« MySQL ãã Aurora ã«ç§»è¡ããããã§è©¦è¡é¯èª¤ããªãã移è¡ã®æé ãæ¤è¨ãã¾ãããããã§ãã¢ããªã±ã¼ã·ã§ã³èªä½ã¯ãã¼ã¿ãã¼ã¹æ¥ç¶ã®ããã«ä½ããå¤æ´ããå¿ è¦ããªããã¨ããããã¾ããã
MySQL ãã Aurora ã¸ã®ãã¼ã¿ã¯ãã¦ã¼ã¶ã¼ã¬ã¤ã Amazon Aurora DB ã¯ã©ã¹ã¿ã¼ã¸ã®ãã¼ã¿ã®ç§»è¡Â ã«å¾ããã¬ããªã±ã¼ã·ã§ã³æ©è½ãå©ç¨ãã¦ç§»è¡ãã¾ããAurora ã®ã¤ã³ã¹ã¿ã³ã¹ã MySQL ã®ã¹ãããã·ã§ããããä½æãã¾ãããã®ãã¨ãã MySQL ã¸æ¸ãè¾¼ã¾ãããã¼ã¿ã¯ãMySQL ããã¹ã¿ã¼ã Aurora ãã¹ã¬ã¼ãã¨ããã¬ããªã±ã¼ã·ã§ã³ãæ§ç¯ã㦠Aurora ã«åæ ãã¾ãã
æ£ããã¬ããªã±ã¼ã·ã§ã³ãåä½ãããã¨ã確èªã§ããããã¢ããªã±ã¼ã·ã§ã³ãæ¥ç¶ãããã¼ã¿ãã¼ã¹ãåãæ¿ãã¾ãããã®ã¨ããMySQL 㨠Aurora ã®ä¸¡æ¹ã«æ¸ãè¾¼ã¿ãçºçããã¨ãã¼ã¿ã«ä¸æ´åãçºçãã¦ãã¾ãã¾ããã¢ããªã±ã¼ã·ã§ã³ãåæ¢ãã¦ä½æ¥ããã°ãã®åé¡ã¯èµ·ãããªãã®ã§ãããèªè¨¼æ©è½ãæ¢ããããã«ã¯ããã¾ãããããã§ãã¡ã³ããã³ã¹æéãè¨ã㦠MySQL ãä¸æçã«èªã¿åãå°ç¨ã«ããèªè¨¼æ©è½ãå«ãããç¨åº¦ã®æ©è½ãæå¹ãªç¶æ ã§ç§»è¡ãããã¨ã«ãã¾ããã
æé 1 MySQL ã®ãªã¼ãã¬ããªã«ãä½æãã¦ã¬ããªã±ã¼ã·ã§ã³ãæ¢ãããã¤ããªãã°ãåé¤ãããã®ãé²ãã
æé 2 Aurora ã®ã¤ã³ã¹ã¿ã³ã¹ãç«ã¡ä¸ãã
æé 3 MySQL ããã¹ã¿ã¼ãAurora ãã¹ã¬ã¼ãã¨ããã¬ããªã±ã¼ã·ã§ã³ãæ§æããã
æé 4 MySQL ãèªã¿åãå°ç¨ã«å¤æ´ããããã以éã¯ä¸é¨ã®æ©è½ã使ããªããªãã
æé 5 ã¢ããªã±ã¼ã·ã§ã³ã®æ¥ç¶å
ããé 次 Aurora ã«å¤æ´ãã¦ãããå¤æ´ãããµã¼ãã¼ããå
¨ã¦ã®æ©è½ã使ããããã«ãªã£ã¦ããã
æé 6 MySQL ã®åæ¢
以ä¸ã®ãããªæé ã§ãã¢ããªã±ã¼ã·ã§ã³ãåæ¢ããã«ãã¼ã¿ã¼ãã¼ã¹ã移è¡ãããã¨ã«ãã¾ããã
ä¸é¨ã®æ©è½ã使ããªããªãæé 4 ããæé 5 ã®ä½æ¥ã 1 æéã®ã¡ã³ããã³ã¹æéãè¨ãããã®ä¸ã§å®æ½ãããã¨ã«ãã¾ãããæé 4 ã§èªã¿åãå°ç¨ã«å¤æ´ããç´å¾ã®ã¹ãããã·ã§ãããåå¾ãã¦ãããã¨ã§ãä¸ãä¸ã®å ´åã«åãã¾ããã¾ããæé 5 ãã㯠Aurora ã¸ã®æ¸ãè¾¼ã¿ãå§ã¾ãã¾ãããããã以éã«å¤§ããªåé¡ããã£ã¦ MySQL ã¸æ»ããããªã£ãå ´åã«ã¯ãã¼ã¿ãä¸é¨æ¨ã¦ãå¿ è¦ãããã¾ããã§ãã®ã§ãæé 5 以éã¯å¤å°ã®åé¡ããã£ã¦ãå¾æ»ãããªãããã«ãããã¨ã«ãã¾ããã
ãµã¤ããéãã¦ã¦ã¼ã¶ã¼æ§ã¸ãéç¥ãã¾ããã
ãããããããããã®æé ã詳ããè¦ã¦ããã¾ãã移è¡åã¯ä¸å³ã®ç¶æ ã§ããã
æé 1 MySQL ã®ãªã¼ãã¬ããªã«ãä½æãã¦ã¬ããªã±ã¼ã·ã§ã³ãæ¢ãããã¤ããªãã°ãåé¤ãããã®ãé²ã
MySQL ãã Aurora ã¸ã®ãã¼ã¿ç§»è¡ã®ããã®ã¬ããªã±ã¼ã·ã§ã³ã¯ãmysql.rds_set_external_master ã³ãã³ãã使ããæåã§ã¬ããªã±ã¼ã·ã§ã³ãè¨å®ãã¾ãããã㯠RDS ã®ç®¡çä¸ã«ãªãã¬ããªã±ã¼ã·ã§ã³ã¨ãªãã¾ãã
ã¾ããRDS for MySQL ã¯é常ããã¤ããªãã°ãå®æçã« S3 ã«éé¿ãã¦åé¤ãã¾ããæ¨æºã§ã¯ 5 åç¨åº¦ã§åé¤ããã¾ããRDS ã®ç®¡çä¸ã«ããã¬ããªã±ã¼ã·ã§ã³ãªãã°ãRDS ã¯ã¬ããªã±ã¼ã·ã§ã³ã追ãã¤ãã¦ãããã¨ã確èªãã¦ããåé¤ããããã«ãªã£ã¦ããã®ã§ãããRDS ã®ç®¡çä¸ã«ãªãã¬ããªã±ã¼ã·ã§ã³ã®ã¨ãã«ã¯ RDS ãã¬ããªã±ã¼ã·ã§ã³ã®ãã¨ãæ°ã«ãããã¤ããªãã°ãåé¤ãã¦ãã¾ãã¾ãã
ããã§ã¯ãã¾ãã¬ããªã±ã¼ã·ã§ã³ã§ãã¾ããã
ãã®å¯¾å¦ã¨ãã¦ãAmazon Aurora ã¨ã®ã¬ããªã±ã¼ã·ã§ã³ã®ãAmazon Aurora ã¨å¤é¨ MySQL ãã¼ã¿ãã¼ã¹éã®ã¬ããªã±ã¼ã·ã§ã³ãã«ããããã«ãããã²ã¨ã¤ RDS 管çä¸ã®ãªã¼ãã¬ããªã«ãä½æããã¬ããªã±ã¼ã·ã§ã³ãæ¢ãã¦ããã¨ãã¹ã¿ã¼ããã¤ããªãã°ãåé¤ããã«ä¿æãç¶ãã¾ããä¸è¨ããã¥ã¡ã³ãã®æé ã«å¾ã MySQL ã®ãªã¼ãã¬ããªã«ãä½æãããã㧠mysql.rds_stop_replication ã³ãã³ããå®è¡ãã¦ã¬ããªã±ã¼ã·ã§ã³ãåæ¢ãã¦ããã¾ããã
mysql> call mysql.rds_stop_replication; +---------------------------+ | Message | +---------------------------+ | Slave is down or disabled | +---------------------------+ 1 row in set (1.03 sec)
ãã¤ããªãã°ãåé¤ãããªãã®ã§ããã®è¨å®ãããå¾ã¯ã¹ãã¬ã¼ã¸ã®ç©ºã容éã«æ³¨æãã¦ãã¾ãããããã®ã·ã¹ãã ã§ã¯å¤§ããªãã¼ã¿ããã¼ã¿ãã¼ã¹ã«ä¿åãã¦ããªãã£ããã¨ããããç¹ã«å¤§ããªå¢å ã¯ããã¾ããã§ããã
ã¾ããAurora ã«ã¬ããªã±ã¼ã·ã§ã³ãè¨å®ããã¨ãã«æå®ããããã®ãã¤ããªãã°ã®ãã¸ã·ã§ã³ãããã®ãªã¼ãã¬ããªã«ä¸ã§ç¢ºèªãã¦ããã¾ãã
mysql> show slave status \G *************************** 1. row *************************** (ä¸ç¥) Master_Log_File: mysql-bin-changelog.208690 Read_Master_Log_Pos: 110119 (ä¸ç¥) 1 row in set (0.00 sec)
Master_Log_File 㨠Read_Master_Log_Pos ãéè¦ãªãã¤ããªãã°ã®ãã¸ã·ã§ã³ã§ãã
æé 2 Aurora ã®ã¤ã³ã¹ã¿ã³ã¹ãç«ã¡ä¸ãã
ããã¸ã¡ã³ãã³ã³ã½ã¼ã«ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¡ãã¥ã¼ãããMySQL ãªã¼ãã¬ããªã«ãã Aurora ã®ã¤ã³ã¹ã¿ã³ã¹ãä½æãã¾ãããããã¯ææ°ã®ã¹ãããã·ã§ããããã¨ã«ã¤ã³ã¹ã¿ã³ã¹ãç«ã¡ä¸ãããããç´åã« MySQL ãªã¼ãã¬ããªã«ã®ã¹ãããã·ã§ãããåå¾ãã¦ããã¾ããããã®ã¨ãã»ãã¥ãªãã£ã°ã«ã¼ãããã©ã¡ã¼ã¿ã°ã«ã¼ããè¨å®ãã¦ããã¾ããããã®ã¤ã³ã¹ã¿ã³ã¹ã Writer ãã¼ãã¨ãªãã¾ããã¾ããããã¼ã¸ã¡ã³ãã³ã³ã½ã¼ã«ãã Reader ãã¼ããç«ã¡ããã¦ã¯ã©ã¹ã¿ã¼ãæ§æãã¦ããã¾ãã
æé 3 MySQL ããã¹ã¿ã¼ãAurora ãã¹ã¬ã¼ãã¨ããã¬ããªã±ã¼ã·ã§ã³ãæ§æãã
Aurora ä¸ã§ mysql.rds_set_external_master ã³ãã³ã㧠MySQL ããã¹ã¿ã¼ã«è¨å®ãã¾ãã
ãã®ã¨ãã®ãã©ã¡ã¼ã¿ã¨ãã¦ãå
ã«èª¿ã¹ããã¤ããªãã°ã®ãã¸ã·ã§ã³ãæå®ãã¾ãã
mysql> call mysql.rds_set_external_master ( -> "MySQL ãã¹ã¿ã¼ã®ã¨ã³ããã¤ã³ã" -> , "3306" -> , "ã¦ã¼ã¶ã¼" -> , "ãã¹ã¯ã¼ã" -> , "mysql-bin-changelog.208690" -> , 110119 -> , 0 -> ); Query OK, 0 rows affected (0.03 sec)
次ã«ã¬ããªã±ã¼ã·ã§ã³ãéå§ãã¾ãã
mysql> call mysql.rds_start_replication; +-------------------------+ | Message | +-------------------------+ | Slave running normally. | +-------------------------+ 1 row in set (1.01 sec) Query OK, 0 rows affected (1.01 sec)
ãã°ããçµã¤ã¨ MySQL 㨠Aurora ãåããã¼ã¿ãä¿æããããã«ãªãã¾ããã
æé 4 MySQL ãèªã¿åãå°ç¨ã«å¤æ´ãã
ã¡ã³ããã³ã¹æéã«å ¥ã£ãããã¾ãã¯ããã¼ã¸ã¡ã³ãã³ã³ã½ã¼ã«ãããã©ã¡ã¼ã¿ã°ã«ã¼ãã® read_only å¤æ°ãå¤æ´ããMySQL ãã¹ã¿ã¼ãèªã¿åãå°ç¨ã¨ãã¾ããããã㧠MySQL ã«ã Aurora ã«ãæ¸ãè¾¼ã¿ãçºçããªãç¶æ ã¨ãªããã¢ããªã±ã¼ã·ã§ã³ã®ä¸é¨æ©è½ã使ããªãç¶æ ã¨ãªãã¾ããã
æé 5 ã¢ããªã±ã¼ã·ã§ã³ã®æ¥ç¶å ããé 次 Aurora ã«å¤æ´ãã¦ãã
ã¢ããªã±ã¼ã·ã§ã³ãæ¥ç¶ãããã¼ã¿ãã¼ã¹ããé 次 MySQL ãã Aurora ã«å¤æ´ãã¦ããã¾ããã
æ¥ç¶å
ãå¤ãã£ããµã¼ãã¼ããããã¹ã¦ã®æ©è½ã使ããããã«ãªã£ã¦ããã¾ããã
ããã§ã¡ã³ããã³ã¹æéã¯çµããã§ãã
ã¢ããªã±ã¼ã·ã§ã³ã¯ãã¹ã¦ Aurora ã«ã¢ã¯ã»ã¹ããããã«ãªãã¾ããã
ãã㧠mysql.rds_reset_external_master ã³ãã³ãã«ãã£ã¦ MySQL ãã Aurora ã¸ã®ã¬ããªã±ã¼ã·ã§ã³ã解é¤ãã¾ããã
mysql> call mysql.rds_reset_external_master; +----------------------+ | message             | +----------------------+ | Slave has been reset | +----------------------+ 1 row in set (0.01 sec) Query OK, 0 rows affected (0.01 sec)
æé 6 MySQL ã®åæ¢
æå¾ã« MySQL ã®ã¤ã³ã¹ã¿ã³ã¹ãåæ¢ãã¾ããã
ããã¯æ°æ¥ç¨åº¦ã®ä½è£ããã£ã¦åæ¢ãã¾ããã
ãã¼ã¿ãã¼ã¹ã®ç§»è¡ã¯ããã§å®äºãã¾ããã
å
¨ä½çã«ã¯å¤§ããªãã©ãã«ããªããã¹ã ã¼ãºã«ç§»è¡ã§ããã¨æãã¦ãã¾ãã
ã¢ããªã±ã¼ã·ã§ã³ã®å¤æ´
ãã¼ã¿ãã¼ã¹ãèªã¿åãå°ç¨ã ã£ãã¨ãã®æåã®å¤æ´
ã¢ããªã±ã¼ã·ã§ã³ã¯ãã¼ã¿ãã¼ã¹ã¸ã®æ¸ãè¾¼ãã ã¨ãã«ããã¼ã¿ãã¼ã¹ãèªã¿åãå°ç¨ã ã£ãã¨ãã¯ã¨ã©ã¼ãã¼ã¸ã表示ãã¦ãã¾ããã
ä»åã¯ãæ示çã«èªã¿åãå°ç¨ã«å¤æ´ãããããã¨ã©ã¼ãã¼ã¸ã§ã¯ãªãã¡ã³ããã³ã¹ä¸ã§ããæ¨ã表示ããããã«ã移è¡ã®åã«ã¢ããªã±ã¼ã·ã§ã³ãå¤æ´ãã¦ããã¾ããã
JDBC ãã©ã¤ãã®å¤æ´
Java ã¢ããªã±ã¼ã·ã§ã³ãã Aurora ã«æ¥ç¶ããå ´åã«ã¯ JDBC ãã©ã¤ãã« MariaDB Connector/J ã使ãã¨é«éãªãã§ã¤ã«ãªã¼ãã¼ãå®ç¾ã§ãã¾ããä»åã¯ãã¼ã¿ãã¼ã¹ã®ç§»è¡ãçµãã£ããã¨ã« JDBC ãã©ã¤ããå¤æ´ãã¾ããã
MariaDB Connector/J
å¾æ¥ã® RDS ã®ãã«ã AZ ã¯ãããã¹ã¿ã³ãã¤ã®æ§æã¨ãªã£ã¦ããããã§ã¤ã«ãªã¼ãã¼ãçºçããã¨ãã«ã¯ã©ã¹ã¿ã¼ã¨ã³ããã¤ã³ãããã¹ã¿ã¼ãã¹ã¬ã¼ãã® IP ã¢ãã¬ã¹ãè¿ãä»çµã¿ã§ããããã㯠DNS ãã¼ã¹ã®ãããTTL ã«å½±é¿ãããã®ã§ãã¢ããªã±ã¼ã·ã§ã³ãã¯ã©ã¹ã¿ã¼ã¨ã³ããã¤ã³ããåç §ãã¦ãã以ä¸ãã©ããã¦ããã§ã¤ã«ãªã¼ãã¼ããã¨ãã«ã¯ã¢ããªã±ã¼ã·ã§ã³ããã¼ã¿ãã¼ã¹ã«ã¢ã¯ã»ã¹ã§ããªãæéãå¢ãã¦ãã¾ãã¾ãã
MariaDB Connector/J 㯠MariaDB 㨠MySQL ã®ããã® JDBC ãã©ã¤ãã¼ã§ãããã§ã¤ã«ãªã¼ãã¼ã®ããã®ä»çµã¿ãçµã¿è¾¼ã¾ãã¦ãããAurora ã®ã¯ã©ã¹ã¿ã¼ã«ã対å¿ãã¦ãã¾ãã
ãã®ãã©ã¤ãã§ã¯ JDBC URL ã«ã¯ã©ã¹ã¿ã¼ã¨ã³ããã¤ã³ãã§ã¯ãªãã以ä¸ã®ããã«ãã¼ãã¨ã³ããã¤ã³ããåæãããã¨ã§é«éãªãã§ã¤ã«ãªã¼ãã¼ãå®ç¾ãã¾ãã
jdbc:mysql:aurora://{ãã¼ãã¨ã³ããã¤ã³ã1}:3306,{ãã¼ãã¨ã³ããã¤ã³ã2}:3306,.../account-db
Aurora 㯠1 å°ã® Writer ã¨è¤æ°å°ã® Reader ãããªãã¯ã©ã¹ã¿ã¼ãæ§æã§ãã¾ããWriter ã Reader ãã¯ã°ãã¼ãã«å¤æ° innodb_read_only ã§èå¥ã§ãã¾ããã¯ã©ã¹ã¿ã¼ã Writer ãã¼ãã§é害ãæ¤ç¥ããã¨ãå³åº§ã«æ£å¸¸ãª Reader ã®ãã¡ 1 å°ã® innodb_read_only ãå¤æ´ãããã®ãã¼ãã Writer ã«å¤æ´ãã¾ãã
ãã®ãã©ã¤ãã¯ã¯ã¨ãªçºè¡æã«é害ãæ¤åºãã㨠innodb_read_only ã«ãã£ã¦ Writer ã確èªããã¯ã¨ãªãçºè¡ãããã¼ããåãæ¿ãã¦å度ã¯ã¨ãªãçºè¡ãã¾ãã
ãã§ã¤ã«ãªã¼ãã¼ãçºçãã¦ããã©ã¤ããå³åº§ã«æ¥ç¶å
ãåãæ¿ãããããã¢ããªã±ã¼ã·ã§ã³ã¯ãã§ã¤ã«ãªã¼ãã¼ãçºçãããã¨ãæ°ã«ããå¦çãç¶ãããã¨ãã§ãã¾ãã
詳細ãªæå㯠mariadb.com ã®ããã¥ã¡ã³ãã§ã確èªãã ããã
注æãããã¨
MariaDB Connector/J ã®ãã¼ã¸ã§ã³ã«ã¯ 1.2.3 ã使ãã¾ããããããã¤ã注æãå¿ è¦ãªã¨ãããããã¾ããã
MariaDB ã®ãµã¤ãã«ã¯ä»¥ä¸ã®ãããªè¨è¼ãããã¾ãã
It’s originally based on the Drizzle JDBC code, and with a lot of additions and bug fixes.
ãã® JDBC ãã©ã¤ã㯠Drizzle ( http://www.drizzle.org/ ) ã® JDBC ãã©ã¤ãããã¼ã¹ã«ãªã£ã¦ãã¦ãMySQL Connector/J ã¨ã¯ã³ã¼ãã®ãã¼ã¹ãéãã¾ãããã®ããããã©ã¡ã¼ã¿ã®ä½ç³»ãéã£ã¦ããããç´°ããé¨åã®æåãéã£ã¦ããããã¾ãã
ç¾æç¹ã§ã¯ JDBC 4.1 ã§è¿½å ããã ResultSet ã¤ã³ã¿ã¼ãã§ã¼ã¹ã® T getObject(int i, Class<T> type) ã常㫠null ãè¿ããããªå®è£ ã§ããããã¼ã©ãã¢ã«ã¦ã³ãã§ã¯ Java ã® enum ã MySQL ã® VARCHAR ã«ãããã³ã°ãã¦ããã¨ããããããResultSet ããå¤ãåå¾ããã¨ãã«ååºã®ã¡ã½ããã使ã£ã¦ããã®ã§ãããã«ä¿®æ£ãå¿ è¦ã§ããã
ã¾ããã¢ããªã±ã¼ã·ã§ã³ã®çµäºæã«ã¹ã¬ãããæ®ã£ã¦ãã¾ãåé¡ãããããã§ãã
https://mariadb.atlassian.net/browse/CONJ-61
ããã«å¯¾ããã¯ã¼ã¯ã¢ã©ã¦ã³ãã¨ã㦠org.mariadb.jdbc.Driver ã¯ã©ã¹ã« unloadDriver ã¨ããã¡ã½ãããç¨æããã¦ãã¦ããã©ã¤ãã¼ã®ã¢ã³ãã¼ãå¾ã«ãã®ã¡ã½ãããå¼ã³åºããã¨ã§æ£ããçµäºã§ããããã«ãªãã¾ãããã¼ã©ãã¢ã«ã¦ã³ãã§ã¯ä»¥ä¸ã®ãããªã³ã¼ãã ServletContextListener ã® contextDestroyed ã¡ã½ããããå¼ã³åºãããã«ãã¦ãã¾ãã
try { final Class<?> clazz = ClassUtils.getClass("org.mariadb.jdbc.Driver"); MethodUtils.invokeStaticMethod(clazz, "unloadDriver"); } catch (final ReflectiveOperationException e) { }
ã¦ããããã¹ãã§å質ãæ ä¿ãã
æ¬çªç°å¢ã Aurora ã«ãªã£ã¦ããéçºè ã¯å¼ãç¶ã MySQL ãå©ç¨ãã¾ããã¾ããJenkins ã«ãã CI ç°å¢ã§ã¯ãç¸å¤ããã MySQL ãå©ç¨ãã¾ããAurora ã MySQL äºæãæ²ãã¦ãã¦ããã©ãã¾ã§äºææ§ãããã®ãããããªãã¨ãããããã¾ãã
ããã§ãAurora ã«ç§»è¡ãã¦ããã¹ãã¼ã¸ã³ã°ç°å¢ãå©ç¨ããã¦ããããã¹ãã«ãã£ã¦çºè¡ããã SQL ã«åé¡ããªããã¨ãæ ä¿ãããã¨èãã¾ããããã®ãµã¼ãã¼ã§ã¯æ¬çªç°å¢ã¨åãããã«ã¢ããªã±ã¼ã·ã§ã³ã稼åãã¦ããã®ã§ãããããã«å ãã¦ãããã Jenkins ã®ã¹ã¬ã¼ãã¨ã㦠1 æ¥ã« 1 åããã«ããå®è¡ãããããã«ãã¾ããã
ãã㧠MySQL 㨠Aurora ã¨ã§éäºæãªé¨åããã£ã¦ãããã®ãã¹ãã§æ¤ç¥ã§ãã¾ãã
ã¡ãªã¿ã«ä»ã¾ã§ãã®ãã¹ãããã¼ã¿ãã¼ã¹ã®äºææ§ãåå ã§å¤±æãããã¨ã¯ããã¾ãããMySQL ã¨ã®äºææ§ã«ã¤ãã¦ã¯ç´ æ´ãããå質ã ã¨æãã¾ããã
ã¾ã¨ã
Aurora ã«ã¯ Amazon ã®æ¬æ°åº¦ãéæã«ä¼ºãã¾ãã
移è¡å¾ã«ãã¼ã¿ãã¼ã¹ã®é害ããã§ã¤ã«ãªã¼ãã¼ãçºçãããã¨ã¯ããã¾ãããç¾å¨ã®ã¨ããæ¬çªç°å¢ã§ã¯ Aurora ã®ã¡ãªãããä½æã§ãã¦ã¯ãã¾ããããã¹ãã¼ã¸ã³ã°ç°å¢ã§ã¯ãã§ã¤ã«ãªã¼ãã¼ãçºçããã¨ãã«ã¢ããªã±ã¼ã·ã§ã³ã«ã¯å½±é¿ããªããã¨ã確èªãã¦ãã¾ãã
Aurora ãåãã¦ããé«ãã¹ã±ã¼ã©ããªãã£ãã¢ãã¤ã©ããªãã£ã«ãã£ã¦ãã·ã¹ãã å ¨ä½ã®ã¹ã±ã¼ã©ããªãã£ãã¢ãã¤ã©ããªãã£ãé«ã¾ãã¾ããã
MySQL ã¨ã®äºææ§ãé«ããã®ããããã¤ã³ãã©ãå¤ãã£ã¦ãããããç¹ã«æèããéç¨ãéçºããã¦ãããã®ã¯ãã¨ã¦ãããããã¨ãªã®ã§ã¯ãªããã¨æãã¦ãã¾ãã
ä»å¾ Amazon Aurora ã¸ã®ç§»è¡ãæ¤è¨ãã¦ããçæ§ã®ä¸å©ã«ãªãã°å¹¸ãã§ãã
ãã¼ã©ãã§ã¯ãã¼ã¿ãã¼ã¹å¤§å¥½ãï¼ ã¨ããã¨ã³ã¸ãã¢ãåéãã¦ãã¾ãã