From e31863e90cc31b962d3561a7ea028f7fa8ce2900 Mon Sep 17 00:00:00 2001 From: Igor Melnichenko Date: Wed, 26 Aug 2026 00:12:17 +0300 Subject: [PATCH] Redundant logs were removed --- .../java/tech/ydb/core/auth/BackgroundIdentity.java | 8 -------- .../java/tech/ydb/core/operation/OperationTray.java | 3 +-- .../tech/ydb/core/ssl/YandexTrustManagersProvider.java | 5 ----- .../main/java/tech/ydb/topic/impl/SerialExecutor.java | 1 - .../ydb/topic/read/impl/DeferredCommitterImpl.java | 6 ------ .../java/tech/ydb/topic/write/impl/BufferManager.java | 10 ---------- 6 files changed, 1 insertion(+), 32 deletions(-) diff --git a/core/src/main/java/tech/ydb/core/auth/BackgroundIdentity.java b/core/src/main/java/tech/ydb/core/auth/BackgroundIdentity.java index 048c1ef35..43b4db88a 100644 --- a/core/src/main/java/tech/ydb/core/auth/BackgroundIdentity.java +++ b/core/src/main/java/tech/ydb/core/auth/BackgroundIdentity.java @@ -9,16 +9,11 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * * @author Aleksandr Gorshenin */ public class BackgroundIdentity implements tech.ydb.auth.AuthIdentity { - private static final Logger logger = LoggerFactory.getLogger(BackgroundIdentity.class); - public interface Rpc extends AutoCloseable { class Token { private final String token; @@ -89,10 +84,8 @@ private T unwrap(CompletableFuture future) { try { return future.get(rpc.getTimeoutSeconds(), TimeUnit.SECONDS); } catch (ExecutionException | TimeoutException ex) { - logger.error("authentication update problem", ex); throw new RuntimeException("authentication update problem", ex); } catch (InterruptedException ex) { - logger.error("updating of authentication token was interrupted", ex); Thread.currentThread().interrupt(); // returning null here would poison the state reference and break every following getToken() throw new RuntimeException("authentication update was interrupted", ex); @@ -233,4 +226,3 @@ public State validate(Instant now) { } } } - diff --git a/core/src/main/java/tech/ydb/core/operation/OperationTray.java b/core/src/main/java/tech/ydb/core/operation/OperationTray.java index fef3be432..69c1ae16c 100644 --- a/core/src/main/java/tech/ydb/core/operation/OperationTray.java +++ b/core/src/main/java/tech/ydb/core/operation/OperationTray.java @@ -29,8 +29,7 @@ public static CompletableFuture fetchOperation(Operation operation, in return future; } - logger.error("unknown type of {}", operation); - throw new IllegalArgumentException("Unknown type of operation"); + throw new IllegalArgumentException("Unknown type of operation: " + operation); } private static boolean complete(Throwable th, CompletableFuture f, AsyncOperation o, long elapsed) { diff --git a/core/src/main/java/tech/ydb/core/ssl/YandexTrustManagersProvider.java b/core/src/main/java/tech/ydb/core/ssl/YandexTrustManagersProvider.java index cf8efacc7..4b0a03e18 100644 --- a/core/src/main/java/tech/ydb/core/ssl/YandexTrustManagersProvider.java +++ b/core/src/main/java/tech/ydb/core/ssl/YandexTrustManagersProvider.java @@ -18,12 +18,8 @@ import javax.net.ssl.X509TrustManager; import com.google.common.io.ByteStreams; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; final class YandexTrustManagersProvider { - private static final Logger logger = LoggerFactory.getLogger(YandexTrustManagerFactory.class); - private static final String CA_STORE = "certificates/YandexAllCAs.pkcs"; private static final String CA_KEYPHRASE = "certificates/YandexAllCAs.password"; @@ -48,7 +44,6 @@ private YandexTrustManagersProvider() { trustManagers = allTrustManagers.toArray(new TrustManager[0]); } catch (NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException e) { String msg = "Can't init yandex root CA setting"; - logger.debug(msg, e); throw new RuntimeException(msg, e); } } diff --git a/topic/src/main/java/tech/ydb/topic/impl/SerialExecutor.java b/topic/src/main/java/tech/ydb/topic/impl/SerialExecutor.java index 1deb8f959..06e0feb80 100644 --- a/topic/src/main/java/tech/ydb/topic/impl/SerialExecutor.java +++ b/topic/src/main/java/tech/ydb/topic/impl/SerialExecutor.java @@ -41,7 +41,6 @@ public void execute(Runnable task) { try { executor.execute(this); } catch (RuntimeException ex) { - logger.error("SerialExecutor cannot execute task", ex); isExecuted.set(false); throw ex; } diff --git a/topic/src/main/java/tech/ydb/topic/read/impl/DeferredCommitterImpl.java b/topic/src/main/java/tech/ydb/topic/read/impl/DeferredCommitterImpl.java index 9140b78d9..5bdaaa794 100644 --- a/topic/src/main/java/tech/ydb/topic/read/impl/DeferredCommitterImpl.java +++ b/topic/src/main/java/tech/ydb/topic/read/impl/DeferredCommitterImpl.java @@ -3,9 +3,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import tech.ydb.topic.read.DeferredCommitter; import tech.ydb.topic.read.Message; import tech.ydb.topic.read.MessageCommitter; @@ -16,13 +13,10 @@ * @author Nikolay Perfilov */ public class DeferredCommitterImpl implements DeferredCommitter { - private static final Logger logger = LoggerFactory.getLogger(DeferredCommitterImpl.class); - private final Map rangesBySession = new ConcurrentHashMap<>(); private RuntimeException wrapExceptionWithSession(PartitionSession session, RuntimeException ex) { String msg = "Error adding new offset range to DeferredCommitter for " + session + ": " + ex.getMessage(); - logger.error(msg); return new RuntimeException(msg, ex); } diff --git a/topic/src/main/java/tech/ydb/topic/write/impl/BufferManager.java b/topic/src/main/java/tech/ydb/topic/write/impl/BufferManager.java index e3f056d9d..f45a1d14b 100644 --- a/topic/src/main/java/tech/ydb/topic/write/impl/BufferManager.java +++ b/topic/src/main/java/tech/ydb/topic/write/impl/BufferManager.java @@ -4,9 +4,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import tech.ydb.core.Status; import tech.ydb.topic.settings.WriterSettings; import tech.ydb.topic.write.QueueOverflowException; @@ -16,9 +13,6 @@ * @author Aleksandr Gorshenin */ public class BufferManager { - // use logger from WriterImpl - private static final Logger logger = LoggerFactory.getLogger(WriterImpl.class); - private final String debugId; private final long bufferMaxSize; private final int maxCount; @@ -88,7 +82,6 @@ public void tryAcquire(long messageSize) throws QueueOverflowException { if (!countAvailable.tryAcquire()) { String errorMsg = "[" + debugId + "] Rejecting a message due to reaching message queue in-flight limit of " + maxCount; - logger.warn(errorMsg); throw new QueueOverflowException(errorMsg); } @@ -105,7 +98,6 @@ public void tryAcquire(long messageSize) throws QueueOverflowException { String errorMsg = "[" + debugId + "] Rejecting a message of " + messageSize + " bytes: not enough space in message queue. Buffer currently has " + count + " messages with " + size + " / " + bufferMaxSize + " bytes available"; - logger.warn(errorMsg); throw new QueueOverflowException(errorMsg); } @@ -126,7 +118,6 @@ public void tryAcquire(long messageSize, long timeout, TimeUnit unit) throws Int if (!countAvailable.tryAcquire(timeout, unit)) { String errorMsg = "[" + debugId + "] Rejecting a message due to reaching message queue in-flight limit of " + maxCount; - logger.warn(errorMsg); throw new TimeoutException(errorMsg); } @@ -147,7 +138,6 @@ public void tryAcquire(long messageSize, long timeout, TimeUnit unit) throws Int String errorMsg = "[" + debugId + "] Rejecting a message of " + messageSize + " bytes: not enough space in message queue. Buffer currently has " + count + " messages with " + size + " / " + bufferMaxSize + " bytes available"; - logger.warn(errorMsg); throw new TimeoutException(errorMsg); } } catch (InterruptedException ex) {