Skip to content

Commit

Permalink
bugfix redis collector create too many instance case oom (#734)
Browse files Browse the repository at this point in the history
  bugfix redis collector create too many instance

  bugfix redis collector create too many instance

  bugfix redis collector create too many instance
  • Loading branch information
tomsun28 authored Mar 14, 2023
1 parent 693e379 commit 93d21b5
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.usthe.collector.collect.common.cache;

import io.lettuce.core.api.StatefulConnection;
import io.lettuce.core.api.StatefulRedisConnection;
import lombok.extern.slf4j.Slf4j;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Optional;

import com.mongodb.MongoServerUnavailableException;
import com.mongodb.MongoTimeoutException;
import com.usthe.collector.collect.common.cache.CacheIdentifier;
import com.usthe.collector.collect.common.cache.CommonCache;
import com.usthe.collector.collect.common.cache.MongodbConnect;
Expand Down Expand Up @@ -116,7 +117,7 @@ public void collect(Builder builder, long appId, String app, Metrics metrics) {
}
fillBuilder(metrics, valueRowBuilder, document);
builder.addValues(valueRowBuilder.build());
} catch (MongoServerUnavailableException unavailableException) {
} catch (MongoServerUnavailableException | MongoTimeoutException unavailableException) {
builder.setCode(CollectRep.Code.UN_CONNECTABLE);
String message = CommonUtil.getMessageFromThrowable(unavailableException);
builder.setMsg(message);
Expand Down

This file was deleted.

Loading

0 comments on commit 93d21b5

Please sign in to comment.