Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions core/src/main/java/tech/ydb/core/auth/BackgroundIdentity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -89,10 +84,8 @@ private <T> T unwrap(CompletableFuture<T> 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);
Expand Down Expand Up @@ -233,4 +226,3 @@ public State validate(Instant now) {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public static <T> CompletableFuture<T> fetchOperation(Operation<T> 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 <T> boolean complete(Throwable th, CompletableFuture<T> f, AsyncOperation<T> o, long elapsed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -16,13 +13,10 @@
* @author Nikolay Perfilov
*/
public class DeferredCommitterImpl implements DeferredCommitter {
private static final Logger logger = LoggerFactory.getLogger(DeferredCommitterImpl.class);

private final Map<MessageCommitter, DisjointOffsetRangeSet> 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);
}

Expand Down
10 changes: 0 additions & 10 deletions topic/src/main/java/tech/ydb/topic/write/impl/BufferManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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) {
Expand Down
Loading