fix(market-metrics): offer-trend таймаут — warning вместо exception
All checks were successful
CI Trade-In / changes (pull_request) Successful in 6s
CI / changes (pull_request) Successful in 7s
CI / frontend-tests (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 1m52s
CI / backend-tests (pull_request) Successful in 15m9s
All checks were successful
CI Trade-In / changes (pull_request) Successful in 6s
CI / changes (pull_request) Successful in 7s
CI / frontend-tests (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 1m52s
CI / backend-tests (pull_request) Successful in 15m9s
Профилирование 2026-07-04: QueryCanceled на /analyze (~2/сутки в GlitchTip) — это НЕ user-баг. Offer-trend (§4.3) — самый тяжёлый запрос analyze (211k итераций Nested Loop в objective_lots_history, ~7.4 ГБ буфер-трафика) — на холодном кэше иногда пробивает свой 8с-гвард (~3% прогонов hot-участка). Обрабатывается корректно (деградация в пустой offer_block, analyze успешен), но logger.exception при LoggingIntegration(event_level=ERROR) поднимал ложные GlitchTip-события. Ожидаемый таймаут аддитивного блока = WARNING. Корневой фикс (индекс objective_lots_history) — отдельным PR database-expert.
This commit is contained in:
parent
01f2c5290d
commit
5be7b6882f
1 changed files with 7 additions and 3 deletions
|
|
@ -875,12 +875,16 @@ def compute_offer_price_trend(
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
rows = db.execute(_OFFER_TREND_SQL, params).mappings().all()
|
rows = db.execute(_OFFER_TREND_SQL, params).mappings().all()
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
logger.exception(
|
# Ожидаемый путь: 8с-гвард (parcels.py) отменяет запрос на холодном кэше
|
||||||
"market_metrics: offer-trend query failed (lat=%s lon=%s radius=%s)",
|
# (~2/сутки, профилирование 2026-07-04) — блок аддитивный, analyze успешен.
|
||||||
|
# WARNING, не exception: ERROR-уровень поднимал ложные GlitchTip-события.
|
||||||
|
logger.warning(
|
||||||
|
"market_metrics: offer-trend query failed (lat=%s lon=%s radius=%s): %s",
|
||||||
center_lat,
|
center_lat,
|
||||||
center_lon,
|
center_lon,
|
||||||
radius_m,
|
radius_m,
|
||||||
|
exc,
|
||||||
)
|
)
|
||||||
rows = []
|
rows = []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue