Skip to content

Commit

Permalink
[IOTDB-6351] Don't retry if operation has already succeed even if the…
Browse files Browse the repository at this point in the history
… DN is not running status
  • Loading branch information
JackieTien97 authored Sep 21, 2024
1 parent 0ea84ca commit a37b0ed
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,16 @@ public static TSStatus getStatus(TSStatusCode statusCode) {
}

public static boolean needRetry(TSStatus status) {
// succeed operation should never retry
if (status == null || status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
return false;
}
// always retry while node is in not running case
if (!COMMON_CONFIG.isRunning()) {
return true;
} else if (status == null) {
return false;
} else {
return needRetryHelper(status);
}
return needRetryHelper(status);
}

public static boolean needRetryHelper(TSStatus status) {
Expand Down

0 comments on commit a37b0ed

Please sign in to comment.