Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bbolt CLI surgery commands #370

Closed
ptabor opened this issue Dec 30, 2022 · 6 comments
Closed

bbolt CLI surgery commands #370

ptabor opened this issue Dec 30, 2022 · 6 comments

Comments

@ptabor
Copy link
Contributor

ptabor commented Dec 30, 2022

After #361 is submitted it would be good to expose additional bbolt file 'surgery' commands:

  1. bbolt surgery revert-meta-page. db.inputFile db.outputFile

  2. bbolt surgery copy-page db.inputFile db.outputFile 17 14

3 bbolt surgery write-empty-branch-page db.inputFile db.outputFile 17

  • should execute a new command that overwites given page with an empty node.

Follow up to: #335

@ahrtr
Copy link
Member

ahrtr commented Jan 16, 2023

bbolt surgery write-empty-branch-page db.inputFile db.outputFile 17

* should execute a new command that overwites given page with an empty node.

Why don't we support write-empty-page so that we can overwrite whatever page (branch or leaf)?

@ahrtr ahrtr self-assigned this Jan 16, 2023
@ahrtr
Copy link
Member

ahrtr commented Jan 16, 2023

Instead of write-empty-page to get rid of the whole page and all its children, it would make more sense to add the command something like clear-page-elements to get rid of some elements in the given page and all the children the removed elements link to.

It's exactly how previously I fixed a corrupted db file. FYI issues/13406/main.go

@ahrtr
Copy link
Member

ahrtr commented Jan 29, 2023

Note, the following commands will be included in v1.3.7,

  • bbolt surgery revert-meta-page
  • bbolt surgery copy-page
  • bbolt surgery clear-page

All other changes will be included in next release, hopefully 1.4.0.

@ahrtr
Copy link
Member

ahrtr commented Mar 30, 2023

TODO: add bbolt surgery freelist rebuild/check ... commands.
see #443 (comment)

@ahrtr
Copy link
Member

ahrtr commented Apr 20, 2023

all surgery related commands are done.

@ahrtr ahrtr closed this as completed Apr 20, 2023
@ahrtr ahrtr reopened this Jul 24, 2023
@ahrtr ahrtr added this to the v1.3.8 milestone Jul 26, 2023
@ahrtr ahrtr modified the milestones: v1.3.8, v1.4.0 Aug 11, 2023
@ahrtr
Copy link
Member

ahrtr commented Oct 23, 2023

Done.

@ahrtr ahrtr closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants