master<-dev#1529
Merged
Merged
Conversation
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CREATE EXTENSION と create_table.sql の実行を create_schema として import_csv から分離し、スキーマ作成後に CSV と GTFS のインポートを tokio::spawn で並行起動する。 GTFS はバックグラウンドのまま、CSV 完了時点でサーバ起動・ヘルスチェック 通過。CSV 完了後に GTFS の完了を待って integrate_gtfs_to_stations と ANALYZE を実行する。GTFS 失敗時の挙動は従来通り warn のみ。 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* GTFSインポート各ステップに進捗ログを追加 ECSデプロイ後にGTFSデータが入らない事象の切り分けのため、 import_gtfs / integrate_gtfs_to_stations / download_gtfs と main.rs の gtfs_handle.await 周辺の各ステップに経過時間付きの info ログを追加。 これにより、ダウンロード・HTTP応答・DB接続・各サブテーブルの DELETE/INSERT・transaction commit のどこでハングしているか 特定可能になる。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * integrate前にgtfs_*テーブルをANALYZE build_stop_route_mappingでハングする問題への対処。 CSV側のANALYZEがgtfs_*テーブル空のタイミングで走るため、 integrate実行時に統計情報が0行ベースのまま劣悪なplanが選ばれていた。 GTFSインポート完了直後、integrate呼び出し前に gtfs_*の9テーブルをANALYZEして最新統計を埋める。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ECSメトリクスでタスク全体のメモリ使用率が2GB中380MB(19%)程度に留まり リソースが遊んでいたため、PostgreSQLが使えるメモリを引き上げる。 - shared_buffers: 128MB → 384MB (ページキャッシュ拡大) - work_mem: 4MB → 64MB (ソート/ハッシュ結合のスピル抑制) - maintenance_work_mem: 64MB → 256MB (ANALYZE/CREATE INDEXの高速化) - effective_cache_size: 4GB → 1GB (プランナーへの実態に即したヒント) UNLOGGEDテーブル運用なのでshared_buffersの効果が通常より大きい。 maintenance_work_memの引き上げはデプロイ時の起動時間短縮に直結する。 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* get_bus_stops_near_stationsのslow statementを部分GiSTインデックスで解消 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * 部分GiSTインデックスをtransport_type列追加後に移動 CREATE INDEX が ALTER TABLE による transport_type 列追加より前に 実行されると "column transport_type does not exist" になるため、 transport_type 関連の他インデックス定義の隣へ移動する。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
dev ブランチに溜まった変更を master へ反映するリリース PR。
get_bus_stops_near_stationsの slow statement を部分 GiST インデックスで解消、PSQL サイドカーのメモリチューニング設定追加、GTFS インポート前ANALYZEによるハング修正、CSV/GTFS インポートの並行実行化、バス種別名の表示修正を含む。変更の種類
変更内容
get_bus_stops_near_stationsの slow statement を部分 GiST インデックスで解消 (get_bus_stops_near_stationsのslow statementを部分GiSTインデックスで解消 #1528)gtfs_*をANALYZEしてハングを修正 (GTFS integrate前にgtfs_*をANALYZEしてハングを修正 #1526)compose.ymlの PSQL サイドカーにメモリチューニング設定を追加 (compose.ymlのPSQLサイドカーにメモリチューニング設定を追加 #1527)テスト
cargo fmt --all -- --checkが通ることcargo clippy -- -D warningsが通ることcargo test(SQLX_OFFLINE=true)が通ること関連Issue
#1528 #1527 #1526 #1525 #1524
スクリーンショット(任意)