Wrong selection of the latest snapshot
Goal
The clone was created using a snapshot of the "dblab_pool@snapshot_20211103165010" which "dataStateAt": "2021-11-03 16:50:10 UTC", but there is a pool with a more recent snapshot "dblab_pool_02@snapshot_20211103165508" with "dataStateAt": "2021-11-03 16:55:08 UTC".
ubuntu@dblab-tests:~$ dblab snapshot list
[
{
"id": "dblab_pool_02@snapshot_20211103165508",
"createdAt": "2021-11-03 16:57:06 UTC",
"dataStateAt": "2021-11-03 16:55:08 UTC",
"pool": "dblab_pool_02",
"numClones": 0,
"physicalSize": "0 B",
"logicalSize": "2.5 GiB"
},
{
"id": "dblab_pool@snapshot_20211103165010",
"createdAt": "2021-11-03 16:52:07 UTC",
"dataStateAt": "2021-11-03 16:50:10 UTC",
"pool": "dblab_pool",
"numClones": 0,
"physicalSize": "774 KiB",
"logicalSize": "2.7 GiB"
}
]
ubuntu@dblab-tests:~$
ubuntu@dblab-tests:~$ dblab clone create --username dblab_user_1 --password secret_password --id clone_01
{
"id": "clone_01",
"protected": false,
"deleteAt": "",
"createdAt": "2021-11-03 16:58:56 UTC",
"status": {
"code": "OK",
"message": "Clone is ready to accept Postgres connections."
},
"db": {
"connStr": "host=localhost port=6000 user=dblab_user_1 dbname=postgres",
"host": "localhost",
"port": "6000",
"username": "dblab_user_1",
"password": "",
"db_name": ""
},
"snapshot": {
"id": "dblab_pool@snapshot_20211103165010",
"createdAt": "2021-11-03 16:52:07 UTC",
"dataStateAt": "2021-11-03 16:50:10 UTC",
"pool": "dblab_pool",
"numClones": 1,
"physicalSize": "774 KiB",
"logicalSize": "2.7 GiB"
},
"metadata": {
"cloningTime": 1.815085971,
"maxIdleMinutes": 10,
"cloneDiffSize": "205 KiB",
"logicalSize": "2.7 GiB"
}
}
The original comment: !358 (comment 722619433)
TODO / How to implement
Fix the latest selection selection