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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -1017,6 +1019,9 @@ public void setCboNetWeight(double cboNetWeight) {
     )
     public boolean ignoreColumnWithComplexType = false;
 
+    @VariableMgr.VarAttr(name = ENABLE_STRONG_CONSISTENCY)

Review Comment:
   add `description` field to add both Chinese and English document. See 
`enableFileCache` for example



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -783,6 +784,14 @@ public void executeByLegacy(TUniqueId queryId) throws 
Exception {
         }
     }
 
+    private void syncJournalIfNeeded() throws Exception {
+        final Env env = context.getEnv();
+        if (env.isMaster() || 
!context.getSessionVariable().enableStrongConsistencyRead) {
+            return;
+        }
+        new MasterOpExecutor(context).execute();

Review Comment:
   Not a good design to just call `execute()` here. It is confusing and unclear.
   Better use a explicit method name to tell people what you are doing, eg: 
   `new MasterOpExecutor(context).syncJournal();`



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -783,6 +784,14 @@ public void executeByLegacy(TUniqueId queryId) throws 
Exception {
         }
     }
 
+    private void syncJournalIfNeeded() throws Exception {
+        final Env env = context.getEnv();
+        if (env.isMaster() || 
!context.getSessionVariable().enableStrongConsistencyRead) {
+            return;
+        }
+        new MasterOpExecutor(context).execute();

Review Comment:
   And for `SyncJournalOnly` request, I think it is unnecessary to build that 
much parameters in `buildForwardParams()` method. It should be a very light 
operation.



##########
docs/en/docs/admin-manual/config/fe-config.md:
##########
@@ -1006,6 +1006,15 @@ This variable is a session variable, and the session 
level takes effect.
 - Type: boolean
 - Description: **Only for the table of the AGG model**, when the variable is 
true, when the user query contains aggregate functions such as count(distinct 
c1), if the type of the c1 column itself is bitmap, count distnct will be 
rewritten It is bitmap_union_count(c1). When the type of the c1 column itself 
is hll, count distinct will be rewritten as hll_union_agg(c1) If the variable 
is false, no overwriting occurs..
 
+#### `enable_strong_consistency_read`

Review Comment:
   Wrong doc, this doc is for FE config, not for session variable.
   use this: `docs/zh-CN/docs/advanced/variables.md`



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