Jibing-Li commented on code in PR #51192:
URL: https://github.com/apache/doris/pull/51192#discussion_r2109385052


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalRowCountCache.java:
##########
@@ -110,10 +111,16 @@ public long getCachedRowCount(long catalogId, long dbId, 
long tableId) {
         RowCountKey key = new RowCountKey(catalogId, dbId, tableId);
         try {
             CompletableFuture<Optional<Long>> f = rowCountCache.get(key);
-            if (f.isDone()) {
+            // Get row count synchronously by default.
+            if (ConnectContext.get() == null
+                    || 
ConnectContext.get().getSessionVariable().fetchHiveRowCountSynchronous) {
                 return f.get().orElse(TableIf.UNKNOWN_ROW_COUNT);
+            } else {
+                if (f.isDone()) {
+                    return f.get().orElse(TableIf.UNKNOWN_ROW_COUNT);
+                }
+                LOG.info("Row count for table {}.{}.{} is still processing.", 
catalogId, dbId, tableId);

Review Comment:
   I don't think we need to do this.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to