Skip to content

Fixes handling of incorrect compaction configuration#3912

Merged
keith-turner merged 6 commits intoapache:2.1from
keith-turner:accumulo-3909
Nov 9, 2023
Merged

Fixes handling of incorrect compaction configuration#3912
keith-turner merged 6 commits intoapache:2.1from
keith-turner:accumulo-3909

Conversation

@keith-turner
Copy link
Contributor

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.

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.
@dlmarion
Copy link
Contributor

dlmarion commented Oct 31, 2023

I created #3913 concurrent to this and it addresses some of the problem, but differently.

}

@Override
public CompactionPlan makePlan(PlanningParameters params) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How often is makePlan called? Would it be helpful if it emitted a message saying that it will do nothing? Maybe info or debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EdColeman added periodic error logging in 9955320

@keith-turner keith-turner merged commit 4b63ead into apache:2.1 Nov 9, 2023
@keith-turner keith-turner deleted the accumulo-3909 branch November 9, 2023 16:16
@ctubbsii ctubbsii modified the milestones: 3.1.0, 2.1.3 Jul 12, 2024
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.

Setting a property with invalid json takes down system

4 participants