Skip to content

master<-dev#1529

Merged
TinyKitten merged 5 commits into
masterfrom
dev
May 17, 2026
Merged

master<-dev#1529
TinyKitten merged 5 commits into
masterfrom
dev

Conversation

@TinyKitten
Copy link
Copy Markdown
Member

概要

dev ブランチに溜まった変更を master へ反映するリリース PR。get_bus_stops_near_stations の slow statement を部分 GiST インデックスで解消、PSQL サイドカーのメモリチューニング設定追加、GTFS インポート前 ANALYZE によるハング修正、CSV/GTFS インポートの並行実行化、バス種別名の表示修正を含む。

変更の種類

  • バグ修正
  • 新機能
  • データの修正・追加
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

テスト

  • cargo fmt --all -- --check が通ること
  • cargo clippy -- -D warnings が通ること
  • cargo testSQLX_OFFLINE=true)が通ること

関連Issue

#1528 #1527 #1526 #1525 #1524

スクリーンショット(任意)

TinyKitten and others added 5 commits May 16, 2026 00:35
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>
@TinyKitten TinyKitten self-assigned this May 17, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c4fae492-ca02-44d2-a8d8-f17d4073191e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands and usage tips.

@TinyKitten TinyKitten merged commit 6fa8e6a into master May 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant