Skip to content

[Observability] No progress reporting for large restore operations — users think process is hung #72

Description

@anshul23102

Executive Summary

When restoring large files with millions of blocks, users have no visibility into progress. The operation appears frozen for hours.

Proposed Solution

use indicatif::{ProgressBar, ProgressStyle};

pub fn restore_vault_with_progress(vault: &Vault, target: &Path, total_blocks: u64) 
  -> Result<(), Box<dyn std::error::Error>> {
  
  let pb = ProgressBar::new(total_blocks);
  pb.set_style(ProgressStyle::default_bar()
    .template("{spinner:.green} [{elapsed_precise}] [{bar:40}] {pos}/{len} blocks")?
    .progress_chars("#>-"));
  
  for block_id in 0..total_blocks {
    let block = vault.get_block(block_id)?;
    std::fs::write(target.join(format!("block_{}", block_id)), block)?;
    pb.inc(1);
  }
  pb.finish_with_message("Restore complete");
  Ok(())
}

Checklist

  • I have searched existing issues and confirmed this is not a duplicate
  • I have read the CONTRIBUTING.md guidelines
  • I have provided clear steps to reproduce the issue
  • I have described expected vs. actual behavior clearly
  • This issue title is clear and specific
  • This repository has been verified as NSOC on https://www.nsoc.in/projects

@Rakshat28 Could you please /assign this issue to me? I would like to implement restore progress reporting under NSOC '26.

/assign

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions