morhidi commented on code in PR #225:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/225#discussion_r876878780
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/SavepointObserver.java:
##########
@@ -106,36 +117,36 @@ private Optional<String>
observeTriggeredSavepointProgress(
LOG.debug("Savepoint not in progress");
return Optional.empty();
}
- LOG.info("Observing savepoint status");
- SavepointFetchResult savepointFetchResult;
- try {
- savepointFetchResult =
- flinkService.fetchSavepointInfo(
- currentSavepointInfo.getTriggerId(), jobID,
deployedConfig);
- } catch (Exception e) {
- LOG.error("Exception while fetching savepoint info", e);
- return Optional.empty();
- }
-
- if (!savepointFetchResult.isTriggered()) {
- String error = savepointFetchResult.getError();
- if (error != null
- || SavepointUtils.gracePeriodEnded(
- configManager.getOperatorConfiguration(),
currentSavepointInfo)) {
- String errorMsg = error != null ? error : "Savepoint status
unknown";
- LOG.error(errorMsg);
+ LOG.info("Observing savepoint status.");
+ SavepointFetchResult savepointFetchResult =
+ flinkService.fetchSavepointInfo(
+ currentSavepointInfo.getTriggerId(), jobID,
deployedConfig);
+
+ if (savepointFetchResult.isPending()) {
+ if (SavepointUtils.gracePeriodEnded(
+ configManager.getOperatorConfiguration(),
currentSavepointInfo)) {
+ String errorMsg =
+ "Savepoint triggering timed out after "
+ + configManager
+ .getOperatorConfiguration()
+ .getSavepointTriggerGracePeriod();
currentSavepointInfo.resetTrigger();
+ LOG.error(errorMsg);
return Optional.of(errorMsg);
+ } else {
+ LOG.info("Savepoint operation not running yet, waiting within
grace period...");
Review Comment:
fixed
--
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]