ES /docs

Elasticsearch mapping schema drift — immutable field type mismatch

Service
cupixworks-worker
Occurrences
209
Status
Reported
Confidence
85%
Actionability
16%
Cluster ID
e5a7c69a-d146-4560-b89f-7ddf7efc46dd
First Seen
2026-04-12 18:30 UTC
Last Seen
2026-08-02 18:54 UTC
Actions

Elasticsearch mapping schema drift — immutable field type mismatch

What Happened#

2026-05-03 18:30 UTC에 매주 일요일 실행되는 cron job Cupix::Cron::Searchable.partial_reindex가 트리거되면서, cupixworks-worker 서비스에서 Elasticsearch put_mapping API 호출이 5개 모델(Record, Editing, Capture, Bim, Integration)에 걸쳐 일괄 실패했다. 총 9개 필드에서 기존 인덱스의 필드 타입과 코드에 정의된 매핑 타입이 불일치하여 Elasticsearch가 HTTP 400 illegal_argument_exception으로 거부했다. 13건의 에러가 전 리전(eu-central-1, ap-southeast-2, us-west-2, ap-northeast-1, ap-southeast-1)에서 동시 발생했다.

Quick Facts#

Field Value
exception.class Elasticsearch::Transport::Transport::Errors::BadRequest
exception.message [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [priority] cannot be changed from type [long] to [integer]"}]}}
top_frame app/models/concerns/searchable.rb:311
trigger Cupix::Cron::Searchable.partial_reindex (cron: 30 18 * * 0 — 매주 일요일 18:30 UTC)
deploy 20260503T1830Z0 (dev: b9f4f414, stage: 6418d0ea, production: 57c6026d)
env production (eu-central-1, ap-southeast-2, us-west-2, ap-northeast-1, ap-southeast-1), stage, dev

Timeline#

  1. 2026-05-03T18:30:28Z — cron job Cupix::Cron::Searchable.partial_reindex 실행. update_mapping! 호출이 전 리전에서 동시 시작, Record 모델에서 즉시 실패
  2. 2026-05-03T18:30:28Z~18:34:46Z — Record, Editing, Capture, Bim, Integration 5개 모델에서 총 21건의 update_mapping! 에러 발생 (이 클러스터는 Record priority 관련 13건)
  3. 2026-05-04 — Error sweeper 감지 및 RCA 수행

Scoring#

Confidence 85% · Actionability 16%

Confidence#

Dimension Score Detail
Evidence completeness 5/5 20 code refs, 5 log queries
Code path explicitness 3/3 20 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 23 file(s)
Single repo 1/3 2 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