Skip to content

Conversation

@andreidan
Copy link
Contributor

The XContent representation of a SnapshotInvocationRecord is used to store an SLM
invocation record in the cluster state.

The details field could be very large, so large we cannot deserialise it anymore when a
node starts.

This adds a limit of maximum 1000 characters for the details field.

Fixes #96918

@andreidan andreidan added >bug :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.10.0 v8.9.1 labels Jun 23, 2023
@andreidan andreidan requested review from dakrone and gmarouli June 23, 2023 09:14
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jun 23, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @andreidan, I've created a changelog YAML for you.

@andreidan
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, is 1000 enough characters? Should it be 2000? (I don't actually know, just curious how it was chosen)

@andreidan
Copy link
Contributor Author

@dakrone I've picked 1000 due to paranoia :)
So 1000 characters is the exception type, message and a bit of the stack trace (depends on the Exception message length too) e.g.

org.elasticsearch.xcontent.XContentParseException: [-1:6050591] [snapshot_policy_invocation_record] failed to parse field [details]	at org.elasticsearch.xcontent.ObjectParser.throwFailedToParse(ObjectParser.java:616) ~[elasticsearch-x-content-8.8.1.jar:?]	at org.elasticsearch.xcontent.ObjectParser.parseValue(ObjectParser.java:611) ~[elasticsearch-x-content-8.8.1.jar:?]	at org.elasticsearch.xcontent.ObjectParser.parseSub(ObjectParser.java:657) ~[elasticsearch-x-content-8.8.1.jar:?]	at org.elasticsearch.xcontent.ObjectParser.parse(ObjectParser.java:315) ~[elasticsearch-x-content-8.8.1.jar:?]	at org.elasticsearch.xcontent.ConstructingObjectParser.parse(ConstructingObjectParser.java:166) ~[elasticsearch-x-content-8.8.1.jar:?]	at org.elasticsearch.xcontent.ConstructingObjectParser.apply(ConstructingObjectParser.java:158) ~[elasticsearch-x-content-8.8.1.jar:?]	at org.elasticsearch.xpack.core.slm.SnapshotInvocationRecord.parse(SnapshotInvocationRecord.java:54) ~[?:?]	at org.elasticsearch.xcontent.ObjectParser.lambda$decla 

To me it feels that the stracktrace should not be in there at all (but just logged) but happy to bump the limit further if it's useful to have more?

@dakrone
Copy link
Member

dakrone commented Jun 23, 2023

It's nice to see what 1000 characters gets us, I think it's a fine limit to use.

@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v8.9.0 v8.10.0

5 participants