dlmarion commented on PR #5807:
URL: https://github.com/apache/accumulo/pull/5807#issuecomment-3197311325
In a standard 2.1 instance the root and metadata tables are configured with
the compaction services `root` and `meta`, respectively. In the default 4.0
configuration only the `default` compaction service is configured leading to
the root and metadata table not compacting until the configuration is fixed.
This change adds code to the UpgradeUtil class such that the `--start` option
will fail if any of the tables are configured with compaction services that
don't exist.
The output on a failure looks like:
```
2025-08-18T13:38:07,243 [util.UpgradeUtil] INFO : Defined compaction service
ids: [default]
2025-08-18T13:38:07,253 [util.UpgradeUtil] INFO : Table root is configured
to use service root for compaction kind SYSTEM
2025-08-18T13:38:07,253 [util.UpgradeUtil] ERROR: Table +r returned
non-existent compaction service root for compaction type SYSTEM.
2025-08-18T13:38:07,253 [util.UpgradeUtil] INFO : Table root is configured
to use service root for compaction kind USER
2025-08-18T13:38:07,254 [util.UpgradeUtil] ERROR: Table +r returned
non-existent compaction service root for compaction type USER.
2025-08-18T13:38:07,256 [util.UpgradeUtil] INFO : Table metadata is
configured to use service meta for compaction kind SYSTEM
2025-08-18T13:38:07,256 [util.UpgradeUtil] ERROR: Table !0 returned
non-existent compaction service meta for compaction type SYSTEM.
2025-08-18T13:38:07,256 [util.UpgradeUtil] INFO : Table metadata is
configured to use service meta for compaction kind USER
2025-08-18T13:38:07,256 [util.UpgradeUtil] ERROR: Table !0 returned
non-existent compaction service meta for compaction type USER.
2025-08-18T13:38:07,257 [util.UpgradeUtil] INFO : Table replication is
configured to use service default for compaction kind SYSTEM
2025-08-18T13:38:07,257 [util.UpgradeUtil] INFO : Table replication is
configured to use service default for compaction kind USER
2025-08-18T13:38:07,257 [util.UpgradeUtil] ERROR: Compaction configuration
is incorrect. One or more tables is configured to use a compaction service that
does not exist in the configuration. Configured compaction services are:
[default]
Thread 'upgrade' died.
java.lang.IllegalStateException: Compaction configuration is not correct.
Continuing with upgrade will leave the instance in a state where no compactions
will start. Please fix the system configuration by defining the expected
compaction services in accumulo.properties and run --start again.
at
org.apache.accumulo.server.util.UpgradeUtil.validateCompactionServiceConfiguration(UpgradeUtil.java:400)
at
org.apache.accumulo.server.util.UpgradeUtil.start(UpgradeUtil.java:270)
at
org.apache.accumulo.server.util.UpgradeUtil.execute(UpgradeUtil.java:325)
at org.apache.accumulo.start.Main.lambda$execKeyword$0(Main.java:81)
at java.base/java.lang.Thread.run(Thread.java:840)
```
To resolve the issue I had to add the following to `accumulo.properties`:
```
compaction.service.root.planner=org.apache.accumulo.core.spi.compaction.RatioBasedCompactionPlanner
compaction.service.root.planner.opts.group=[{"group":"default"}]
compaction.service.meta.planner=org.apache.accumulo.core.spi.compaction.RatioBasedCompactionPlanner
compaction.service.meta.planner.opts.group=[{"group":"default"}]
```
I noticed that the javadoc for RatioBasedCompactionPlanner was missing
`.planner` in the name when specifying the options, so I fixed that too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]