You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2026/08/03 11:58:06 UTC
Re: [PR] Remove compaction related TODOs [accumulo]
dlmarion commented on code in PR #6491:
URL: https://github.com/apache/accumulo/pull/6491#discussion_r3703663197
##########
test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionMetricsIT.java:
##########
@@ -214,16 +214,12 @@ public void testMetrics() throws Exception {
thread.join();
// Wait for all external compactions to complete
- long count;
- do {
- // TODO: Change this from waiting to verifying that all compactors are done running jobs,
- // not just check that the jobs have been polled off the queues.
- UtilWaitThread.sleep(10000);
+ Wait.waitFor(() -> {
try (TabletsMetadata tm = getCluster().getServerContext().getAmple().readTablets()
.forLevel(DataLevel.USER).fetch(ColumnType.ECOMP).build()) {
- count = tm.stream().mapToLong(t -> t.getExternalCompactions().keySet().size()).sum();
+ return tm.stream().allMatch(t -> t.getExternalCompactions().isEmpty());
}
- } while (count > 0);
+ });
Review Comment:
I would add it as an additional check after the current wait block. The first wait blocks checks that there are no compactions in the metadata table. The additional check will confirm that compactors are not working on user table compactions.
A two-arg version of `getCompactionsRunningOnCompactors` exists, it might be easier to call that.
To determine if the compactors are running any user table compactions, you can get the `TExternalCompaction.getJob().getExtent()` and convert it to a `KeyExtent`, then ensure that the tableId is not in the `SystemTables.tableIds` set.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org