(accumulo) 01/01: Merge branch 'main' into elasticity
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git commit d5d123aaa4d601a4f5d618ad96f325a601e21293 Merge: b9867c4c8c da0e0e6624 Author: Christopher Tubbs AuthorDate: Fri Mar 15 19:39:59 2024 -0400 Merge branch 'main' into elasticity .../org/apache/accumulo/compactor/Compactor.java | 44 +- 1 file changed, 10 insertions(+), 34 deletions(-) diff --cc server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java index 114dd59519,f4affca907..db21c2605e --- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java +++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java @@@ -108,8 -106,7 +108,7 @@@ import org.apache.accumulo.server.fs.Vo import org.apache.accumulo.server.rpc.ServerAddress; import org.apache.accumulo.server.rpc.TServerUtils; import org.apache.accumulo.server.rpc.ThriftProcessorTypes; - import org.apache.accumulo.server.security.SecurityOperation; -import org.apache.accumulo.server.zookeeper.TransactionWatcher; +import org.apache.accumulo.tserver.log.LogSorter; import org.apache.hadoop.fs.Path; import org.apache.thrift.TException; import org.apache.thrift.transport.TTransportException; @@@ -132,12 -130,10 +131,9 @@@ public class Compactor extends Abstract protected static final CompactionJobHolder JOB_HOLDER = new CompactionJobHolder(); private final UUID compactorId = UUID.randomUUID(); - private final AccumuloConfiguration aconf; - private final String queueName; protected final AtomicReference currentCompactionId = new AtomicReference<>(); - private final CompactionWatcher watcher; - private SecurityOperation security; private ServiceLock compactorLock; private ServerAddress compactorAddress = null; private PausedCompactionMetrics pausedMetrics; @@@ -148,31 -144,10 +144,14 @@@ private final AtomicBoolean compactionRunning = new AtomicBoolean(false); protected Compactor(ConfigOpts opts, String[] args) { - this(opts, args, null); - } - - protected Compactor(ConfigOpts opts, String[] args, AccumuloConfiguration conf) { super("compactor", opts, args); - aconf = conf == null ? super.getConfiguration() : conf; - setupSecurity(); - watcher = new CompactionWatcher(aconf); - var schedExecutor = - ThreadPools.getServerThreadPools().createGeneralScheduledExecutorService(aconf); - startCancelChecker(schedExecutor, - aconf.getTimeInMillis(Property.COMPACTOR_CANCEL_CHECK_INTERVAL)); - printStartupMsg(); -queueName = super.getConfiguration().get(Property.COMPACTOR_QUEUE_NAME); + } + + @Override + protected String getResourceGroupPropertyValue(SiteConfiguration conf) { +return conf.get(Property.COMPACTOR_GROUP_NAME); } - @Override - public AccumuloConfiguration getConfiguration() { - return aconf; - } - @Override public void registerMetrics(MeterRegistry registry) { super.registerMetrics(registry); @@@ -634,6 -597,11 +604,12 @@@ LOG.error("Error initializing metrics, metrics will not be emitted.", e1); } + var watcher = new CompactionWatcher(getConfiguration()); + var schedExecutor = ThreadPools.getServerThreadPools() + .createGeneralScheduledExecutorService(getConfiguration()); -startCancelChecker(schedExecutor, TIME_BETWEEN_CANCEL_CHECKS); ++startCancelChecker(schedExecutor, ++ getConfiguration().getTimeInMillis(Property.COMPACTOR_CANCEL_CHECK_INTERVAL)); + LOG.info("Compactor started, waiting for work"); try {
(accumulo) branch elasticity updated (b9867c4c8c -> d5d123aaa4)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a change to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git from b9867c4c8c Deletes FateTxId (#4370) add f3e75f0e46 Several small improvements to Compactor impl (#4342) add da0e0e6624 Merge branch '2.1' new d5d123aaa4 Merge branch 'main' into elasticity The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/accumulo/compactor/Compactor.java | 44 +- 1 file changed, 10 insertions(+), 34 deletions(-)
(accumulo) branch elasticity updated: Deletes FateTxId (#4370)
This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/elasticity by this push: new b9867c4c8c Deletes FateTxId (#4370) b9867c4c8c is described below commit b9867c4c8cd97b23800b1e129bfa492381ca74c2 Author: Kevin Rathbun <43969518+kevinrr...@users.noreply.github.com> AuthorDate: Fri Mar 15 19:08:52 2024 -0400 Deletes FateTxId (#4370) FateTxId has now been fully replaced by FateId, and can be safely deleted --- .../org/apache/accumulo/core/fate/FateTxId.java| 62 -- .../apache/accumulo/core/util/FastFormatTest.java | 13 ++--- 2 files changed, 5 insertions(+), 70 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/fate/FateTxId.java b/core/src/main/java/org/apache/accumulo/core/fate/FateTxId.java deleted file mode 100644 index ad0d5740af..00 --- a/core/src/main/java/org/apache/accumulo/core/fate/FateTxId.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.accumulo.core.fate; - -import java.util.regex.Pattern; - -import org.apache.accumulo.core.util.FastFormat; - -import com.google.common.base.Preconditions; - -public class FateTxId { - - private static final String PREFIX = "FATE["; - private static final String SUFFIX = "]"; - - private final static Pattern PATTERN = - Pattern.compile(Pattern.quote(PREFIX) + "[0-9a-fA-F]+" + Pattern.quote(SUFFIX)); - - private static String getHex(String fmtTid) { -return fmtTid.substring(PREFIX.length(), fmtTid.length() - SUFFIX.length()); - } - - /** - * @return true if string was created by {@link #formatTid(long)} and false otherwise. - */ - public static boolean isFormatedTid(String fmtTid) { -return PATTERN.matcher(fmtTid).matches(); - } - - /** - * Reverses {@link #formatTid(long)} - */ - public static long fromString(String fmtTid) { -Preconditions.checkArgument(fmtTid.startsWith(PREFIX) && fmtTid.endsWith(SUFFIX)); -return Long.parseLong(getHex(fmtTid), 16); - } - - /** - * Formats transaction ids in a consistent way that is useful for logging and persisting. - */ - public static String formatTid(long tid) { -// do not change how this formats without considering implications for persistence -return FastFormat.toHexString(PREFIX, tid, SUFFIX); - } - -} diff --git a/core/src/test/java/org/apache/accumulo/core/util/FastFormatTest.java b/core/src/test/java/org/apache/accumulo/core/util/FastFormatTest.java index 40da603e4a..8e68d87a34 100644 --- a/core/src/test/java/org/apache/accumulo/core/util/FastFormatTest.java +++ b/core/src/test/java/org/apache/accumulo/core/util/FastFormatTest.java @@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.Arrays; -import org.apache.accumulo.core.fate.FateTxId; +import org.apache.accumulo.core.fate.FateId; import org.junit.jupiter.api.Test; public class FastFormatTest { @@ -121,13 +121,10 @@ public class FastFormatTest { @Test public void testHexString() { -final String PREFIX = "FATE["; -final String SUFFIX = "]"; -String formattedTxId = FateTxId.formatTid(64L); -String hexStr = FastFormat.toHexString(PREFIX, 64L, SUFFIX); -assertEquals(formattedTxId, hexStr); -long txid = FateTxId.fromString("FATE[2e429160071c63d8]"); -assertEquals("FATE[2e429160071c63d8]", FastFormat.toHexString(PREFIX, txid, SUFFIX)); +String prefix = "FATE:USER:"; +assertEquals(FateId.formatTid(987654321L), FastFormat.toHexString(987654321L)); +long txid = FateId.from(prefix + "2e429160071c63d8").getTid(); +assertEquals(prefix + "2e429160071c63d8", FastFormat.toHexString(prefix, txid, "")); assertEquals(String.format("%016x", 64L), FastFormat.toHexString(64L)); assertEquals(String.format("%016x", 0X2e429160071c63d8L), FastFormat.toHexString(0X2e429160071c63d8L));
(accumulo) branch main updated (a3616bf46f -> da0e0e6624)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git from a3616bf46f Merge remote-tracking branch 'upstream/2.1' add f3e75f0e46 Several small improvements to Compactor impl (#4342) new da0e0e6624 Merge branch '2.1' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/apache/accumulo/compactor/Compactor.java | 44 +- 1 file changed, 10 insertions(+), 34 deletions(-)
(accumulo) 01/01: Merge branch '2.1'
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 da0e0e6624eef8c207022636a67a41bdd848fa49 Merge: a3616bf46f f3e75f0e46 Author: Christopher Tubbs AuthorDate: Fri Mar 15 18:04:39 2024 -0400 Merge branch '2.1' .../org/apache/accumulo/compactor/Compactor.java | 44 +- 1 file changed, 10 insertions(+), 34 deletions(-) diff --cc server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java index b81c30dee3,5e09e48fdf..f4affca907 --- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java +++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java @@@ -106,8 -105,6 +106,7 @@@ import org.apache.accumulo.server.fs.Vo import org.apache.accumulo.server.rpc.ServerAddress; import org.apache.accumulo.server.rpc.TServerUtils; import org.apache.accumulo.server.rpc.ThriftProcessorTypes; - import org.apache.accumulo.server.security.SecurityOperation; +import org.apache.accumulo.server.zookeeper.TransactionWatcher; import org.apache.hadoop.fs.Path; import org.apache.thrift.TException; import org.apache.thrift.transport.TTransportException; @@@ -130,42 -139,23 +129,23 @@@ public class Compactor extends Abstract protected static final CompactionJobHolder JOB_HOLDER = new CompactionJobHolder(); - private final GarbageCollectionLogger gcLogger = new GarbageCollectionLogger(); private final UUID compactorId = UUID.randomUUID(); - private final AccumuloConfiguration aconf; private final String queueName; protected final AtomicReference currentCompactionId = new AtomicReference<>(); - private final CompactionWatcher watcher; - private SecurityOperation security; private ServiceLock compactorLock; private ServerAddress compactorAddress = null; + private PausedCompactionMetrics pausedMetrics; // Exposed for tests protected volatile boolean shutdown = false; private final AtomicBoolean compactionRunning = new AtomicBoolean(false); - protected Compactor(CompactorServerOpts opts, String[] args) { + protected Compactor(ConfigOpts opts, String[] args) { - this(opts, args, null); - } - - protected Compactor(ConfigOpts opts, String[] args, AccumuloConfiguration conf) { super("compactor", opts, args); - aconf = conf == null ? super.getConfiguration() : conf; - queueName = aconf.get(Property.COMPACTOR_QUEUE_NAME); - setupSecurity(); - watcher = new CompactionWatcher(aconf); - var schedExecutor = - ThreadPools.getServerThreadPools().createGeneralScheduledExecutorService(aconf); - startCancelChecker(schedExecutor, TIME_BETWEEN_CANCEL_CHECKS); - printStartupMsg(); - } - - @Override - public AccumuloConfiguration getConfiguration() { - return aconf; -queueName = opts.getQueueName(); ++queueName = super.getConfiguration().get(Property.COMPACTOR_QUEUE_NAME); } @Override @@@ -176,10 -165,13 +156,6 @@@ CompactionWatcher.setTimer(timer); } - protected void setupSecurity() { - security = getContext().getSecurityOperation(); - protected void startGCLogger(ScheduledThreadPoolExecutor schedExecutor) { -ScheduledFuture future = -schedExecutor.scheduleWithFixedDelay(() -> gcLogger.logGCInfo(getConfiguration()), 0, -TIME_BETWEEN_GC_CHECKS, TimeUnit.MILLISECONDS); -ThreadPools.watchNonCriticalScheduledTask(future); -- } -- protected void startCancelChecker(ScheduledThreadPoolExecutor schedExecutor, long timeBetweenChecks) { ThreadPools.watchCriticalScheduledTask(schedExecutor.scheduleWithFixedDelay( @@@ -625,7 -601,14 +596,12 @@@ | SecurityException e1) { LOG.error("Error initializing metrics, metrics will not be emitted.", e1); } -MetricsUtil.initializeProducers(this); + var watcher = new CompactionWatcher(getConfiguration()); + var schedExecutor = ThreadPools.getServerThreadPools() + .createGeneralScheduledExecutorService(getConfiguration()); -startGCLogger(schedExecutor); + startCancelChecker(schedExecutor, TIME_BETWEEN_CANCEL_CHECKS); + LOG.info("Compactor started, waiting for work"); try {
(accumulo) 01/01: Merge remote-tracking branch 'upstream/main' into elasticity
This is an automated email from the ASF dual-hosted git repository. edcoleman pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git commit 61ce280c8ebbfe92961bedf76500e59c1f935cf6 Merge: f1914da45a a3616bf46f Author: Ed Coleman AuthorDate: Fri Mar 15 21:21:51 2024 + Merge remote-tracking branch 'upstream/main' into elasticity pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(accumulo) branch elasticity updated (f1914da45a -> 61ce280c8e)
This is an automated email from the ASF dual-hosted git repository. edcoleman pushed a change to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git from f1914da45a Merge branch 'main' into elasticity add f26a110292 bump zookeeper version from 3.9.1 to 3.9.2 (#4387) add a3616bf46f Merge remote-tracking branch 'upstream/2.1' new 61ce280c8e Merge remote-tracking branch 'upstream/main' into elasticity The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(accumulo) branch 2.1 updated: Several small improvements to Compactor impl (#4342)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/2.1 by this push: new f3e75f0e46 Several small improvements to Compactor impl (#4342) f3e75f0e46 is described below commit f3e75f0e46a320d10f222546c33ada896c371e7c Author: Christopher Tubbs AuthorDate: Fri Mar 15 16:53:53 2024 -0400 Several small improvements to Compactor impl (#4342) * Start threadpools when service is run, not when it is constructed (and importantly, after metrics have been fully initialized); this ensures that ServerContext, which is created during construction, is available before threadpools and metrics are started * Use the security object from the ServerContext * Remove unneeded second constructor with config overrides (can provide overridden config in test subclass instead) * Remove redundant printStartupMsg (already printed the same details in AbstractServer base class) * Make sure SuccessfulCompactor's close method is called in try-with-resources to remove unclosed resource warning in CompactorTest --- .../org/apache/accumulo/compactor/Compactor.java | 44 +- .../apache/accumulo/compactor/CompactorTest.java | 27 - 2 files changed, 18 insertions(+), 53 deletions(-) diff --git a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java index 1434d2a1f1..5e09e48fdf 100644 --- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java +++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java @@ -105,7 +105,6 @@ import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.rpc.ServerAddress; import org.apache.accumulo.server.rpc.TServerUtils; import org.apache.accumulo.server.rpc.ThriftProcessorTypes; -import org.apache.accumulo.server.security.SecurityOperation; import org.apache.hadoop.fs.Path; import org.apache.thrift.TException; import org.apache.thrift.transport.TTransportException; @@ -142,13 +141,10 @@ public class Compactor extends AbstractServer implements MetricsProducer, Compac private final GarbageCollectionLogger gcLogger = new GarbageCollectionLogger(); private final UUID compactorId = UUID.randomUUID(); - private final AccumuloConfiguration aconf; private final String queueName; protected final AtomicReference currentCompactionId = new AtomicReference<>(); - private final CompactionWatcher watcher; - private SecurityOperation security; private ServiceLock compactorLock; private ServerAddress compactorAddress = null; @@ -158,25 +154,8 @@ public class Compactor extends AbstractServer implements MetricsProducer, Compac private final AtomicBoolean compactionRunning = new AtomicBoolean(false); protected Compactor(CompactorServerOpts opts, String[] args) { -this(opts, args, null); - } - - protected Compactor(CompactorServerOpts opts, String[] args, AccumuloConfiguration conf) { super("compactor", opts, args); queueName = opts.getQueueName(); -aconf = conf == null ? super.getConfiguration() : conf; -setupSecurity(); -watcher = new CompactionWatcher(aconf); -var schedExecutor = - ThreadPools.getServerThreadPools().createGeneralScheduledExecutorService(aconf); -startGCLogger(schedExecutor); -startCancelChecker(schedExecutor, TIME_BETWEEN_CANCEL_CHECKS); -printStartupMsg(); - } - - @Override - public AccumuloConfiguration getConfiguration() { -return aconf; } @Override @@ -186,10 +165,6 @@ public class Compactor extends AbstractServer implements MetricsProducer, Compac CompactionWatcher.setTimer(timer); } - protected void setupSecurity() { -security = getContext().getSecurityOperation(); - } - protected void startGCLogger(ScheduledThreadPoolExecutor schedExecutor) { ScheduledFuture future = schedExecutor.scheduleWithFixedDelay(() -> gcLogger.logGCInfo(getConfiguration()), 0, @@ -245,11 +220,6 @@ public class Compactor extends AbstractServer implements MetricsProducer, Compac } } - protected void printStartupMsg() { -LOG.info("Version " + Constants.VERSION); -LOG.info("Instance " + getContext().getInstanceID()); - } - /** * Set up nodes and locks in ZooKeeper for this Compactor * @@ -359,7 +329,7 @@ public class Compactor extends AbstractServer implements MetricsProducer, Compac TableId tableId = JOB_HOLDER.getTableId(); try { NamespaceId nsId = getContext().getNamespaceId(tableId); - if (!security.canCompact(credentials, tableId, nsId)) { + if (!getContext().getSecurityOperation().canCompact(credentials, tableId, nsId)) { throw new
(accumulo) branch main updated (fe552af0dd -> a3616bf46f)
This is an automated email from the ASF dual-hosted git repository. edcoleman pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git from fe552af0dd Merge branch '2.1' add f26a110292 bump zookeeper version from 3.9.1 to 3.9.2 (#4387) new a3616bf46f Merge remote-tracking branch 'upstream/2.1' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(accumulo) 01/01: Merge remote-tracking branch 'upstream/2.1'
This is an automated email from the ASF dual-hosted git repository. edcoleman pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git commit a3616bf46f218d6b6cb39864f334f7c99acef258 Merge: fe552af0dd f26a110292 Author: Ed Coleman AuthorDate: Fri Mar 15 20:33:07 2024 + Merge remote-tracking branch 'upstream/2.1' pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(accumulo) branch 2.1 updated: bump zookeeper version from 3.9.1 to 3.9.2 (#4387)
This is an automated email from the ASF dual-hosted git repository. edcoleman pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/2.1 by this push: new f26a110292 bump zookeeper version from 3.9.1 to 3.9.2 (#4387) f26a110292 is described below commit f26a110292a8ec57bee7470ae5942612399f4a54 Author: EdColeman AuthorDate: Fri Mar 15 16:12:45 2024 -0400 bump zookeeper version from 3.9.1 to 3.9.2 (#4387) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f0191cdaca..5648b4f859 100644 --- a/pom.xml +++ b/pom.xml @@ -155,7 +155,7 @@ 2.0.9 2.0.11 0.17.0 -3.9.1 +3.9.2
(accumulo) branch dependabot/maven/org.apache.zookeeper-zookeeper-3.9.2 created (now 044f076d20)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/maven/org.apache.zookeeper-zookeeper-3.9.2 in repository https://gitbox.apache.org/repos/asf/accumulo.git at 044f076d20 Bump org.apache.zookeeper:zookeeper from 3.9.1 to 3.9.2 No new revisions were added by this update.
(accumulo) branch elasticity updated (9550da7c83 -> f1914da45a)
This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a change to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git from 9550da7c83 Merge branch 'main' into elasticity add 7c9204274c Fixes ConcurrentModificationException in RunningCompaction (#4383) add fe552af0dd Merge branch '2.1' new f1914da45a Merge branch 'main' into elasticity The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/accumulo/core/util/compaction/RunningCompaction.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)
(accumulo) 01/01: Merge branch 'main' into elasticity
This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git commit f1914da45a73f6010b5eba5827a22e90b94557be Merge: 9550da7c83 fe552af0dd Author: Dave Marion AuthorDate: Fri Mar 15 17:23:43 2024 + Merge branch 'main' into elasticity .../apache/accumulo/core/util/compaction/RunningCompaction.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)
(accumulo) 01/01: Merge branch '2.1'
This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git commit fe552af0dd23d263aca96dd6d356df7070641b29 Merge: 9839e4d42f 7c9204274c Author: Dave Marion AuthorDate: Fri Mar 15 17:22:56 2024 + Merge branch '2.1' .../apache/accumulo/core/util/compaction/RunningCompaction.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)
(accumulo) branch main updated (9839e4d42f -> fe552af0dd)
This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git from 9839e4d42f Merge branch '2.1' add 7c9204274c Fixes ConcurrentModificationException in RunningCompaction (#4383) new fe552af0dd Merge branch '2.1' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/accumulo/core/util/compaction/RunningCompaction.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)
(accumulo) branch 2.1 updated: Fixes ConcurrentModificationException in RunningCompaction (#4383)
This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/2.1 by this push: new 7c9204274c Fixes ConcurrentModificationException in RunningCompaction (#4383) 7c9204274c is described below commit 7c9204274c195e258c6f45dbfe93e9d720533929 Author: Dave Marion AuthorDate: Fri Mar 15 13:21:33 2024 -0400 Fixes ConcurrentModificationException in RunningCompaction (#4383) While working on #4382 I ran into an issue where a CME was being raised in a Thrift thread that was trying to serialize the updates from the RunningCompaction object. --- .../apache/accumulo/core/util/compaction/RunningCompaction.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/util/compaction/RunningCompaction.java b/core/src/main/java/org/apache/accumulo/core/util/compaction/RunningCompaction.java index b2e4fd1581..4d666e4962 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/compaction/RunningCompaction.java +++ b/core/src/main/java/org/apache/accumulo/core/util/compaction/RunningCompaction.java @@ -43,11 +43,15 @@ public class RunningCompaction { } public Map getUpdates() { -return updates; +synchronized (updates) { + return new TreeMap<>(updates); +} } public void addUpdate(Long timestamp, TCompactionStatusUpdate update) { -this.updates.put(timestamp, update); +synchronized (updates) { + this.updates.put(timestamp, update); +} } public TExternalCompactionJob getJob() {