We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b03db2d commit 05d6e4bCopy full SHA for 05d6e4b
libsql-wal/src/storage/compaction/mod.rs
@@ -403,6 +403,13 @@ pub struct AnalyzedSegments {
403
impl AnalyzedSegments {
404
/// returns a list of keys that covers frame_no 1 to last in the shortest amount of segments
405
pub fn shortest_restore_path(&self) -> SegmentSet {
406
+ if self.graph.node_count() == 0 {
407
+ return SegmentSet {
408
+ namespace: self.namespace.clone(),
409
+ segments: Vec::new(),
410
+ };
411
+ }
412
+
413
let path = petgraph::algo::astar(
414
&self.graph,
415
1,
0 commit comments