Files
qdrant/lib/edge/python/src/utils.rs
T
Andrey Vasnetsov 906136346b restore snapshot in edge (#7852)
* Restore shard snapshot in Edge python bindings

* method to request snapshot manifest

* move snapshot manifest into Shard crate

* move shapshot manifest reading

* implement inplace update of the shard from snapshot

* fmt

* move shapshot-related functions again, into a dedicated struct

* fmt

* implement partial snapshot recovery for edge

* test for partial recoverying snapshot on edge
2026-02-09 22:36:13 +01:00

17 lines
393 B
Rust

use edge::Shard;
use segment::common::operation_error::OperationError;
use crate::{PyError, PyShard};
impl PyShard {
pub fn get_shard(&self) -> Result<&Shard, PyError> {
if let Some(shard) = &self.0 {
Ok(shard)
} else {
Err(PyError::from(OperationError::service_error(
"Shard is not initialized",
)))
}
}
}