Skip to content

sc remote compact: report bytes_deleted over-counts when the manifest moves mid-sweep; consolidation can merge one pack at a time for very compressible packs #263

Closed

Description

@tonibergholm-codento

Two P2 Codex notes on #261 left for a follow-up (no data-safety impact; compaction never deletes anything the current manifest chain names).

  1. When the manifest changes between pack-deletion batches the unprocessed packs are removed from packs_deleted but their sizes stay in bytes_deleted, so the report/CLI overstate reclaimed bytes. Subtract (or never add) bytes for packs kept after a manifest move; add a test.
  2. When each candidate pack is small on disk but individually exceeds the decoded-byte threshold (e.g. two unique highly compressible packs) the flush runs once per source pack, so created.len() is not smaller than the source count: skip merges whose spill parts do not reduce pack count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions