Skip to content
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

Recover ledger last idx from read-only ledger directory on recovery #1953

Merged
merged 6 commits into from
Nov 30, 2020

Conversation

jumaffre
Copy link
Contributor

Fix for the CI issues experienced on #1925

When recovering a ledger, we assumed that there was at least one ledger entry in the main ledger directory that could inform the ledger of the idx of the last entry (last_idx). However, it is possible that only a read-only ledger directory (--read-only-ledger-dir option to cchost) was passed in.

This PR fixes this issue by looking up all the ledger files in read-only ledger directories on start-up as well.

@jumaffre jumaffre requested a review from a team as a code owner November 27, 2020 16:13
@ghost
Copy link

ghost commented Nov 27, 2020

host_ledger_recovery@15931 aka 20201130.8 vs master ewma over 50 builds from 15365 to 15926
images

@jumaffre jumaffre changed the title Recovery ledger last idx from read-only ledger directory on recovery Recover ledger last idx from read-only ledger directory on recovery Nov 27, 2020
src/host/ledger.h Outdated Show resolved Hide resolved
jumaffre and others added 2 commits November 30, 2020 09:48
@achamayou achamayou merged commit 8c59f08 into microsoft:master Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants