Skip to content

Commit

Permalink
[fix](backup) fix show snapshot cauing mysql connection lost (#21520)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
morningman authored Jul 5, 2023
1 parent b6a5afa commit c1e82ce
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,10 @@ private List<String> getSnapshotInfo(String snapshotName, String timestamp) {
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 {
Expand Down

0 comments on commit c1e82ce

Please sign in to comment.