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

Added flag -page-Id for check sub-command of bbolt CLI. #698

Closed
wants to merge 2 commits into from

Conversation

ishan16696
Copy link
Contributor

Part of this feature: #580

tx_check.go Outdated Show resolved Hide resolved
defer requireDBNoChange(t, dbData(t, db.Path()), db.Path())

m := NewMain()
err := m.Run("check", "-page-Id", "0", db.Path())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter "0" doesn't make sense, as the default value is 0, it has the same behaviour as no parameter being provided at all. We should populate some sample data, and find out a branch page ID and at least a leaf page ID, and run bbolt check on the page IDs.

@ahrtr
Copy link
Member

ahrtr commented Feb 25, 2024

I think we can directly migrate the bbolt check command to cobra style command directly. It doesn't break any existing user experience, so it's fine to migrate it firstly, afterwards, we can continue to add option --pageId.

Refer to: #472

@ishan16696 ishan16696 force-pushed the add/PageIDFlag branch 2 times, most recently from bba77f5 to ea00d4f Compare February 25, 2024 18:05
@ahrtr
Copy link
Member

ahrtr commented Feb 29, 2024

@ishan16696 Are you still working on this PR? Please resolve the two comments above. Please let me know if you need others' help.

@ishan16696
Copy link
Contributor Author

Are you still working on this PR? Please resolve the two comments above. Please let me know if you need others' help.

I will only be able to work on this PR during this weekend.

@ishan16696
Copy link
Contributor Author

I think we can directly migrate the bbolt check command to cobra style command directly.

I will open a separate PR for this. Hence, closing this PR.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants