ES /docs

[400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [id] cannot be c

Service
cupixworks-migration-worker
Occurrences
1
Status
Reported
Confidence
85%
Actionability
40%
Cluster ID
a0cf7c3e-a855-4ef1-9661-533aba80dc87
First Seen
2026-07-15 06:09 UTC
Last Seen
2026-07-15 06:09 UTC
Actions

[400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [id] cannot be c

What Happened#

2026-07-15 배포 시 migration-worker 인스턴스에서 ES migration 20260713000000_add_id_to_revision_request.rb 가 실행되었다. Migration 은 RevisionRequest 인덱스에 id: integer 매핑을 명시적으로 추가하려 했으나, US 리전의 인덱스에는 이미 dynamic 매핑으로 id: long 이 존재하여 Elasticsearch 가 illegal_argument_exception (mapper [id] cannot be changed from type [long] to [integer]) 을 반환했다. 이 예외는 Searchable.append_mapping 의 상위 rescue StandardError 로 흡수되어 마이그레이션 자체는 성공 처리되었지만, 하위 append_mapping!Cupix::Logger.error 로 로깅한 후 재-raise 하기 때문에 Datadog 에는 error-level 로그가 남았다.

Quick Facts#

Field Value
exception.class Elasticsearch::Transport::Transport::Errors::BadRequest
exception.message [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [id] cannot be changed from type [long] to [integer]"}], ...}
top_frame app/models/concerns/searchable.rb:386 (append_mapping! rescue)
triggered_by es/migrate/20260713000000_add_id_to_revision_request.rb
deploy TSLA-13581 (merged 2026-07-13, PR 88824)
env production, us-west-2

Affected Teams#

Team / Domain Error Count Impact
Search / RevisionRequest ES 매핑 2 (Datadog 15:09:48, 15:46:25 KST) 사용자 영향 없음 — migration 은 no-op 처리, 기존 dynamic long 매핑으로 조회/정렬 계속 동작

Timeline#

  1. 2026-07-13 11:26 KST — TSLA-13581 (add id mapping to RevisionRequest) 이 master 에 머지됨 (commit f84b559e7).
  2. 2026-07-15 15:09:48 KSTus-west-2 migration-worker 가 es:migrate 실행 중 신규 마이그레이션의 append_mapping!('id') 호출에서 ES 400 응답을 수신. Datadog 에 error-level 로그.
  3. 2026-07-15 15:46:25 KST — 두 번째 migration-worker 인스턴스에서 동일한 error-level 로그 재발생.
  4. 2026-07-15 15:47 KST 이후 — 신규 로그 없음. ElasticsearchMigration 레코드가 기록되어 이후 배포에서는 재실행되지 않음.

Scoring#

Confidence 85% · Actionability 40%

Confidence#

Dimension Score Detail
Evidence completeness 5/5 8 code refs, 3 log queries
Code path explicitness 3/3 8 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 5/5 trivial
Affected files 1/5 14 file(s)
Single repo 1/3 3 service(s)
Immediate actions 0/3 absent
Testability 2/3 test mentioned
External dependency 1/3 external deps found
Data migration 0/3 migration needed