Skip to content

[8.17] Workaround max name limit imposed by Jackson 2.17 (#126806) #126873

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

Merged
merged 2 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/126806.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 126806
summary: Workaround max name limit imposed by Jackson 2.17
area: Infra/Core
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public class XContentImplUtils {
public static <F extends JsonFactory, B extends TSFBuilder<F, B>> F configure(TSFBuilder<F, B> builder) {
// jackson 2.15 introduced a max string length. We have other limits in place to constrain max doc size,
// so here we set to max value (2GiB) so as not to constrain further than those existing limits.
return builder.streamReadConstraints(StreamReadConstraints.builder().maxStringLength(Integer.MAX_VALUE).build()).build();
// jackson 2.16 further introduced a max name length, which we also relax here temporarily.
// see https://github.com/elastic/elasticsearch/issues/58952
return builder.streamReadConstraints(
StreamReadConstraints.builder().maxStringLength(Integer.MAX_VALUE).maxNameLength(Integer.MAX_VALUE).build()
).build();
}
}