Skip to content
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

Global ordinals crash warmers #15590

Closed
zygfryd opened this issue Dec 22, 2015 · 3 comments
Closed

Global ordinals crash warmers #15590

zygfryd opened this issue Dec 22, 2015 · 3 comments
Labels

Comments

@zygfryd
Copy link

zygfryd commented Dec 22, 2015

This has been happening in ES 2.0.x and 2.1.x, the last release where warmers worked for me was 2.0rc1. Affects newly created indexes.

Stacktrace for a simple terms aggregation warmer for a string field (ES 2.1.1):

[2015-12-21 19:28:06,323][WARN ][index.warmer             ] [lxc] [works9][0] warmer [warm_contrib_aggs] failed
java.lang.ClassCastException: org.apache.lucene.index.MultiReader cannot be cast to org.apache.lucene.index.DirectoryReader
    at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals$FieldData.globalOrdinalsValues(ValuesSource.java:144)
    at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals.globalMaxOrd(ValuesSource.java:117)
    at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.doCreateInternal(TermsAggregatorFactory.java:214)
    at org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory.createInternal(ValuesSourceAggregatorFactory.java:64)
    at org.elasticsearch.search.aggregations.AggregatorFactory.create(AggregatorFactory.java:102)
    at org.elasticsearch.search.aggregations.AggregatorFactories.createTopLevelAggregators(AggregatorFactories.java:87)
    at org.elasticsearch.search.aggregations.AggregationPhase.preProcess(AggregationPhase.java:78)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:104)
    at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:363)
    at org.elasticsearch.search.SearchService.access$600(SearchService.java:119)
    at org.elasticsearch.search.SearchService$SearchWarmer$1.run(SearchService.java:1160)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
@jpountz
Copy link
Contributor

jpountz commented Dec 22, 2015

Thanks for the report, this problem is due to #14084.

@jpountz
Copy link
Contributor

jpountz commented Jan 7, 2016

Closing: warmers will go away in 3.0 #15614

@jpountz jpountz closed this as completed Jan 7, 2016
@ppf2
Copy link
Member

ppf2 commented Mar 16, 2016

I can still reproduce the issue on 2.2.0 so it doesn't look like it is addressed by #14084.

[2016-03-15 19:04:28,764][WARN ][index.warmer             ] [cluster1_node1] [testwarmer][3] warmer [testwarmer] failed
java.lang.ClassCastException: org.apache.lucene.index.MultiReader cannot be cast to org.apache.lucene.index.DirectoryReader
    at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals$FieldData.globalOrdinalsValues(ValuesSource.java:144)
    at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals.globalMaxOrd(ValuesSource.java:117)
    at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.doCreateInternal(TermsAggregatorFactory.java:217)
    at org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory.createInternal(ValuesSourceAggregatorFactory.java:64)
    at org.elasticsearch.search.aggregations.AggregatorFactory.create(AggregatorFactory.java:102)
    at org.elasticsearch.search.aggregations.AggregatorFactories.createTopLevelAggregators(AggregatorFactories.java:87)
    at org.elasticsearch.search.aggregations.AggregationPhase.preProcess(AggregationPhase.java:85)
    at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:111)
    at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:364)
    at org.elasticsearch.search.SearchService.access$600(SearchService.java:120)
    at org.elasticsearch.search.SearchService$SearchWarmer$1.run(SearchService.java:1165)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Simple warmer with a terms agg:

PUT testwarmer/type/1
{
  "test":"test"
}

PUT /testwarmer/_warmer/testwarmer
{
  "query": {
    "match_all": {}
  },
  "aggs": {
    "test":{
      "terms": {
        "field": "test",
        "size": 10
      }
    }
  }
}

PUT testwarmer/type/1
{
  "test":"test"
}

However, as noted above, warmers will be removed from the product in 5.0 (previously known as 3.0) so this is just a note in case users run into it on 2.2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants