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
Store txns in DB #1735
Store txns in DB #1735
Conversation
can you verify if the |
cefa5e7
to
02b4ca0
Compare
Codecov Report
@@ Coverage Diff @@
## master #1735 +/- ##
==========================================
- Coverage 33.5% 32.36% -1.15%
==========================================
Files 270 270
Lines 33140 35055 +1915
==========================================
+ Hits 11105 11347 +242
- Misses 22035 23708 +1673
Continue to review full report at Codecov.
|
constants.xml
Outdated
@@ -262,6 +262,7 @@ | |||
<ENABLE_REPOPULATE>true</ENABLE_REPOPULATE> | |||
<REPOPULATE_STATE_IN_DS>0</REPOPULATE_STATE_IN_DS> | |||
<REPOPULATE_STATE_PER_N_DS>10</REPOPULATE_STATE_PER_N_DS> | |||
<NUM_STORE_TX_BODIES>5</NUM_STORE_TX_BODIES> |
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.
Change NUM_STORE_TX_BODIES to STORE_TX_BODIES_BLK_INTERVAL will be more understandable
src/libPersistence/BlockStorage.cpp
Outdated
RefreshDB(SHARD_STRUCTURE) & RefreshDB(STATE_DELTA) & | ||
RefreshDB(TEMP_STATE) & RefreshDB(DIAGNOSTIC_NODES) & | ||
RefreshDB(DIAGNOSTIC_COINBASE) & RefreshDB(STATE_ROOT) & | ||
RefreshDB(TX_BODY) & RefreshDB(MICROBLOCK) & |
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.
Should this be for TX_BODY_TMP
instead?
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, thanks
what would be the behavior if same processed txns are already commited to |
They would not affect each other, they are different level DBs. |
Ofcorse, but normally processed txns are removed from Tmp after moving to txBodies. In this case, we have it in both. Just curious if that breaks any logic later. If its ok, then all good. |
That is in case of lookup nodes, both of these were not being used in shard nodes before. |
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.
TxBodyTmp is used for cleaning the transactions processed in the latest DS epoch. It's not used for storage purpose. I suggest making another db instance for this specific usage.
11eb102
to
17d7839
Compare
17d7839
to
31f162b
Compare
@@ -641,9 +646,22 @@ void Node::ProcessTransactionWhenShardBackup() { | |||
|
|||
cv_TxnProcFinished.notify_all(); | |||
|
|||
PutTxnsInTempDataBase(t_processedTransactions); |
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.
We need to consider the fact that the txns in leveldb for backup may not be confirmed transaction.
Description
Shard and DS nodes store processed txns in LevelDB
Note:
processedTxnTmp
stores processed txns, however, these may not be confirmed.Backward Compatibility
Review Suggestion
Status
Implementation
Integration Test (Core Team)