store: update store/store.go StoreBlock to use batches#6018
store: update store/store.go StoreBlock to use batches#6018melekes merged 3 commits intotendermint:masterfrom
Conversation
store/store.go
Outdated
| panic(err) | ||
| } | ||
| // Save the block meta data | ||
| bs.tr.Append(func(dbm.DB) { |
There was a problem hiding this comment.
How does this work exactly? Is the DB argument from the function arg not used? How does the transactor relate to the underlying DB?
There was a problem hiding this comment.
Heres the PR for the transaction, https://github.com/tendermint/tm-db/pull/147/files within your guy's tm-db repo. The DB interface gets passed into transactor at L475. It utilizes DB inherent Set and Delete functionality when Transactor's Transact method is called.
There was a problem hiding this comment.
Currently this PR does not take into account dissimilarities between the DBs except vaguely (and incompletely) with
https://github.com/tendermint/tm-db/pull/147/files#diff-63ab601287b8b9c040760fe0bdd288f55b73f37cd7e4f1e519bea2bd43a18bbaR104.
Also, as of now, it only tackles the A aspect of ACID, atomicity.
There was a problem hiding this comment.
As you correctly noticed the passing of DB there was unnecessary. Only needed when running Transact so the Transactor's rollback func can utilize the DB's delete method. Next commit takes into account those changes.
777701d to
1c04a15
Compare
Codecov Report
@@ Coverage Diff @@
## master #6018 +/- ##
==========================================
- Coverage 60.81% 60.72% -0.10%
==========================================
Files 275 275
Lines 25340 25345 +5
==========================================
- Hits 15410 15390 -20
- Misses 8323 8346 +23
- Partials 1607 1609 +2
|
|
Is this still a WIP? |
no longer a WIP |
yes |
I’ll include the change log update in this PR shortly |
|
Eh should you guys update the change log? You are aware of a lot more necessary context. |
1c04a15 to
48fd101
Compare
* changes store/store.Storeblock to use batches rather then transactions
|
Updated with changelog. |
Co-authored-by: Tess Rinearson <tess.rinearson@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.