our plugins need read field value from docvalue
, after query phase we set the DocValueFieldsContext
contains the field we need. If field has no docvalue, we would retrieve this field value from stored_fields
or _source
. The whole query became very slowly, dump the proccess stack-trace we found thread stucked at sun.reflect.Reflection.getCallerClass as below depicted, can anyone explain this? Our plugins using thrift-RPC introduced slf4j-api-xxx.jar
java.lang.Thread.State: RUNNABLE
at sun.reflect.Reflection.getCallerClass(Native Method)
at java.lang.Class.getClassLoader(Class.java:683)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
at org.elasticsearch.common.logging.ESLoggerFactory.getLogger(ESLoggerFactory.java:49)
at org.elasticsearch.common.logging.ESLoggerFactory.getLogger(ESLoggerFactory.java:57)
at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:101)
at org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData.<init>(DocValuesIndexFieldData.java:55)
at org.elasticsearch.index.fielddata.plain.SortedNumericDVIndexFieldData.<init>(SortedNumericDVIndexFieldData.java:58)
at org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData$Builder.build(DocValuesIndexFieldData.java:99)
at org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:129)
at org.elasticsearch.search.fetch.subphase.DocValueFieldsFetchSubPhase.hitExecute(DocValueFieldsFetchSubPhase.java:64)
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:162)
at com.baidu.elasticsearch.scan.ScanService.executeFetchPhase(ScanService.java:313)
at com.baidu.elasticsearch.scan.ScanService.getNext(ScanService.java:271)
Or
java.lang.Thread.State: RUNNABLE
at sun.reflect.Reflection.getCallerClass(Native Method)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.util.ReflectionUtil.getCallerClass(ReflectionUtil.java:129)
at org.apache.logging.log4j.util.ReflectionUtil.getCallerClass(ReflectionUtil.java:212)
at org.apache.logging.log4j.util.ReflectionUtil.getCallerClass(ReflectionUtil.java:203)
at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:72)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:227)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
at org.elasticsearch.common.logging.DeprecationLogger.<init>(DeprecationLogger.java:117)
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.<init>(AbstractXContentParser.java:57)
at org.elasticsearch.common.xcontent.json.JsonXContentParser.<init>(JsonXContentParser.java:44)
at org.elasticsearch.common.xcontent.json.JsonXContent.createParser(JsonXContent.java:108)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:140)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:114)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:92)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMapAndType(SourceLookup.java:89)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMap(SourceLookup.java:93)
at org.elasticsearch.search.SearchHit.getSourceAsMap(SearchHit.java:344)