github-actions[bot] commented on code in PR #68141:
URL: https://github.com/apache/doris/pull/68141#discussion_r4041134673


##########
regression-test/suites/mtmv_p0/test_mtmv_cache_proc.groovy:
##########
@@ -0,0 +1,83 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_mtmv_cache_proc", "mtmv") {

Review Comment:
   [P2] Serialize this suite before changing the FE-wide cache cap. The suite 
is currently in only the `mtmv` group, so `RegressionTest.getGroupExecType()` 
assigns it to the normal parallel executor while lines 76-81 mutate 
process-wide FE configuration. The `finally` restores local failures but cannot 
isolate that temporary value from other normal suites, and 
`regression-test/README.md` explicitly requires config-mutating cases to use 
`nonConcurrent`. This is distinct from the earlier table/output/cleanup thread.
   
   ```suggestion
   suite("test_mtmv_cache_proc", "mtmv,nonConcurrent") {
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/MTMV.java:
##########
@@ -261,8 +257,9 @@ public boolean addTaskResult(AlterMTMV alterMTMV, boolean 
isReplay) {
             }
             try {
                 // The replay thread may not have initialized the catalog yet 
to avoid getting stuck due
-                // to connection issues such as S3, so it is directly set to 
null
-                if (!isReplay) {
+                // to connection issues such as S3, so it is directly set to 
null.
+                MTMVCacheManager cacheManager = 
Env.getCurrentEnv().getMtmvCacheManager();
+                if (!isReplay && cacheManager != null && 
cacheManager.isEnabled()) {

Review Comment:
   [P2] Treat the Env cache manager as an invariant instead of silently 
skipping this work. `mtmvCacheManager` is a `final` field assigned 
unconditionally by the sole `Env(boolean)` constructor, and every serving, 
cloud, checkpoint, and snapshot Env uses that path; the lazy lookup below 
already dereferences it without a null branch. The new `manager != null` 
fallbacks here, during publication/invalidation/drop, in `reloadConfig()`, and 
in the proc nodes therefore only mask incomplete mocks or broken construction, 
allowing a refresh or metadata change to complete without its required cache 
transition. Remove these no-op branches (and make tests provide the 
dependency). This is distinct from the earlier thread about a null cache 
*value* passed to `put()`.



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