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

feat: sync pebble db from bsc #51

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

will-2012
Copy link
Contributor

@will-2012 will-2012 commented Jan 22, 2024

Description

Cherry-pick pebble-related pr from bsc.

bnb-chain/bsc#1979
bnb-chain/bsc#2072
bnb-chain/bsc#2120

Rationale

N/A.

Example

N/A.

Changes

Notable changes:

  • Ethdb: pebble-related.

@will-2012 will-2012 changed the title sync pebble db from bsc chore: sync pebble db from bsc Jan 22, 2024
@will-2012 will-2012 changed the title chore: sync pebble db from bsc feat: sync pebble db from bsc Jan 22, 2024
l.FilterType = pebble.TableFilter
if i > 0 {
l.TargetFileSize = opt.Levels[i-1].TargetFileSize * 2
}
Copy link
Contributor

@andyzhang2023 andyzhang2023 Jan 23, 2024

Choose a reason for hiding this comment

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

it it expected to be anelse branch here? to initial TargetFilesSize of levels[0] ?

if i > 0 {
    l.TargetFileSize = opt.Levels[i-1].TargetFileSize * 2
} else {
    l.TargetFileSize = xxx
}

Copy link
Contributor Author

@will-2012 will-2012 Jan 23, 2024

Choose a reason for hiding this comment

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

If TargetFileSize == 0, will be set default TargetFileSize = 2MB in EnsureDefaults func~

Copy link

@RenRick RenRick left a comment

Choose a reason for hiding this comment

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

LGTM

@owen-reorg owen-reorg merged commit 4c21c90 into bnb-chain:develop Jan 29, 2024
1 check passed
andyzhang2023 pushed a commit to andyzhang2023/op-geth that referenced this pull request Mar 4, 2024
Co-authored-by: wayen <2229306838@qq.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.

6 participants