This repository was archived by the owner on Apr 30, 2019. It is now read-only.
Repository navigation
ISSUE #870: ScanAndCompareGarbageCollector: harden against LM bugs - #22
Merged
Merged
Conversation
The idea behind this patch is to make it more likely that more than one LedgerManager bug would be required to erroneously believe a ledger to be deleted. 1) Remove the special handling for the completely empty LM. It's not really a common case nor is it much of an optimization even when it happens. 2) Add a config variable to cause the bookie to also check the LedgerManager.readLedgerMetadata path before actually removing a ledger. The implementations of readLedgerMetadata and the iterator are sufficiently different that it seems worth it to have the option of checking both to guard somewhat against a bug in either. (bug W-4292747) (bug W-3027938) Signed-off-by: Samuel Just <sjustsalesforce.com> Signed-off-by: Charan Reddy Guttapalem <cguttapalemsalesforce.com> Master Issue: apache#870 Author: Samuel Just <[email protected]> Reviewers: Ivan Kelly <[email protected]>, Arvin <None>, Sijie Guo <[email protected]> This closes apache#876 from athanatos/forupstream/issue-870, closes apache#870
agresch
approved these changes
Feb 7, 2018
agresch
left a comment
There was a problem hiding this comment.
Possible further tests for completeness, but I'm fine with it as is.
| * in this test scenario no created ledger is deleted, but ledgeriterator is screwed up and returns hasNext to be | ||
| * false and next to be null. So even in this case it is expected not to clean any ledger's data. | ||
| * | ||
| * This testcase is needed for validating fix of bug - W-4292747. |
There was a problem hiding this comment.
is this a valid tracking issue? How does one find it if so?
| validateLedgerRangeIterator(createdLedgers); | ||
|
|
||
| garbageCollector.gc(cleaner); | ||
| assertTrue("Should have cleaned nothing", cleaned.isEmpty()); |
There was a problem hiding this comment.
are there any tests with baseConf.setVerifyMetadataOnGc(true) that actually do any cleaning, just to validate it doesn't disable cleaning altogether?
| * This testcase is needed for validating fix of bug - W-4292747. | ||
| * | ||
| * ScanAndCompareGarbageCollector/GC should clean data of ledger only if both the LedgerManager.getLedgerRanges says | ||
| * that ledger is not existing and also ledgerManager.readLedgerMetadata fails with error |
There was a problem hiding this comment.
possibly add this test with baseConf.setVerifyMetadataOnGc(false) to validate existing functionality remains the same?
rdhabalia
pushed a commit
to rdhabalia/bookkeeper
that referenced
this pull request
Sep 25, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a port of apache#870