-
Notifications
You must be signed in to change notification settings - Fork 648
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
Possible to save unclean object database to file during replay #946
Comments
Nice catch. |
@ryanRfox I want to claim this issue if possible please |
Yes, @cogutvalera I will assign you. Please provide an estimate and the Core Team will review it. |
@abitmore I added this to 201810 Feature Release because it is labeled a |
@ryanRfox my estimation for this issue is approximately about 2 hours |
@cogutvalera I'm surprised. I didn't think it can be done in 2 hours. Please describe how to fix, and analyse pros and cons. |
@abitmore maybe I'm wrong with my estimation, very wrong, please help me to estimate this issue more correctly enough if you can. My thoughts were that we can use something like next snippet of code after this line here https://github.com/bitshares/bitshares-core/blob/develop/programs/witness_node/main.cpp#L157
and here in the start of
Are my thoughts wrong ? Or is it a good direction or not so ? Thank you very much ! |
My idea is simple but maybe I am completely wrong with it. Still researching different possibilities. My idea: not to flush object database in event of exception, also need to add check if it was in reply mode or not, but I hope you understand my idea correctly. Thanks ! |
Thanks. Perhaps it's not as hard as I thought. I think we need to add a parameter to |
Wow, you are absolutely right about parameter in |
At the beginning I thought the same as @abitmore that this issue is much harder but later after some researches I was surprised too that it is much easier than I have been expected. |
@cogutvalera and @abitmore did you two come to consensus about the estimate (2 hours)? I've assigned to @cogutvalera now and leave the estimate as TBD until I hear from you both. Thanks |
@ryanRfox depends on what's done. IMHO 2 hours is not sufficient. |
guys check please PR #1311 |
During replay, undo_db is disabled, that said, when there is an exception thrown, changes made to object database won't rewound, which means the in-memory object database would be unclean.
When caught the exception, the node will dump object database from memory to disk. That means the on-disk object database would be unclean.
On next (and future) startup, if does not specify
--replay-blockchain
, the on-disk object database would be considered clean and be loaded into memory directly.Related code:
bitshares-core/programs/witness_node/main.cpp
Lines 275 to 287 in 51e6c79
bitshares-core/libraries/app/application.cpp
Lines 1103 to 1109 in 51e6c79
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: