qdrant / landing_page

Landing page for qdrant.tech
18 stars 75 forks source link

Recovering data from snapshot with error message #720

Open zpfhyj opened 7 months ago

zpfhyj commented 7 months ago

image

The qdrant cluster service started by three Docker containers uses the latest version of Docker image

I refer to official documents [https://qdrant.tech/documentation/concepts/snapshots/?q=snapshot] A snapshot was created using the command provided by qdrant, but an error message will be generated when restoring the snapshot, as shown in the figure.

generall commented 7 months ago

Hey @zpfhyj, can you please provide a log of your actions to make sure that nothing is missing from the instructuons?

zpfhyj commented 7 months ago

Hey @zpfhyj, can you please provide a log of your actions to make sure that nothing is missing from the instructuons?

I created a qdrant cluster using the following command. First command: docker run -itd -p 6333:6333 -p 6334:6334 -p 6335:6335 -e QDRANTCLUSTERENABLED=true -v /data/qdrant_data:/qdrant/storage -v /data/config1.yaml:/qdrant/config/production.yaml qdrant/qdrant ./qdrant --uri 'http://172.30.1.245:6335'

Second command: docker run -itd -p 7333:7333 -p 7334:7334 -p 7335:7335 -e QDRANTCLUSTERENABLED=true -v /data/qdrant_data2:/qdrant/storage -v /data/config2.yaml:/qdrant/config/production.yaml qdrant/qdrant ./qdrant --bootstrap 'http://172.30.1.245:6335'

third command: docker run -itd -p 8333:8333 -p 8334:8334 -p 8335:8335 -e QDRANTCLUSTERENABLED=true -v /data/qdrant_data3:/qdrant/storage -v /data/config3.yaml:/qdrant/config/production.yaml qdrant/qdrant ./qdrant --bootstrap 'http://172.30.1.245:6335'

After the cluster creation is completed, use curl http://172.30.1.245:6333/cluster It is normal to view the cluster status in this way.

Then, I accessed it in my browser http://172.30.1.245:6333/dashboard ,Create collections through console ,and insert some data。

Then, I use the snapshot command to create a snapshot.
First command: curl -X POST http://172.30.1.245:6333/collections/test/snapshots Second command: curl -X POST http://172.30.1.245:7333/collections/test/snapshots Third command: curl -X POST http://172.30.1.245:8333/collections/test/snapshots

After the creation is completed, retrieve the snapshot and the snapshot status is normal. I use console to delete some data from collections. Then use the following command to restore the snapshot.

curl -X PUT /collections/test/snapshots/recover { "location": "http://172.30.1.245:6333/collections/test/snapshots/test-1663519886492901-2024-03-14-10-11-49.snapshot", "priority": "snapshot" }

Command execution result output

{"result": true, "status": "ok", "time": 0.033578903}

However, the data was not recovered when viewed through the dashboard, and there are the following errors in the logs:

2024-03-14T10:31:20.103649Z INFO actix_web::middleware::logger: 172.30.1.245 "POST /collections/test/snapshots/upload?priority=snapshot HTTP/1.1" 200 48 "-" "curl/7.29.0" 1.496394
2024-03-14T10:31:20.151846Z WARN storage::content_manager::consensus_manager: Failed to apply collection meta operation entry with user error: Wrong input: Replica 8238391379467480 of shard 1 has state Some(Active), but expected Some(Initializing)
2024-03-14T10:31:20.201606Z WARN storage::content_manager::consensus_manager: Failed to apply collection meta operation entry with user error: Wrong input: Cannot deactivate the last active replica 1663519886492901 of shard 2