hello-stephen commented on code in PR #71425:
URL: https://github.com/apache/doris/pull/71425#discussion_r4797517555


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -3381,15 +3381,18 @@ public void setSkewRewriteAggBucketNum(int num) {
     @VarAttrDef.VarAttr(name = FILE_CACHE_QUERY_LIMIT_PERCENT, needForward = 
true,
             checker = "checkFileCacheQueryLimitPercent",
             description = "Limit the FILE_CACHE percent that a single query of 
a user can use "
-                    + "(set by user via session variables, range: 1 to 
Config.file_cache_query_limit_max_percent).")
+                    + "(-1 follows Config.file_cache_query_limit_max_percent; 
otherwise range: 1 to "
+                    + "Config.file_cache_query_limit_max_percent).")
     public int fileCacheQueryLimitPercent = -1;
 
     public void checkFileCacheQueryLimitPercent(String 
fileCacheQueryLimitPercentStr) {
         int fileCacheQueryLimitPct = 
Integer.valueOf(fileCacheQueryLimitPercentStr);
-        if (fileCacheQueryLimitPct < 1 || fileCacheQueryLimitPct > 
Config.file_cache_query_limit_max_percent) {
+        if (fileCacheQueryLimitPct != -1

Review Comment:
   [P2] Preserve global cache-limit resets during mixed-FE upgrades
   
   If the global value is `20` when a patched leader handles an administrator's 
`SET GLOBAL file_cache_query_limit_percent = -1`, it journals the raw `-1`. A 
follower on the base revision rejects that value in 
`VariableMgr.replayGlobalVariableV2` and advances its replay position, so new 
sessions on that follower still inherit `20`. When the reset is submitted 
through that follower, its post-forward callback can also report an error after 
the leader commits the change. Please keep the session reset available and gate 
global sentinel writes until all FEs can apply them.



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