-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Avoid initializing all versions' state in initStateStore method #5
Conversation
@LiShuMing If the last version of the snapshot is corrupted we always can try to restore state from earlier versions. Applying your changes we will lose this opportunity. There are test cases for this and in this PR they failed. The current implementation allows load only the last version and doesn't iterate by all versions in the case when the last version is fine. Also, you can take a look at the |
Thanks for you replies.
Here I may change original policy that cannot restore state from earlier versions. I will change my codes later.
This is an example to point that |
Oh, big thanks for the example, looks a bit strange, but we can just fix using |
Yep, you are right. I've tried codes below:
Then I will update my PR, can you review it again? |
@LiShuMing, @chermenin
This statement is incorrect. As the print statements are inside the
This results in the following, which proves that
Now coming to the point of loading all snapshots, yes the current implementation is sub optimal. I'd like to suggest a simpler and clearer approach. For the current code,
we can change it to something like,
Supporting arguments for this implementation,
Note, that What are your thoughts? |
@chitralverma As I think, using the |
@chermenin I believe we can merge this pull request and also raise an issue to revisit the I'll create an issue right away. |
So can this patch be merged into master? |
@LiShuMing yep, it's merged 😃 |
…nspection to release/RE19A * commit '2e329865360204bf428d216c1f1ac418b7310d04': change rocksdb log level to ERROR, bump version bump version add function for external state inspection, log index file content for debugging consistency problems with S3 fix handling for directory entries on decompress
Codes below iterates all versions to
initStateStore
which wastes a lot of time.Only the nearest version is needed.