-
Notifications
You must be signed in to change notification settings - Fork 61
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
make pebble the clear choice #115
Closed
faddat
wants to merge
25
commits into
cometbft:main
from
faddat:faddat/make-pebble-overwhelmingly-fast
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6dc7c0c
add pebbledb
baabeetaa 5c90ecd
use latest pebble
faddat ef2dfbb
Merge remote-tracking branch 'origin/main' into pebble
faddat 90d9aff
added a ton of test rigor and fixed linting
faddat 019ce53
if always false we don't need the param
faddat e454ccb
let's go fast
faddat 0e42443
implement stats()
faddat adbd834
really we don't need that
faddat a574117
remove databases no one uses
faddat ecf08bc
boring certs thing
faddat 198e605
Osmo needed it and I have the tattoo
faddat 445087c
hope this does better in ci than on my mac...
faddat 137f7b1
demonstrate the issue with goleveldb
faddat bd93ba0
Merge branch 'faddat/remove-obvious-dead-dbs' into faddat/make-pebble…
faddat 75c7319
change some settings
faddat 1d8211f
make bemchmarks clearer output i hope
faddat 33d6190
lint
faddat 4dcf12a
fix all lints
faddat 03509f9
update pebble
faddat d3d7c79
update to main
faddat 400c03e
add experimental options and increase ram caches
faddat 81c42cc
enhance benchmarks. All results where goleveldb wins never happen in…
faddat 74b6b1b
make benchmarks as clear as possible
faddat 5b165c3
Revert "remove databases no one uses"
faddat 070a044
Merge remote-tracking branch 'origin/main' into faddat/make-pebble-ov…
faddat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# runs benchmarks on the pebble and goleveldb backends | ||
name: Benchmarks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21 | ||
- name: Run benchmarks | ||
run: go test -bench=. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,113 @@ | ||
linters: | ||
run: | ||
tests: true | ||
timeout: 10m | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- exportloopref | ||
- errcheck | ||
- gci | ||
- goconst | ||
- gocritic | ||
- gofumpt | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- lll | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- staticcheck | ||
- thelper | ||
- typecheck | ||
- stylecheck | ||
- revive | ||
- typecheck | ||
- tenv | ||
- unconvert | ||
# Prefer unparam over revive's unused param. It is more thorough in its checking. | ||
- unparam | ||
- unused | ||
- nolintlint | ||
- misspell | ||
|
||
issues: | ||
exclude-rules: | ||
- text: 'differs only by capitalization to method' | ||
linters: | ||
- revive | ||
- text: 'Use of weak random number generator' | ||
linters: | ||
- gosec | ||
- linters: | ||
- staticcheck | ||
text: "SA1019:" # silence errors on usage of deprecated funcs | ||
|
||
max-issues-per-linter: 10000 | ||
max-same-issues: 10000 | ||
|
||
linters-settings: | ||
errcheck: | ||
check-blank: true | ||
depguard: | ||
gci: | ||
sections: | ||
- standard # Standard section: captures all standard packages. | ||
- default # Default section: contains all imports that could not be matched to another section type. | ||
- blank # blank imports | ||
- dot # dot imports | ||
- prefix(github.com/cometbft/cometbft-db) | ||
custom-order: true | ||
revive: | ||
enable-all-rules: true | ||
# Do NOT whine about the following, full explanation found in: | ||
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#description-of-available-rules | ||
rules: | ||
main: | ||
files: | ||
- $all | ||
- "!$test" | ||
allow: | ||
- $gostd | ||
- github.com/cometbft | ||
- github.com/syndtr/goleveldb/leveldb | ||
- github.com/google/btree | ||
test: | ||
files: | ||
- $test | ||
allow: | ||
- $gostd | ||
- github.com/cometbft | ||
- github.com/syndtr/goleveldb/leveldb | ||
- github.com/stretchr/testify | ||
- name: use-any | ||
disabled: true | ||
- name: if-return | ||
disabled: true | ||
- name: max-public-structs | ||
disabled: true | ||
- name: cognitive-complexity | ||
disabled: true | ||
- name: argument-limit | ||
disabled: true | ||
- name: cyclomatic | ||
disabled: true | ||
- name: file-header | ||
disabled: true | ||
- name: function-length | ||
disabled: true | ||
- name: function-result-limit | ||
disabled: true | ||
- name: line-length-limit | ||
disabled: true | ||
- name: flag-parameter | ||
disabled: true | ||
- name: add-constant | ||
disabled: true | ||
- name: empty-lines | ||
disabled: true | ||
- name: banned-characters | ||
disabled: true | ||
- name: deep-exit | ||
disabled: true | ||
- name: confusing-results | ||
disabled: true | ||
- name: unused-parameter | ||
disabled: true | ||
- name: modifies-value-receiver | ||
disabled: true | ||
- name: early-return | ||
disabled: true | ||
- name: confusing-naming | ||
disabled: true | ||
- name: defer | ||
disabled: true | ||
# Disabled in favour of unparam. | ||
- name: unused-parameter | ||
disabled: true | ||
- name: unhandled-error | ||
disabled: false | ||
arguments: | ||
- 'fmt.Printf' | ||
- 'fmt.Print' | ||
- 'fmt.Println' | ||
- 'myFunction' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ import ( | |
"github.com/dgraph-io/badger/v2" | ||
) | ||
|
||
func init() { registerDBCreator(BadgerDBBackend, badgerDBCreator, true) } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a specific reason for changing this interface? |
||
func init() { registerDBCreator(BadgerDBBackend, badgerDBCreator) } | ||
|
||
func badgerDBCreator(dbName, dir string) (DB, error) { | ||
return NewBadgerDB(dbName, dir) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing this line?