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

chore(storage): upgrade badger storage initialization #779

Merged
merged 1 commit into from
Jun 15, 2024
Merged

Conversation

appleboy
Copy link
Owner

  • Upgrade github.com/dgraph-io/badger from v3 to v4
  • Remove github.com/cespare/xxhash v1 and keep v2
  • Change badger.New function to accept dbPath instead of config
  • Replace config field with dbPath in Storage struct
  • Simplify mutex usage by embedding sync.RWMutex directly in Storage struct
  • Update test to initialize badger with an empty string instead of config
  • Increase loop iteration count in test from 10 to 100
  • Update test assertion to expect 100 instead of 10

- Upgrade `github.com/dgraph-io/badger` from v3 to v4
- Remove `github.com/cespare/xxhash` v1 and keep v2
- Change `badger.New` function to accept `dbPath` instead of `config`
- Replace `config` field with `dbPath` in `Storage` struct
- Simplify mutex usage by embedding `sync.RWMutex` directly in `Storage` struct
- Update test to initialize `badger` with an empty string instead of `config`
- Increase loop iteration count in test from 10 to 100
- Update test assertion to expect `100` instead of `10`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
@appleboy appleboy merged commit 527dd81 into master Jun 15, 2024
10 checks passed
@appleboy appleboy deleted the badger branch June 15, 2024 14:35
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.

None yet

1 participant