w41ter opened a new issue, #26675: URL: https://github.com/apache/doris/issues/26675
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version Master ### What's Wrong? 1. create database and table: ``` create database if not exists db; drop table if exists db.cnt_table; create table if not exists db.cnt_table ( `id` LARGEINT NOT NULL, `count` LARGEINT SUM DEFAULT "0") AGGREGATE KEY(`id`) PARTITION BY RANGE(`id`) ( PARTITION p1 VALUES LESS THAN ("100"), PARTITION p2 VALUES LESS THAN ("200"), PARTITION p3 VALUES LESS THAN ("300"), PARTITION p4 VALUES LESS THAN ("400"), PARTITION p5 VALUES LESS THAN ("500"), PARTITION p6 VALUES LESS THAN ("600"), PARTITION p7 VALUES LESS THAN MAXVALUE ) DISTRIBUTED BY HASH(`id`) BUCKETS 2 PROPERTIES ( "replication_num" = "1" ); INSERT INTO db.cnt_table VALUES (1, 10), (2, 32), (3, 40), (4, 33), (4, 40); ``` 2. Backup to `__keep_on_local__`. ``` backup snapshot snapshot_name TO __keep_on_local__; ``` 3. Wait backup finish and restore it: ``` mysql> show backup; +-------+---------------+--------+----------+--------------------------------+---------------------+----------------------+---------------------+--------------+-----------------+-$--------+------------+--------+---------+ | JobId | SnapshotName | DbName | State | BackupObjs | CreateTime | SnapshotFinishedTime | UploadFinishedTime | FinishedTime | UnfinishedTasks | $rogress | TaskErrMsg | Status | Timeout | +-------+---------------+--------+----------+--------------------------------+---------------------+----------------------+---------------------+--------------+-----------------+-$--------+------------+--------+---------+ | 10289 | snapshot_name | db | FINISHED | [default_cluster:db.cnt_table] | 2023-11-09 17:06:42 | 2023-11-09 17:06:47 | 2023-11-09 17:06:53 | NULL | | | | [OK] | 86400 | +-------+---------------+--------+----------+--------------------------------+---------------------+----------------------+---------------------+--------------+-----------------+-$--------+------------+--------+---------+ 1 row in set (0.00 sec) mysql> restore snapshot snapshot_name FROM __keep_on_local__ -> ; ERROR 1105 (HY000): Unexpected exception: null ``` ### What You Expected? Restore success. ### How to Reproduce? In `BackupHandler::restore`, it should read job info via `BackupHandler::getSnapshot` if job info from stmt is null. ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
