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 15be02a8ffb8a3a675437650ddd9203539d5e4db
Merge: 826224e5d5 0751f01ff1
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Thu Mar 13 19:04:40 2025 +0000

    Merge branch '2.1'

 .../core/crypto/streams/BlockedOutputStream.java   |  7 +++-
 .../accumulo/core/spi/crypto/AESCryptoService.java | 15 ++++++-
 .../accumulo/core/spi/crypto/CryptoService.java    |  3 +-
 .../accumulo/core/spi/crypto/FileEncrypter.java    |  5 ++-
 .../accumulo/core/crypto/BlockedIOStreamTest.java  |  9 ++--
 .../apache/accumulo/core/crypto/CryptoTest.java    | 24 +++++++++++
 .../accumulo/server/compaction/CompactionInfo.java |  2 +-
 .../accumulo/server/compaction/FileCompactor.java  | 49 +++++++++++++++++++---
 .../accumulo/tserver/tablet/MinorCompactor.java    |  3 +-
 9 files changed, 99 insertions(+), 18 deletions(-)

diff --cc 
core/src/main/java/org/apache/accumulo/core/spi/crypto/AESCryptoService.java
index f48281296a,555103fd98..53ed79a7de
--- 
a/core/src/main/java/org/apache/accumulo/core/spi/crypto/AESCryptoService.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/spi/crypto/AESCryptoService.java
@@@ -507,7 -514,11 +514,11 @@@ public class AESCryptoService implement
  
        @Override
        public OutputStream encryptStream(OutputStream outputStream) throws 
CryptoException {
+         if (!openTracker.compareAndSet(false, true)) {
+           throw new CryptoException("Attempted to obtain new stream without 
closing previous one.");
+         }
+ 
 -        random.nextBytes(initVector);
 +        RANDOM.get().nextBytes(initVector);
          try {
            outputStream.write(initVector);
          } catch (IOException e) {
diff --cc 
server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionInfo.java
index 08e0da282d,35bf574fb1..396b2c1d1c
--- 
a/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionInfo.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionInfo.java
@@@ -66,15 -64,11 +66,15 @@@ public class CompactionInfo 
      return entriesWritten;
    }
  
 +  public long getTimesPaused() {
 +    return timesPaused;
 +  }
 +
    public Thread getThread() {
-     return compactor.thread;
+     return compactor.getThread();
    }
  
 -  public String getOutputFile() {
 +  public StoredTabletFile getOutputFile() {
      return compactor.getOutputFile();
    }
  
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
index d370637c9f,71258af11d..9a0d4f5506
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/MinorCompactor.java
@@@ -121,8 -135,9 +121,8 @@@ public class MinorCompactor extends Fil
              throw new RuntimeException(e);
            }
            log.warn("MinC failed ({}) to create {} retrying ...", 
e.getMessage(), outputFileName, e);
 -          reportedProblem = true;
            retryCounter++;
-         } catch (CompactionCanceledException e) {
+         } catch (CompactionCanceledException | InterruptedException e) {
            throw new IllegalStateException(e);
          }
  

Reply via email to