Skip to content

Commit

Permalink
Merge pull request #228 from aiven/ivanyu/rsm-close-log
Browse files Browse the repository at this point in the history
Log errors on closing metrics
  • Loading branch information
jeqo committed May 16, 2023
2 parents 229f089 + 957ae97 commit 1ff77a4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.kafka.server.log.remote.storage.RemoteStorageManager.IndexType.LEADER_EPOCH;
import static org.apache.kafka.server.log.remote.storage.RemoteStorageManager.IndexType.OFFSET;
Expand All @@ -70,6 +72,8 @@
import static org.apache.kafka.server.log.remote.storage.RemoteStorageManager.IndexType.TRANSACTION;

public class UniversalRemoteStorageManager implements RemoteStorageManager {
private static final Logger log = LoggerFactory.getLogger(UniversalRemoteStorageManager.class);

private final Metrics metrics;
private final Sensor segmentCopyPerSec;

Expand Down Expand Up @@ -274,7 +278,7 @@ public void close() {
try {
metrics.close();
} catch (final Exception e) {
// TODO log
log.warn("Error while closing metrics", e);
}
}
}

0 comments on commit 1ff77a4

Please sign in to comment.