Fixes handling of incorrect compaction configuration#3912
Merged
keith-turner merged 6 commits intoapache:2.1from Nov 9, 2023
Merged
Fixes handling of incorrect compaction configuration#3912keith-turner merged 6 commits intoapache:2.1from
keith-turner merged 6 commits intoapache:2.1from
Conversation
An incorrectly configured compaction service would fail to create. This would cause tables configured to use that service to spam the logs saying the serivce did not exists. Two changes were made to address this. First, when a compaction service fails to create its planner plugin it will log an error and fall back to using a new NullPlanner that does nothing. Once the configuration is fixed and the planner pluging can be created, it will replace the NullPlanner. Falling back to the NullPlanner allows the service to exists and do nothing, this way tables configured to use it do not complain. Second, when a table is configured to use a compaction service that does not exist repeated logging of this is suppressed per table. Also the existing code attempted to fall back to the default compaction service but this was not working. So the fallback code was removed and the log message was adjusted. Falling back could cause problems if its not what the user desires. Two ITs were added to test the above situations.
Contributor
|
I created #3913 concurrent to this and it addresses some of the problem, but differently. |
EdColeman
reviewed
Oct 31, 2023
| } | ||
|
|
||
| @Override | ||
| public CompactionPlan makePlan(PlanningParameters params) { |
Contributor
There was a problem hiding this comment.
How often is makePlan called? Would it be helpful if it emitted a message saying that it will do nothing? Maybe info or debug?
Contributor
Author
There was a problem hiding this comment.
Its called very often, it probably would be helpful if it periodically logged a reminder. I add something where it logs an error every 5 mins.
Contributor
Author
There was a problem hiding this comment.
@EdColeman added periodic error logging in 9955320
EdColeman
reviewed
Oct 31, 2023
server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java
Outdated
Show resolved
Hide resolved
…ctions/CompactionManager.java Co-authored-by: EdColeman <dev1@etcoleman.com>
EdColeman
approved these changes
Nov 8, 2023
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
An incorrectly configured compaction service would fail to create. This would cause tables configured to use that service to spam the logs saying the serivce did not exists. Two changes were made to address this.
First, when a compaction service fails to create its planner plugin it will log an error and fall back to using a new NullPlanner that does nothing. Once the configuration is fixed and the planner pluging can be created, it will replace the NullPlanner. Falling back to the NullPlanner allows the service to exists and do nothing, this way tables configured to use it do not complain.
Second, when a table is configured to use a compaction service that does not exist repeated logging of this is suppressed per table. Also the existing code attempted to fall back to the default compaction service but this was not working. So the fallback code was removed and the log message was adjusted. Falling back could cause problems if its not what the user desires.
Two ITs were added to test the above situations.