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

[GitHub] [doris] SWJTU-ZhangLei opened a new pull request, #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

SWJTU-ZhangLei opened a new pull request, #18777:
URL: https://github.com/apache/doris/pull/18777

   * In reSetupBdbEnvironment() `restore.execute()` may throw NullPointerException, add retry for `restore.execute()`
   
   # Proposed changes
   
   Issue Number: close #18766 
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


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


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

Posted by "CalvinKirs (via GitHub)" <gi...@apache.org>.
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


[GitHub] [doris] SWJTU-ZhangLei commented on pull request #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

Posted by "SWJTU-ZhangLei (via GitHub)" <gi...@apache.org>.
SWJTU-ZhangLei commented on PR #18777:
URL: https://github.com/apache/doris/pull/18777#issuecomment-1514422587

   run buildall


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


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

Posted by "SWJTU-ZhangLei (via GitHub)" <gi...@apache.org>.
SWJTU-ZhangLei commented on code in PR #18777:
URL: https://github.com/apache/doris/pull/18777#discussion_r1171073433


##########
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.
   
   Thanks for your comment, i have added a `break` here.



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


[GitHub] [doris] github-actions[bot] commented on pull request #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18777:
URL: https://github.com/apache/doris/pull/18777#issuecomment-1517329894

   PR approved by at least one committer and no changes requested.


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


[GitHub] [doris] github-actions[bot] commented on pull request #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18777:
URL: https://github.com/apache/doris/pull/18777#issuecomment-1517329921

   PR approved by anyone and no changes requested.


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


[GitHub] [doris] hello-stephen commented on pull request #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #18777:
URL: https://github.com/apache/doris/pull/18777#issuecomment-1514656533

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.21 seconds
    stream load tsv:          425 seconds loaded 74807831229 Bytes, about 167 MB/s
    stream load json:         21 seconds loaded 2358488459 Bytes, about 107 MB/s
    stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230419123329_clickbench_pr_131098.html


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


[GitHub] [doris] yiguolei merged pull request #18777: [bug](bdbje) Add retry for reSetupBdbEnvironment() `restore.execute()`

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #18777:
URL: https://github.com/apache/doris/pull/18777


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