Skip to content

Commit

Permalink
feat: just add few logs and connection limit
Browse files Browse the repository at this point in the history
  • Loading branch information
sumandas0 committed Nov 8, 2024
1 parent a7844cf commit 06322d3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ Config getProdConfig() throws AtlasException {
config.useSentinelServers()
.setClientName(ATLAS_METASTORE_SERVICE)
.setReadMode(ReadMode.MASTER_SLAVE)
.setCheckSentinelsList(true)
.setCheckSentinelsList(false)
.setKeepAlive(true)
.setMasterConnectionMinimumIdleSize(10)
.setMasterConnectionPoolSize(20)
.setSlaveConnectionMinimumIdleSize(10)
.setSlaveConnectionPoolSize(20)
.setMasterConnectionMinimumIdleSize(2)
.setMasterConnectionPoolSize(5)
.setSlaveConnectionMinimumIdleSize(2)
.setSlaveConnectionPoolSize(5)
.setMasterName(atlasConfig.getString(ATLAS_REDIS_MASTER_NAME))
.addSentinelAddress(formatUrls(atlasConfig.getStringArray(ATLAS_REDIS_SENTINEL_URLS)))
.setUsername(atlasConfig.getString(ATLAS_REDIS_USERNAME))
Expand All @@ -149,12 +149,12 @@ Config getCacheImplConfig() {
config.useSentinelServers()
.setClientName(ATLAS_METASTORE_SERVICE+"-redisCache")
.setReadMode(ReadMode.MASTER_SLAVE)
.setCheckSentinelsList(true)
.setCheckSentinelsList(false)
.setKeepAlive(true)
.setMasterConnectionMinimumIdleSize(10)
.setMasterConnectionPoolSize(20)
.setMasterConnectionPoolSize(2)
.setSlaveConnectionMinimumIdleSize(10)
.setSlaveConnectionPoolSize(20)
.setSlaveConnectionPoolSize(2)
.setMasterName(atlasConfig.getString(ATLAS_REDIS_MASTER_NAME))
.addSentinelAddress(formatUrls(atlasConfig.getStringArray(ATLAS_REDIS_SENTINEL_URLS)))
.setUsername(atlasConfig.getString(ATLAS_REDIS_USERNAME))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public class RedisServiceImpl extends AbstractRedisService{

@PostConstruct
public void init() throws AtlasException {
LOG.info("Starting prod lock redisson client");
redisClient = Redisson.create(getProdConfig());
LOG.info("Starting prod cache redisson client");
redisCacheClient = Redisson.create(getCacheImplConfig());
LOG.info("Sentinel redis client created successfully.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public TypeCacheRefresher(final IAtlasGraphProvider provider) {

@PostConstruct
public void init() throws AtlasException {
LOG.info("Starting type cache refresher");
Configuration configuration = ApplicationProperties.get();
this.cacheRefresherEndpoint = configuration.getString("atlas.server.type.cache-refresher");
this.cacheRefresherHealthEndpoint = configuration.getString("atlas.server.type.cache-refresher-health");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public TaskFactoryRegistry(TaskManagement taskManagement, Set<TaskFactory> facto

@PostConstruct
public void startTaskManagement() throws AtlasException {
LOG.info("Starting task management post-construct");
try {
if (taskManagement.isWatcherActive()) {
LOG.info("TaskFactoryRegistry: TaskManagement already started!");
Expand Down

1 comment on commit 06322d3

@sriram-atlan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sumandas0 - Can you add timeout & connectionTimeout explicitly? Also parameterize the redis min and max pool size with default values if not provided ?

Please sign in to comment.