-
Notifications
You must be signed in to change notification settings - Fork 459
Log more information about why compaction can not be planned #5532
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue with adding this method in a bugfix release? This would cause a build and runtime issue for any user that has their own CompactionPlanner implementation written against 2.1.4 and deploys it to a 2.1.3 instance, right? I'm wondering if this should be a
default
method that returnsnull
(not throws a UnsupportedOperationException).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning null would not be the best long term behavior (like the behavior we would want in 4.0). I was worried about adding this, but chose this approach because a few lines up there is the following and I just followed its precedent.
Whatever we do here, we probably need to do that consistently for all changes like this in 2.1.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for a 3.1 and a 4.0 we could remove the default method that returns null and just leave the method declaration in the interface. I think this change (and the other that you pointed out) potentially make a 2.1.4 api implementation not backwards compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think leaving these methods unimplemented w/o a default impl is best because that is the most straightforward way for a developer to know they need to do something if they implemented this interface. If a user were to implement this interface it would most likely be for testing and it would be easy for a developer to deai with test code not implementing a method. If we want to add default method I think it would be best to throw unsupported op exception instead of returning null. Returning null has the potential to cause runtime exceptions that are far from the method that returned null, making it harder to track down. The unsupported op exception makes the issue easy to track down. We have returned unsupported op exception in other places in the past and that turned out to be bad, but that was a bit different. In this case its a completely new method that no 2.1.3 code could have called, we are not all of a sudden throwing that exception for an existing method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that leaving the methods unimplemented is better since a user would run into a compile time error vs a runtime error in a production deployment.