ferenc-csaky commented on code in PR #1217:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/1217#discussion_r4146657199
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/StatusRecorder.java:
##########
@@ -142,6 +128,31 @@ private STATUS convertPreviousStatus(CR resource,
ObjectNode previousStatusNode)
return (STATUS) objectMapper.convertValue(previousStatusNode,
statusClass);
}
+ private void replaceStatusWithRetries(CR resource, STATUS prevStatus,
KubernetesClient client)
+ throws JsonProcessingException, InterruptedException {
+ // We retry the status update to avoid some intermittent connectivity
errors
+ for (int attempt = 1; true; attempt++) {
Review Comment:
nit: I guess the use of `for` instead of `while` is to spare some lines, so
if we wanna max out that aspect we can also omit `true`:
```java
for (int attempt = 1; ; attempt++) { ... }
```
Feel free to leave it as is, just caught my eye. ;)
--
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]