Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Improve logging for TransactionManagers (#4509)
Browse files Browse the repository at this point in the history
* Split logger.

* Fix visibility.
  • Loading branch information
OStevan authored Jan 14, 2020
1 parent 19bc9b1 commit 49fc1e4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
import com.palantir.logsafe.Preconditions;

public abstract class AbstractTransactionManager implements TransactionManager {
private static final Logger log = LoggerFactory.getLogger(AbstractTransactionManager.class);
private static final int GET_RANGES_QUEUE_SIZE_WARNING_THRESHOLD = 1000;

public static final Logger log = LoggerFactory.getLogger(AbstractTransactionManager.class);
final TimestampCache timestampValidationReadCache;
private volatile boolean closed = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

import java.util.function.Supplier;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.util.concurrent.MoreExecutors;
import com.palantir.atlasdb.cache.TimestampCache;
import com.palantir.atlasdb.cleaner.api.Cleaner;
Expand All @@ -42,6 +45,8 @@
import com.palantir.timestamp.TimestampService;

public final class ReadOnlyTransactionManager extends AbstractLockAwareTransactionManager {
private static final Logger log = LoggerFactory.getLogger(ReadOnlyTransactionManager.class);

private final MetricsManager metricsManager;
private final KeyValueService keyValueService;
private final TransactionService transactionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableSet;
import com.palantir.async.initializer.Callback;
Expand Down Expand Up @@ -55,6 +58,7 @@
import com.palantir.timestamp.TimestampService;

public class SerializableTransactionManager extends SnapshotTransactionManager {
private static final Logger log = LoggerFactory.getLogger(SerializableTransactionManager.class);

private final ConflictTracer conflictTracer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

import javax.validation.constraints.NotNull;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.codahale.metrics.Timer;
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -64,6 +67,8 @@
import com.palantir.timestamp.TimestampService;

/* package */ class SnapshotTransactionManager extends AbstractLockAwareTransactionManager {
private static final Logger log = LoggerFactory.getLogger(SnapshotTransactionManager.class);

private static final int NUM_RETRIES = 10;

final MetricsManager metricsManager;
Expand Down

0 comments on commit 49fc1e4

Please sign in to comment.