Skip to content

[r3.4] [2/3] seg rm-state: improve interactive menu display (cherry-pick #20525)#21117

Merged
awskii merged 1 commit into
cherry-pick-20202-to-release-3.4from
cherry-pick-20525-to-release-3.4
May 11, 2026
Merged

[r3.4] [2/3] seg rm-state: improve interactive menu display (cherry-pick #20525)#21117
awskii merged 1 commit into
cherry-pick-20202-to-release-3.4from
cherry-pick-20525-to-release-3.4

Conversation

@awskii

@awskii awskii commented May 11, 2026

Copy link
Copy Markdown
Member

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.

## Summary
- Show KEEP/REMOVE markers and file sizes on commitment files **before**
prompting (was shown after)
- Print `Datadir:` and `Step range:` header for context
- Pre-compute and display total file count and estimated deletion size
in prompt (`remove 38 files (~15.2GB)?`)
- Drop misleading `Total:` line that only summed commitment files

### Before
```
Snapshot dir: /erigon-data/hoodi-tmp/snapshots/domain

  v2.0-commitment.0-32.kv  Unwindable
  v2.0-commitment.32-48.kv  Unwindable
  v2.0-commitment.48-56.kv  Unwindable
  v2.0-commitment.56-60.kv  Unwindable

remove latest snapshot files (stepFrom>=56) and files ending at stepTo=60?
1) RemoveFile
4) Exit
 (pick number): 4
```

### After
```
Datadir: /erigon-data/hoodi-tmp
Step range: latest (stepFrom>=56)

  KEEP   v2.0-commitment.0-32.kv  (11.8GB)  Unwindable
  KEEP   v2.0-commitment.32-48.kv  (8.1GB)  Unwindable
  KEEP   v2.0-commitment.48-56.kv  (4.2GB)  Unwindable
  REMOVE v2.0-commitment.56-60.kv  (3.0GB)  Unwindable

remove 44 files (~9.7GB)?
1) RemoveFile
4) Exit
 (pick number):
```

(cherry picked from commit ef56c9b)
@awskii awskii merged commit bf2e03e into cherry-pick-20202-to-release-3.4 May 11, 2026
6 checks passed
@awskii awskii deleted the cherry-pick-20525-to-release-3.4 branch May 11, 2026 22:12
awskii added a commit that referenced this pull request May 11, 2026
…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>
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.

1 participant