Skip to content

[r3.4] [1/3] cmd: improve commitment snapshot removal output (cherry-pick #20202)#21116

Merged
AskAlexSharov merged 3 commits into
release/3.4from
cherry-pick-20202-to-release-3.4
May 12, 2026
Merged

[r3.4] [1/3] cmd: improve commitment snapshot removal output (cherry-pick #20202)#21116
AskAlexSharov merged 3 commits into
release/3.4from
cherry-pick-20202-to-release-3.4

Conversation

@awskii

@awskii awskii commented May 11, 2026

Copy link
Copy Markdown
Member

Cherry-pick of #20202 to release/3.4.

## Summary

Improves output formatting for the commitment snapshot removal command:

- **Path once**: prints snapshot directory path once at top, then
filenames only
- **Unwindable status**: replaces `found state key with kvi` →
`Unwindable` and `found state key using bt` → `Not Unwindable (*)`
- **Newline before removal list** for readability
- **File sizes**: shows per-file size and total using `common.ByteCount`

## Before
```
found state key with kvi /path/to/snapshots/domain/v2.0-commitment.112-128.kv
found state key with kvi /path/to/snapshots/domain/v2.0-commitment.16-32.kv
REMOVE /path/to/snapshots/domain/v2.0-commitment.0-16.kv
...
```

## After
```
Snapshot dir: /path/to/snapshots/domain/
  v2.0-commitment.112-128.kv  Unwindable
  v2.0-commitment.16-32.kv    Unwindable

  REMOVE v2.0-commitment.0-16.kv     (1.2 GiB)
  REMOVE v2.0-commitment.112-128.kv  (1.1 GiB)
  Total: 9.4 GiB
```

Co-authored-by: shuo <shuo@erigon.dev>

Co-authored-by: shuo <shuo@erigon.dev>
(cherry picked from commit c286488)
awskii and others added 2 commits May 11, 2026 23:12
…ick #20525) (#21117)

Cherry-pick of #20525 to release/3.4.

Stacked on #21116 (cherry-pick of #20202). Merge order: 1/3 first, then
this. Change base to `release/3.4` after 1/3 lands.
…cherry-pick #20899) (#21118)

Cherry-pick of #20899 to release/3.4.

Stacked on #21117 (cherry-pick of #20525). Merge order: 1/3 (#21116) →
2/3 (#21117) → this. Change base to `release/3.4` after 2/3 lands.

---------

Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
@AskAlexSharov AskAlexSharov merged commit 75320dc into release/3.4 May 12, 2026
23 checks passed
@AskAlexSharov AskAlexSharov deleted the cherry-pick-20202-to-release-3.4 branch May 12, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants