-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Improve logging of put-mapping failures #121372
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
Improve logging of put-mapping failures #121372
Conversation
No sense in converting to a list just to convert to a string, we may as well convert directly to a string. Also removes the unnecessary extra `[]` wrapper.
|
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
| performMappingUpdate(concreteIndices, request, listener, metadataMappingService, false); | ||
| } catch (IndexNotFoundException ex) { | ||
| logger.debug(() -> "failed to put mappings on indices [" + Arrays.asList(request.indices() + "]"), ex); | ||
| logger.debug(() -> "failed to put mappings on indices " + Arrays.toString(request.indices()), ex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was actually just plain wrong: note that the arg to Arrays.asList was request.indices() + "]" so this was already converting the array to a string (badly), then back to an array, then to a list, and then to a string again. It's also not possible to hit this AFAICT because if the index doesn't exist we would already have thrown an INFE in checkBlock, which should be using the same ClusterState as the one we have here. At least I couldn't hit it in a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No sense in converting to a list just to convert to a string, we may as well convert directly to a string. Also removes the unnecessary extra `[]` wrapper.
No sense in converting to a list just to convert to a string, we may as well convert directly to a string. Also removes the unnecessary extra `[]` wrapper.
No sense in converting to a list just to convert to a string, we may as well convert directly to a string. Also removes the unnecessary extra `[]` wrapper.
* Improve logging of put-mapping failures (#121372) No sense in converting to a list just to convert to a string, we may as well convert directly to a string. Also removes the unnecessary extra `[]` wrapper. * CI poke * CI poke
No sense in converting to a list just to convert to a string, we may as
well convert directly to a string. Also removes the unnecessary extra
[]wrapper.