This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 94b8d96e5c334ee3c7adbf665b9ddd9e1f46a692 Merge: 6c1e453f53 6d0b476852 Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Wed Apr 24 17:10:59 2024 -0400 Merge branch '2.1' Merge of 2.1 to main branch to include all changes up through #4459 .../org/apache/accumulo/core/conf/Property.java | 24 +++++++++++++++++++--- .../accumulo/core/iterators/user/GrepIterator.java | 2 +- .../core/iterators/user/GrepIteratorTest.java | 18 ++++++++++++++++ .../java/org/apache/accumulo/manager/Manager.java | 14 ++++++++----- .../accumulo/tserver/tablet/CompactableImpl.java | 13 ++++++++++-- .../accumulo/shell/commands/GrepCommand.java | 2 +- .../org/apache/accumulo/test/shell/ShellIT.java | 1 + 7 files changed, 62 insertions(+), 12 deletions(-) diff --cc core/src/main/java/org/apache/accumulo/core/conf/Property.java index 6dc56205ba,80a9b21b33..463b37cbcf --- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java +++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java @@@ -1533,13 -1886,15 +1550,14 @@@ public enum Property // white list prefixes return key.startsWith(Property.TABLE_PREFIX.getKey()) || key.startsWith(Property.TSERV_PREFIX.getKey()) + || key.startsWith(Property.COMPACTION_SERVICE_PREFIX.getKey()) + || key.startsWith(Property.SSERV_PREFIX.getKey()) || key.startsWith(Property.MANAGER_PREFIX.getKey()) - || key.startsWith(Property.MASTER_PREFIX.getKey()) || key.startsWith(Property.GC_PREFIX.getKey()) || key.startsWith(Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey()) + || key.equals(Property.COMPACTION_WARN_TIME.getKey()) || key.equals(Property.GENERAL_FILE_NAME_ALLOCATION_BATCH_SIZE_MIN.getKey()) - || key.equals(Property.GENERAL_FILE_NAME_ALLOCATION_BATCH_SIZE_MAX.getKey()) - || key.startsWith(VFS_CONTEXT_CLASSPATH_PROPERTY.getKey()) - || key.startsWith(REPLICATION_PREFIX.getKey()); + || key.equals(Property.GENERAL_FILE_NAME_ALLOCATION_BATCH_SIZE_MAX.getKey()); } /** diff --cc server/manager/src/main/java/org/apache/accumulo/manager/Manager.java index 9cead258f7,86a1dd71d3..5c6cc2f436 --- a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java @@@ -90,12 -85,16 +90,13 @@@ import org.apache.accumulo.core.manager import org.apache.accumulo.core.manager.thrift.ManagerGoalState; import org.apache.accumulo.core.manager.thrift.ManagerMonitorInfo; import org.apache.accumulo.core.manager.thrift.ManagerState; -import org.apache.accumulo.core.master.thrift.BulkImportState; -import org.apache.accumulo.core.master.thrift.TableInfo; -import org.apache.accumulo.core.master.thrift.TabletServerStatus; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.metadata.RootTable; +import org.apache.accumulo.core.manager.thrift.TableInfo; +import org.apache.accumulo.core.manager.thrift.TabletServerStatus; +import org.apache.accumulo.core.metadata.AccumuloTable; import org.apache.accumulo.core.metadata.TServerInstance; import org.apache.accumulo.core.metadata.TabletLocationState; -import org.apache.accumulo.core.metadata.TabletState; import org.apache.accumulo.core.metadata.schema.Ample.DataLevel; + import org.apache.accumulo.core.metadata.schema.MetadataSchema; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.TabletColumnFamily; import org.apache.accumulo.core.metrics.MetricsInfo; import org.apache.accumulo.core.metrics.MetricsProducer; @@@ -703,17 -709,19 +704,20 @@@ public class Manager extends AbstractSe */ private void cleanupNonexistentMigrations(final AccumuloClient accumuloClient) throws TableNotFoundException { - Scanner scanner = accumuloClient.createScanner(MetadataTable.NAME, Authorizations.EMPTY); + Scanner scanner = + accumuloClient.createScanner(AccumuloTable.METADATA.tableName(), Authorizations.EMPTY); TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner); - Set<KeyExtent> found = new HashSet<>(); + scanner.setRange(MetadataSchema.TabletsSection.getRange()); + Set<KeyExtent> notSeen; + synchronized (migrations) { + notSeen = new HashSet<>(migrations.keySet()); + } for (Entry<Key,Value> entry : scanner) { KeyExtent extent = KeyExtent.fromMetaPrevRow(entry); - if (migrations.containsKey(extent)) { - found.add(extent); - } + notSeen.remove(extent); } - migrations.keySet().retainAll(found); + // remove tablets that used to be in migrations and were not seen in the metadata table + migrations.keySet().removeAll(notSeen); } /** diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java index 567d8171e1,fc84c038aa..d519ffd172 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java @@@ -1378,12 -1576,21 +1379,20 @@@ public class CompactableImpl implement closed = true; // Wait while internal jobs are running or external compactions are committing. When - // chopStatus is MARKING or selectStatus is SELECTING, there may be metadata table writes so + // selectStatus is SELECTING, there may be metadata table writes so // wait on those. Do not wait on external compactions that are running. - while (runningJobs.stream() - .anyMatch(job -> !((CompactionExecutorIdImpl) job.getExecutor()).isExternalId()) + Predicate<CompactionJob> jobsToWaitFor = + job -> !((CompactionExecutorIdImpl) job.getExecutor()).isExternalId(); + while (runningJobs.stream().anyMatch(jobsToWaitFor) || !externalCompactionsCommitting.isEmpty() - || fileMgr.chopStatus == ChopSelectionStatus.MARKING || fileMgr.selectStatus == FileSelectionStatus.SELECTING) { + + log.debug( - "Closing {} is waiting on {} running compactions, {} committing external compactions, chop marking {}, file selection {}", ++ "Closing {} is waiting on {} running compactions, {} committing external compactions, file selection {}", + getExtent(), runningJobs.stream().filter(jobsToWaitFor).count(), - externalCompactionsCommitting.size(), fileMgr.chopStatus == ChopSelectionStatus.MARKING, ++ externalCompactionsCommitting.size(), + fileMgr.selectStatus == FileSelectionStatus.SELECTING); + try { wait(50); } catch (InterruptedException e) {