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 committed Mar 10, 2024
1 parent 07ea9a6 commit d26dbd5
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 d26dbd5

Please sign in to comment.