This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new ee2235a38b [fix](backup) fix show snapshot cauing mysql connection lost (#21520) ee2235a38b is described below commit ee2235a38bed7dbb49d207ae7b5a9e18dda6bb2b Author: Mingyu Chen <morning...@163.com> AuthorDate: Wed Jul 5 22:44:57 2023 +0800 [fix](backup) fix show snapshot cauing mysql connection lost (#21520) If this is no `info file` in repository, the mysql connection may lost when user executing `show snapshot on repo`, ``` 2023-07-05 09:22:48,689 WARN (mysql-nio-pool-0|199) [ReadListener.lambda$handleEvent$0():60] Exception happened in one session(org.apache.doris.qe.ConnectContext@730797c1). java.io.IOException: Error happened when receiving packet. at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:691) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_322] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_322] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322] ``` This is because there are some field missing in returned result set. --- fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java index 61df65ecc5..de5c475462 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java +++ b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java @@ -659,6 +659,10 @@ public class Repository implements Writable { info.add(snapshotName); info.add(Joiner.on("\n").join(tmp)); info.add("OK"); + } else { + info.add(snapshotName); + info.add(FeConstants.null_string); + info.add("ERROR: No info file found"); } } } else { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org