-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[Rollup] Better error message when trying to set non-rollup index #32965
[Rollup] Better error message when trying to set non-rollup index #32965
Conversation
We don't allow the user to configure a rollup index against an existing index, but the exceptions that we return are not clear about that. They indicate issues with metadata, instead of stating the real reason (not allowed to use a non-rollup index to store rollup data). This makes the exception better, and adds a bit more testing
Pinging @elastic/es-search-aggs |
@colings86 figured I'd give Jim a break on reviews, mind taking a look at this? Should be quick/easy :) |
@@ -158,16 +158,18 @@ static void updateMapping(RollupJob job, ActionListener<AcknowledgedResponse> li | |||
MappingMetaData mappings = getMappingResponse.getMappings().get(indexName).get(RollupField.TYPE_NAME); | |||
Object m = mappings.getSourceAsMap().get("_meta"); | |||
if (m == null) { | |||
String msg = "Expected to find _meta key in mapping of rollup index [" + indexName + "] but not found."; | |||
String msg = "Rollup indices cannot co-mingle with non-rollup data (expected to find _meta key in " + |
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.
I think co-exist
might be better than co-mingle
here? Also this message might still be a little confusing because its comparing a Rollup indices
with non-rollup data
, should we instead say either called both indices or both data?
+ "] but not found."; | ||
String msg = "Rollup indices cannot co-mingle with non-rollup data (expected to find " + | ||
"rollup meta key [" + RollupField.ROLLUP_META + "] in mapping of rollup index [" | ||
+ indexName + "] but not found)."; |
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.
Same comment as above
@colings86 👍 rewrote the messages, they were just as confusing as the pre-PR messages (oops). Hopefully less vague and more helpful now :) |
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
…2965) We don't allow the user to configure a rollup index against an existing index, but the exceptions that we return are not clear about that. They indicate issues with metadata, instead of stating the real reason (not allowed to use a non-rollup index to store rollup data). This makes the exception better, and adds a bit more testing
* master: [Rollup] Better error message when trying to set non-rollup index (#32965) HLRC: Use Optional in validation logic (#33104) Remove unused User class from protocol (#33137) ingest: Introduce the dissect processor (#32884) [Docs] Add link to es-kotlin-wrapper-client (#32618) [Docs] Remove repeating words (#33087) Minor spelling and grammar fix (#32931) Remove support for deprecated params._agg/_aggs for scripted metric aggregations (#32979) Watcher: Simplify finding next date in cron schedule (#33015) Run Third party audit with forbidden APIs CLI (part3/3) (#33052) Fix plugin build test on Windows (#33078) HLRC+MINOR: Remove Unused Private Method (#33165) Remove old unused test script files (#32970) Build analysis-icu client JAR (#33184) Ensure to generate identical NoOp for the same failure (#33141) ShardSearchFailure#readFrom to set index and shardId (#33161)
* 6.x: [Rollup] Better error message when trying to set non-rollup index (#32965) Remove unused User class from protocol (#33137) [DOCS] Adds link to 6.3.0 release highlights Test: fix token bwc tests due to bad backport Ensure to generate identical NoOp for the same failure (#33141) [Docs] Add link to es-kotlin-wrapper-client (#32618) [Docs] Remove repeating words (#33087) Minor spelling and grammar fix (#32931) Run Third party audit with forbidden APIs CLI (part3/3) (#33052) Fix plugin build test on Windows (#33078) Watcher: Simplify finding next date in cron schedule (#33015) Remove old unused test script files (#32970) Build analysis-icu client JAR (#33184) Switch remaining tests to new style Requests (#33109) Use internal connection manager when fetching remote node info Switch remaining x-pack tests to new style Requests (#33108) Switch remaining ml tests to new style Requests (#33107) Token API supports the client_credentials grant (#33106)
We don't allow the user to configure a rollup index against an existing index, but the exceptions that we return are not clear about that. They indicate issues with metadata, instead of stating the real reason (not allowed to use a non-rollup index to store rollup data).
This makes the exception better, and adds a bit more testing