[400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [analysis_state]
Service
cupixvista-api-worker
Occurrences
9
Status
Reported
Confidence
85%
Actionability
16%
Cluster ID
cc66c471-83f5-4eb7-99d2-fa475c037d8c
First Seen
2026-06-28 18:31 UTC
Last Seen
2026-08-02 18:32 UTC
Actions
[400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [analysis_state]
What Happened#
2026-06-29 03:31 KST (cupixvista, us-west-2) 주간 cron Cupix::Cron::Searchable.partial_reindex 가 Capture 모델의 Elasticsearch 매핑을 갱신하려고 put_mapping 을 호출했으나, ES 가 400 illegal_argument_exception 으로 거절했다. 기존 인덱스에서 analysis_state 필드가 이미 text 타입으로 매핑되어 있어, 코드 매핑이 요구하는 keyword 타입으로 변경할 수 없었기 때문이다. 1회 발생한 단발성 에러이지만 매주 일요일 cron 실행 시 재발할 수 있는 구조적 문제다.
Quick Facts#
| Field | Value |
|---|---|
| exception.class | Elasticsearch::Transport::Transport::Errors::BadRequest |
| exception.message | [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [analysis_state] cannot be changed from type [text] to [keyword]"}], ...} |
| top_frame | app/models/concerns/searchable.rb:354 (Capture.update_mapping! → put_mapping) |
| caller | app/models/concerns/searchable.rb:315 (Capture.partial_reindex!) |
| trigger | cron Cupix::Cron::Searchable.partial_reindex (config/schedule.rb:149-151, 30 18 * * 0 UTC) |
| env | production, us-west-2, tenant cupix (cupixvista launch mode) |
Affected Teams#
| Team / Domain | Error Count | Impact |
|---|---|---|
| Search / Indexing (Capture) | 1 | partial_reindex! 의 매핑 갱신 단계가 실패. stale document re-indexing 자체는 계속 진행되지만, 신규 mapping 정의(analysis_state: keyword)가 ES 에 반영되지 않아 analysis_state 로 keyword aggregation/sort/filter 가 정확하게 동작하지 않음. 사용자가 직접 보는 에러는 없으나 검색 품질에 잠재 영향. |
Timeline#
- 2026-06-29 03:30:28 KST —
Cupix::Cron::Searchable.partial_reindex시작 (message: "Partial reindex begins", Datadogservice:cupixvista-api-worker). - 2026-06-29 03:30:30 / 03:30:38 KST — Partial reindex 가 여러 모델에 대해 순차 진행 (
Record,Level,Capture...). - 2026-06-29 03:31:06 KST —
Capture.update_mapping!가put_mapping호출 → ES 400 응답,analysis_state타입 변경 불가 에러 1건 발생 (@class:Capture,@function:update_mapping!). - 이후 —
update_mapping(bang 없는 wrapper)이StandardError를 swallow 하여 cron 은 다음 단계(stale_documents재색인)를 정상 진행. 동일 cron 은 매주 일요일 18:30 UTC 에 재실행 예정.
Scoring#
Confidence 85% · Actionability 16%
Confidence#
| Dimension | Score | Detail |
|---|---|---|
| Evidence completeness | 5/5 | 22 code refs, 6 log queries |
| Code path explicitness | 3/3 | 22 file:line refs |
| Log evidence | 3/3 | section, query, pattern |
| RCA structure | 3/3 | 3/3 sections |
| Revision history | 0/3 | 0 revision(s) |
| Agent execution | 3/3 | success |
Actionability#
| Dimension | Score | Detail |
|---|---|---|
| Fix complexity | 1/5 | critical |
| Affected files | 1/5 | 13 file(s) |
| Single repo | 1/3 | 3 service(s) |
| Immediate actions | 0/3 | absent |
| Testability | 0/3 | no test info |
| External dependency | 1/3 | external deps found |
| Data migration | 0/3 | migration needed |