-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: ADR-040: Implement DBConnection.Revert #10308
Conversation
This adds implementations for BadgerDB and MemDB; Rocks has the method merged already. Note - this commit |
Codecov Report
@@ Coverage Diff @@
## master #10308 +/- ##
==========================================
+ Coverage 64.15% 64.18% +0.02%
==========================================
Files 572 572
Lines 53983 53983
==========================================
+ Hits 34635 34651 +16
+ Misses 17373 17355 -18
- Partials 1975 1977 +2
|
does this coincide with #10281 |
@marbar3778 serendipity, I think. I wasn't aware of that issue, but it certainly seems like this could be used to implement that rollback. |
Adding closes statement for #10308 |
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.
utACK
db/badgerdb/db.go
Outdated
@@ -122,14 +127,17 @@ func readVersionsFile(path string) (*versionManager, error) { | |||
if err != nil { | |||
return nil, err | |||
} | |||
if version == 0 { // 0 maps to the latest TS |
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.
What's "TS"? Shall we change this to: "0 maps to the latest version"?
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.
Timestamp, which is how Badger refers to versions. I want to distinguish between our versions and the Badger timestamps they map to, but I can use the actual word
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.
yes, please, let's don't use TS, time or timestamp is better.
Implements the
DBConnection.Revert
method which reverts DB state to the last saved version. This will be need to implement atomic commits with the KV store for #9892 (supports ADR-040).Closes: #10308
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change