Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

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.
@DaveCTurner DaveCTurner added :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 labels Jan 31, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Indexing Meta label for Distributed Indexing team label Jan 31, 2025
@elasticsearchmachine
Copy link
Collaborator

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);
Copy link
Contributor Author

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.

Copy link
Contributor

@nicktindall nicktindall left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner DaveCTurner merged commit f6ca4e1 into elastic:main Jan 31, 2025
17 checks passed
@DaveCTurner DaveCTurner deleted the 2025/01/31/put-mapping-failure-logging branch January 31, 2025 11:38
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Jan 31, 2025
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.
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Jan 31, 2025
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.
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Jan 31, 2025
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.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18
8.x
9.0

elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
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.
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
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.
elasticsearchmachine pushed a commit that referenced this pull request Feb 6, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >non-issue Team:Distributed Indexing Meta label for Distributed Indexing team v8.18.1 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants