儀表板

「合併這個 pull request 可能會讓生產環境降級。」 Polylane 對照即時的生產環境審查每一個 pull request。

加入候補名單
github.com/coreplane/orders-api/pull/482

Add trigram index for order search #482

Open rvidal wants to merge 1 commit into main from order-search-trgm
Conversation 1 Commits 1 Checks 2 Files changed 1
polylane bot commented 2 minutes ago ···
Caution

Merging this pull request may degrade production (high impact).

Merging this blocks every write to orders while the index builds. migrations/0114_order_search_trgm.sql:3 adds CREATE INDEX … USING gin (search_text gin_trgm_ops) without CONCURRENTLY, and a plain CREATE INDEX takes a full write lock on orders for the whole build. Checkout sustains ~38 writes/s on that table; each one queues behind the lock until the build finishes.

To make this safe: build the index with CREATE INDEX CONCURRENTLY outside the transactional migration.

orders-db · writes per second · last 48h projected lock window
02040
-48h -24h now
every one of these writes blocks while the index builds

Polylane analysed de91b47 for production impact.

Some checks were not successful 1 failing and 1 successful check
ci / test Successful in 2m 4s Details
Polylane production impact Non-concurrent index build locks writes on orders Details
Merging is blocked

你的 linter 看不到生產環境。 這位審查者看得到。

  • 對照線上實況審查

    差異會對照它要部署到的服務來檢查:它們的設定、流量、最近的事件。

  • 預設通過

    要判不通過,就必須確切證明差異中的某一行如何弄壞生產環境。「可能」不算。

  • 只有一則留言

    每次推送都就地更新,絕不堆疊。文件與測試的變更直接通過。

  • 要它有牙齒,也可以

    開啟阻擋檢查後,不通過會擋住合併,直到之後的推送解決問題。

最便宜的事件,是那個從未合併的。 Polylane 在審查時就抓住它。