weiwei121723 commented on code in PR #2161:
URL: https://github.com/apache/kylin/pull/2161#discussion_r1429932159


##########
src/common-server/src/main/java/org/apache/kylin/rest/controller/NEpochController.java:
##########
@@ -48,7 +51,11 @@ public class NEpochController extends NBasicController {
     @PostMapping(value = "", produces = { HTTP_VND_APACHE_KYLIN_JSON, 
HTTP_VND_APACHE_KYLIN_V4_PUBLIC_JSON })
     @ResponseBody
     public EnvelopeResponse<String> updateEpochOwner(@RequestBody EpochRequest 
epochRequest) {
-        checkCollectionRequiredArg("projects", epochRequest.getProjects());
+        if (Objects.isNull(epochRequest.getProjects())) {
+            // Avoid following NPEs.
+            epochRequest.setProjects(new ArrayList<>(0));
+        }
+        // Empty projects has specified meanings: all projects do change epoch.

Review Comment:
   已经有一个updateAllEpochOwner接口了,这个接口默认更新所有的epoch,有点过重了



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

Reply via email to