This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 688d2f58be12e40a2818ebc66376bd02a818e6b4 Merge: 59707d6002 de0cf9f739 Author: Keith Turner <ktur...@apache.org> AuthorDate: Thu Sep 14 18:40:38 2023 -0400 Merge branch '2.1' .../accumulo/tserver/compactions/Compactable.java | 5 +- .../compactions/InternalCompactionExecutor.java | 43 ++++++++- .../accumulo/tserver/tablet/CompactableImpl.java | 16 ++-- .../accumulo/tserver/tablet/DatafileManager.java | 15 ++- .../org/apache/accumulo/tserver/tablet/Tablet.java | 21 ++--- .../test/compaction/CompactionConfigChangeIT.java | 103 +++++++++++++++++++++ 6 files changed, 176 insertions(+), 27 deletions(-) diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java index 3561904912,1a820bee5b..fb510c1eff --- 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 @@@ -1277,8 -1292,8 +1279,8 @@@ public class CompactableImpl implement try { TabletLogger.compacting(getExtent(), job, cInfo.localCompactionCfg); tablet.incrementStatusMajor(); - var check = new CompactionCheck(service, kind, cInfo.checkCompactionId); + var check = new CompactionCheck(service, kind, keepRunning, cInfo.checkCompactionId); - TabletFile tmpFileName = tablet.getNextMapFilenameForMajc(cInfo.propagateDeletes); + ReferencedTabletFile tmpFileName = tablet.getNextDataFilenameForMajc(cInfo.propagateDeletes); var compactEnv = new MajCEnv(kind, check, readLimiter, writeLimiter, cInfo.propagateDeletes); SortedMap<StoredTabletFile,DataFileValue> allFiles = tablet.getDatafiles(); diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java index 97cb8d23d7,07be1a70bc..2cba023e8f --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java @@@ -348,8 -358,48 +357,8 @@@ class DatafileManager // before the following metadata write is made newFile = tablet.updateTabletDataFile(commitSession.getMaxCommittedTime(), newDatafile, dfv, unusedWalLogs, flushId); - - // Mark that we have data we want to replicate - // This WAL could still be in use by other Tablets *from the same table*, so we can only - // mark - // that there is data to replicate, - // but it is *not* closed. We know it is not closed by the fact that this MinC triggered. A - // MinC cannot happen unless the - // tablet is online and thus these WALs are referenced by that tablet. Therefore, the WAL - // replication status cannot be 'closed'. - @SuppressWarnings("deprecation") - boolean replicate = org.apache.accumulo.core.replication.ReplicationConfigurationUtil - .isEnabled(tablet.getExtent(), tablet.getTableConfiguration()); - if (replicate) { - // unusedWalLogs is of the form host/fileURI, need to strip off the host portion - Set<String> logFileOnly = new HashSet<>(); - for (String unusedWalLog : unusedWalLogs) { - int index = unusedWalLog.indexOf('/'); - if (index == -1) { - log.warn( - "Could not find host component to strip from DFSLogger representation of WAL"); - } else { - unusedWalLog = unusedWalLog.substring(index + 1); - } - logFileOnly.add(unusedWalLog); - } - - if (log.isDebugEnabled()) { - log.debug("Recording that data has been ingested into {} using {}", tablet.getExtent(), - logFileOnly); - } - for (String logFile : logFileOnly) { - @SuppressWarnings("deprecation") - Status status = - org.apache.accumulo.server.replication.StatusUtil.openWithUnknownLength(); - ReplicationTableUtil.updateFiles(tablet.getContext(), tablet.getExtent(), logFile, - status); - } - } - - tablet.finishClearingUnusedLogs(); } finally { - tablet.finishClearingUnusedLogs(); + tablet.getLogLock().unlock(); } do {