qidaye commented on code in PR #46781:
URL: https://github.com/apache/doris/pull/46781#discussion_r1910528399


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/EsTable.java:
##########
@@ -152,17 +152,26 @@ public EsTable(long id, String name, List<Column> schema, 
TableType tableType) {
     }
 
     public Map<String, String> fieldsContext() throws UserException {
+        makeSureEsMetaSynced();
         return esMetaStateTracker.searchContext().fetchFieldsContext();
     }
 
     public Map<String, String> docValueContext() throws UserException {
+        makeSureEsMetaSynced();
         return esMetaStateTracker.searchContext().docValueFieldsContext();
     }
 
     public List<String> needCompatDateFields() throws UserException {
+        makeSureEsMetaSynced();
         return esMetaStateTracker.searchContext().needCompatDateFields();
     }
 
+    private void makeSureEsMetaSynced() {
+        if (esMetaStateTracker == null) {

Review Comment:
   No need here. We only ensure that meta tracker is not null before the master 
demon process finished  and this method only be used in ES external table not 
ES catalog.



-- 
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]

Reply via email to