Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide mechanism to configure XContent parsing constraints (after update to Jackson 2.15.0) #7549

Closed
reta opened this issue May 12, 2023 · 3 comments
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request v2.8.0 'Issues and PRs related to version v2.8.0' v3.0.0 Issues and PRs related to version 3.0.0

Comments

@reta
Copy link
Collaborator

reta commented May 12, 2023

Is your feature request related to a problem? Please describe.
The OpenSearch used to have no constants (at least officially) on maximum fields sizes that could be uploaded using supported XContent types (JSON/CBOR/YAML/Smile). Since Jackson 2.15.0, there are streaming constraints in place.

Describe the solution you'd like
Provide the way to alter Jackson 2.15.0 streaming constraints for supported XContent types. Since all factories are initialized statically, the suggestion is to use system property opensearch.xcontent.string.length.max. The default has also been increased from ~5Mb to ~50Mb.

Describe alternatives you've considered
Lift the streaming constraints by setting the maximum string size to Integer.MAX_VALUE.

Additional context
#7286
FasterXML/jackson-core#1001 (comment)

@reta reta added enhancement Enhancement or improvement to existing feature or request untriaged labels May 12, 2023
@reta reta self-assigned this May 12, 2023
@reta reta removed the untriaged label May 12, 2023
@reta reta removed the untriaged label May 12, 2023
@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.8.0 'Issues and PRs related to version v2.8.0' labels May 12, 2023
@reta
Copy link
Collaborator Author

reta commented May 16, 2023

Documentation update opensearch-project/documentation-website#4089

@ylwu-amzn
Copy link
Contributor

ylwu-amzn commented May 16, 2023

Thanks @reta , I see the Jackson 2.15.0 version bump also backported to 2.x branch #7300. Is that must have? This will introduce string length limit, which is a breaking change.If user store big strings in index, it will stop working after upgrading to 2.8. Should be fine to have this breaking change in major version release like 3.0, but should we keep BWC for minor version release (2.7 -> 2.8)?

@reta
Copy link
Collaborator Author

reta commented May 16, 2023

@ylwu-amzn we bumped the limit 10x to accomodate for such possible regression, however to your point, we may lift the content limit for 2.x branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request v2.8.0 'Issues and PRs related to version v2.8.0' v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

No branches or pull requests

2 participants