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


##########
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:
   Do we need to consider concurrency issue?



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