You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "CalvinKirs (via GitHub)" <gi...@apache.org> on 2023/04/19 08:45:27 UTC

[GitHub] [doris] CalvinKirs commented on a diff in pull request #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

CalvinKirs commented on code in PR #18777:
URL: https://github.com/apache/doris/pull/18777#discussion_r1171019256


##########
fe/fe-core/src/main/java/org/apache/doris/journal/bdbje/BDBJEJournal.java:
##########
@@ -375,10 +375,24 @@ private void reSetupBdbEnvironment(InsufficientLogException insufficientLogEx) {
         // ATTN: here we use `getServingEnv()`, because only serving catalog has
         // helper nodes.
         HostInfo helperNode = Env.getServingEnv().getHelperNode();
-        NetworkRestore restore = new NetworkRestore();
-        NetworkRestoreConfig config = new NetworkRestoreConfig();
-        config.setRetainLogFiles(false);
-        restore.execute(insufficientLogEx, config);
+
+        for (int i = 0; i < RETRY_TIME; i++) {
+            try {
+                NetworkRestore restore = new NetworkRestore();
+                NetworkRestoreConfig config = new NetworkRestoreConfig();
+                config.setRetainLogFiles(false);
+                restore.execute(insufficientLogEx, config);

Review Comment:
   I'm not familiar with the logic here, but it looks like you're retrying up to the maximum number of times, even if it was successful before then.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org