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

Only publish suspect ledgers if they have missing fragments #1834

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

ivankelly
Copy link
Contributor

This is a fix for a flake in
AuditorPeriodicCheckTest#testIndexCorruption. Auditor#checkAllLedgers()
runs a check on all ledgers, passing ProcessLostFragmentsCb as a
callback to LedgerChecker#checkLedger for each one.

LedgerChecker#checkLedger triggers the callback on completion,
regardless of whether there are fragments missing on not. Previously,
ProcessLostFragments was not checking if there were lost fragments
before publishing the ledger as suspected in zookeeper.

The flake triggered as there were always two ledgers that existed when
the check occurred, both would be reported as suspected, and it was
random which would be returned while polling for underreplicated
ledgers.

The fix is to check that something is actually underreplicated before
publishing.

This is a fix for a flake in
AuditorPeriodicCheckTest#testIndexCorruption. Auditor#checkAllLedgers()
runs a check on all ledgers, passing ProcessLostFragmentsCb as a
callback to LedgerChecker#checkLedger for each one.

LedgerChecker#checkLedger triggers the callback on completion,
regardless of whether there are fragments missing on not. Previously,
ProcessLostFragments was not checking if there were lost fragments
before publishing the ledger as suspected in zookeeper.

The flake triggered as there were always two ledgers that existed when
the check occurred, both would be reported as suspected, and it was
random which would be returned while polling for underreplicated
ledgers.

The fix is to check that something is actually underreplicated before
publishing.
@ivankelly ivankelly self-assigned this Nov 23, 2018
@eolivelli
Copy link
Contributor

Don't we need a specific test case?

@ivankelly
Copy link
Contributor Author

Don't we need a specific test case?

AuditorPeriodicCheckTest#testIndexCorruption is the test case

@ivankelly
Copy link
Contributor Author

rerun integration tests

2 similar comments
@ivankelly
Copy link
Contributor Author

rerun integration tests

@ivankelly
Copy link
Contributor Author

rerun integration tests

@sijie
Copy link
Member

sijie commented Nov 26, 2018

run integration tests

@jvrao
Copy link
Contributor

jvrao commented Nov 26, 2018

@reddycharan FYI

@ivankelly ivankelly added this to the 4.9.0 milestone Nov 28, 2018
@ivankelly ivankelly merged commit dfbfa8d into apache:master Nov 28, 2018
rdhabalia pushed a commit to rdhabalia/bookkeeper that referenced this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants