mirror of
https://github.com/qdrant/qdrant.git
synced 2026-10-03 03:17:43 -05:00
* 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
17 lines
393 B
Rust
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",
|
|
)))
|
|
}
|
|
}
|
|
}
|