Skip to content

fix(ism): change lastUpdatedTime from Integer to Long to prevent epoc…#1977

Closed
Zahanturel wants to merge 2 commits into
opensearch-project:mainfrom
Zahanturel:fix/ism-last-updated-time-long-overflow
Closed

fix(ism): change lastUpdatedTime from Integer to Long to prevent epoc…#1977
Zahanturel wants to merge 2 commits into
opensearch-project:mainfrom
Zahanturel:fix/ism-last-updated-time-long-overflow

Conversation

@Zahanturel
Copy link
Copy Markdown

@Zahanturel Zahanturel commented May 9, 2026

What does this change achieve?

last_updated_time in Policy and IsmTemplate carries epoch-millisecond timestamps. These values (e.g. 1700000000000) exceed Integer.MAX_VALUE (2147483647), causing InputCoercionException with JacksonJsonpMapper and silent negative-value corruption with JsonbJsonpMapper.

Changes format: int64 in the OpenAPI spec (the code generation source of truth) and updates the generated Java models accordingly. Verified against TypeMapper.java and the Mustache templates that the generated output is identical to what ./gradlew :java-codegen:run would produce.

Issues Resolved

Fixes #1898.

Zahanturel added 2 commits May 9, 2026 08:56
…h-ms overflow

`last_updated_time` carries epoch-millisecond timestamps (e.g. 1700000000000).
These values exceed Integer.MAX_VALUE (2147483647), causing InputCoercionException
with JacksonJsonpMapper and silent negative-value corruption with JsonbJsonpMapper.

Fixes: opensearch-project#1898
Signed-off-by: Zahan Turel <turelzahan10@gmail.com>
Signed-off-by: Zahan Turel <turelzahan10@gmail.com>
@Zahanturel Zahanturel force-pushed the fix/ism-last-updated-time-long-overflow branch from 9d3cf40 to 417db40 Compare May 9, 2026 00:56
Copy link
Copy Markdown
Collaborator

@reta reta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zahanturel thanks for the change, these files are generated, please submit the change to specification instead - https://github.com/opensearch-project/openSearch-api-specification

@Zahanturel
Copy link
Copy Markdown
Author

Thanks for the redirect. Will submit the fix to the API specification repo instead at opensearch-project/opensearch-api-specification.

@Zahanturel Zahanturel closed this May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ISM types lastUpdatedTime is susceptible to int overflow

2 participants