1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Aurora v3へアップデートした際に起きたEmbulkのトラブルシューティング

Last updated at Posted at 2024-09-30

Amazon Aurora MySQLのバージョンをv2(5.7互換)からv3(8.0互換)へアップデートした際に、AuroraからBigQueryへ転送を行なっているEmbulkの一部タスクが失敗するようになったため、それをどう修正したかをお伝えします。

MySQL 8.0で利用されるようになった予約語とカラム名・テーブル名の衝突

  • MySQL5.7互換から->8.0互換になることで予約語が増えているので、少なくとも衝突してしまったカラム名・テーブル名はバッククォートで囲いましょう
    • そもそも全部のカラムをバッククォートで囲うようにしてもよいでしょう
{%
  include 'template',
  bigquery_table: 'groups',
  query: "
             SELECT
               id,
-              rank,
+              `rank`,
               created_at
-            FROM groups;
+            FROM `groups`;
         "
  %}

一時テーブルの上限を増やす

  • 転送量が多いタスクの場合、一時テーブル関係の設定がデフォルトのままだと失敗する可能性があります
    • 一時テーブルに利用できるメモリ量をtemptable_max_mmaptemptable_max_ramのパラメーターで調整しましょう

認証プラグインについて

  • MySQL8.0ではデフォルトの認証プラグインがcaching_sha2_passwordに変更されていますが、Aurora v3では引き続きmysql_native_passwordが利用されます

まとめ

今回はMySQL8.0に上げるというトピックの中でも、AuroraとEmbulkの2つを軸とした対応を書かせていただきました。
そろそろAurora v2もの標準サポート終了が近くなり、慌てて上げている方ももしかしたらいらっしゃるかもしれないので、そのような方のお助けになれば幸いです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?