feat(storagenode): restore the status of a log stream replica by using the latest commit context #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This patch changes how to restore the status of a log stream replica after
#162. Previously, the log stream replica reads a sequence of all commit
contexts to decide whether it can work well after restoring. However, since the
replica will maintain only the latest commit context, we should change the
previous approach to reloading a replica.
The log stream replica reads the latest commit context and boundary of log
entries and checks if it recovers its status. The replica runs if the recovery
completes. However, if there is something wrong, its reportCommitBase will be
invalid. In that case, the metadata repository will ignore its report, and
cloning the log entries from the other replica will occur.
Which issue(s) this PR resolves
Updates #125
Anything else