Aitozi commented on code in PR #228:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/228#discussion_r877606619


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/StatusHelper.java:
##########
@@ -64,6 +67,14 @@ public <T extends CustomResource<?, STATUS>> void 
patchAndCacheStatus(T resource
         // in the meantime
         resource.getMetadata().setResourceVersion(null);
 
+        ObjectNode newStatus = objectMapper.convertValue(resource.getStatus(), 
ObjectNode.class);
+        ObjectNode previousStatus = statusCache.put(getKey(resource), 
newStatus);
+
+        if (previousStatus == null || newStatus.equals(previousStatus)) {

Review Comment:
   why here do not need to patch status when the previousStatus is null ?



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