“合并这个拉取请求可能会降低生产环境的表现。” Polylane对照真实的生产环境审查每一个拉取请求。
加入候补名单 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看不到生产环境。 这位审查者看得到。
-
对照线上状态审查
差异会对照它将部署到的服务进行检查:它们的配置、流量和最近的故障。
-
默认通过
要判不通过,必须确切证明差异中的某一行如何破坏生产环境。“可能”不算。
-
只有一条评论
每次推送都就地更新,从不堆积。文档和测试改动直接通过。
-
想要的话,也可以硬起来
开启阻断检查后,一次不通过会阻止合并,直到后续推送解决它。