qidaye opened a new issue, #46780: URL: https://github.com/apache/doris/issues/46780
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version master ### What's Wrong? ``` 2025-01-10 15:29:41.884 INFO [suite-thread-1] (Suite.groovy:1387) - Execute tag: sql01, order_sql: select * from test_v1 where test2='text#1' 2025-01-10 15:29:41.925 ERROR [suite-thread-1] (ScriptContext.groovy:122) - Run test_es_query in /deploy/teamcity_agent/work/66e4423de996869f/case_output/doris/regression-test/suites/external_table_p0/es/test_es_query.groovy failed java.sql.SQLException: errCode = 2, detailMessage = Cannot invoke "org.apache.doris.datasource.es.EsMetaStateTracker.searchContext()" because "this.esMetaStateTracker" is null at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371) at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) at org.apache.doris.regression.util.JdbcUtils$_executeToStringList_closure3.doCall(JdbcUtils.groovy:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:279) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007) at groovy.lang.Closure.call(Closure.java:433) at groovy.lang.Closure.call(Closure.java:422) at org.codehaus.groovy.runtime.IOGroovyMethods.withCloseable(IOGroovyMethods.java:1649) at org.codehaus.groovy.runtime.dgm$1000.doMethodInvoke(Unknown Source) at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321) ``` fe.log ``` 2025-01-10 15:33:05,179 WARN (mysql-nio-pool-1|239) [StmtExecutor.executeByNereids():838] Nereids plan query failed: select * from test_v1 where test2='text#1' java.lang.RuntimeException: Cannot invoke "org.apache.doris.datasource.es.EsMetaStateTracker.searchContext()" because "this.esMetaStateTracker" is null at org.apache.doris.nereids.glue.translator.PhysicalPlanTranslator.translatePlan(PhysicalPlanTranslator.java:288) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.splitFragments(NereidsPlanner.java:439) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.distribute(NereidsPlanner.java:525) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.lambda$plan$0(NereidsPlanner.java:151) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.planWithLock(NereidsPlanner.java:227) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.plan(NereidsPlanner.java:147) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:832) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:610) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:573) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:563) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:347) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:250) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:209) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:237) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:417) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.doris.datasource.es.EsMetaStateTracker.searchContext()" because "this.esMetaStateTracker" is null at org.apache.doris.catalog.EsTable.fieldsContext(EsTable.java:158) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.datasource.es.source.EsScanNode.buildQuery(EsScanNode.java:362) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.datasource.es.source.EsScanNode.finalizeForNereids(EsScanNode.java:124) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.glue.translator.PhysicalPlanTranslator.translatePlan(PhysicalPlanTranslator.java:286) ~[doris-fe.jar:1.2-SNAPSHOT] ... 18 more 2025-01-10 15:33:05,179 WARN (mysql-nio-pool-1|239) [StmtExecutor.execute():625] Analyze failed. stmt[126, e55c507ec0ce4ccb-8f64f7e0f50f2f4e] org.apache.doris.common.NereidsException: errCode = 2, detailMessage = Cannot invoke "org.apache.doris.datasource.es.EsMetaStateTracker.searchContext()" because "this.esMetaStateTracker" is null at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:839) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:610) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:573) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:563) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:347) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:250) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:209) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:237) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:417) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] ``` ### What You Expected? case succeed. ### How to Reproduce? 1. Set up Doris cluster with 2 FE nodes. 2. Connect to the non-master node. 3. Run test_es_query.groovy 4. Failed. ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
