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

Expose levelDB object #20

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Expose levelDB object #20

merged 1 commit into from
Feb 9, 2022

Conversation

pdeziel
Copy link
Contributor

@pdeziel pdeziel commented Feb 8, 2022

This exposes the underlying levelDB object to the user to make it easier to do things like backups.

@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #20 (378c4dc) into main (b3f3099) will decrease coverage by 0.04%.
The diff coverage is 50.00%.

❗ Current head 378c4dc differs from pull request most recent head 36ebb59. Consider uploading reports for the commit 36ebb59 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
- Coverage   55.81%   55.77%   -0.05%     
==========================================
  Files          10       10              
  Lines         550      554       +4     
==========================================
+ Hits          307      309       +2     
- Misses        198      200       +2     
  Partials       45       45              
Impacted Files Coverage Δ
engines/leveldb/leveldb.go 84.70% <0.00%> (-2.05%) ⬇️
honu.go 46.98% <100.00%> (+0.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3f3099...36ebb59. Read the comment docs.

@pdeziel pdeziel requested a review from bbengfort February 8, 2022 21:22
Copy link
Contributor

@bbengfort bbengfort left a comment

Choose a reason for hiding this comment

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

Looks good - I'll go ahead and merge and tag this so we can work on the backup manager in trtl; use go get -u github.com/rotationalio/honu@v0.2.8 to update to the current version.

For the undelete test, is the test failing matching the total keys count or is it some other test that was removed? I can take a look at it right now before bumping the version if that would help.

Comment on lines +170 to +171
engine, ok := db.Engine().(*leveldb.LevelDBEngine)
require.True(t, ok)
Copy link
Contributor

Choose a reason for hiding this comment

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

good type assertion!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you add a totalKeys++ to line 110 after the undelete you'll see the count mismatch.

@bbengfort bbengfort merged commit 59182a3 into main Feb 9, 2022
@bbengfort bbengfort deleted the return-engine branch February 9, 2022 12:39
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.

2 participants