Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f070e24
MLH-1240 improve refresh logic, reduce retry count and wait time
sriram-atlan Sep 15, 2025
3a6b41a
MLH-1240 use version number to decide to invoke typedef cache refresh…
sriram-atlan Sep 15, 2025
41df3cd
MLH-1240 reload only business metadata
sriram-atlan Sep 15, 2025
7c3e04e
MLH-1240 increment internal cache version
sriram-atlan Sep 15, 2025
248ea12
MLH-1240 reload business and classification typedef
sriram-atlan Sep 15, 2025
28e84d9
MLH-1240 use consistent version and reload if necessary in all typede…
sriram-atlan Sep 15, 2025
1a6c6f0
MLH-1240 update cache when current version is less than redis version
sriram-atlan Sep 15, 2025
887ddc6
MLH-1240 refresh custom types always (wip testing)
sriram-atlan Sep 16, 2025
b42fdbf
MLH-1240 refresh enum and always read from transient registry
sriram-atlan Sep 16, 2025
cb8c0ab
MLH-1240 track version for all custom types to load them independently
sriram-atlan Sep 16, 2025
b91db52
MLH-1240 commit update
sriram-atlan Sep 16, 2025
ce513e4
MLH-1240 clear that type of atlas typedef and reload to handle delete…
sriram-atlan Sep 17, 2025
0cf1155
MLH-1240 add struct, enum and relationship def and refactor cache ref…
sriram-atlan Sep 17, 2025
7e06e58
Merge pull request #5380 from atlanhq/mlh-1240-custom-metadata-consis…
sriram-atlan Sep 18, 2025
34f72fe
remove other redis implementations
sriram-atlan Sep 18, 2025
aff2023
Merge pull request #5400 from atlanhq/fix-redis-wiring
sriram-atlan Sep 19, 2025
16da29d
MLH-1277 fix for delete tags correctly
sriram-atlan Sep 19, 2025
bf37bc7
MLH-1277 branch to build
sriram-atlan Sep 19, 2025
adff2bb
Merge pull request #5403 from atlanhq/1277-master
sriram-atlan Sep 19, 2025
3e6c3c9
Merge branch 'master' into staging-helper
nikhilbonte21 Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,13 @@ public enum SupportedFileExtensions { XLSX, XLS, CSV }
add(STAKEHOLDER_TITLE_ENTITY_TYPE);
}};

public static final String TYPEDEF_ENUM_CACHE_LATEST_VERSION = "typdef.enum.cache.version";
public static final String TYPEDEF_BUSINESS_METADATA_CACHE_LATEST_VERSION = "typdef.bm.cache.version";
public static final String TYPEDEF_CLASSIFICATION_METADATA_CACHE_LATEST_VERSION = "typdef.cls.cache.version";
public static final String TYPEDEF_STRUCT_CACHE_LATEST_VERSION = "typdef.struct.cache.version";
public static final String TYPEDEF_ENTITY_CACHE_LATEST_VERSION = "typdef.entity.cache.version";
public static final String TYPEDEF_RELATIONSHIP_CACHE_LATEST_VERSION = "typdef.relationship.cache.version";

private Constants() {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.apache.atlas.service;

import org.apache.atlas.service.redis.NoRedisServiceImpl;
import org.apache.atlas.service.redis.RedisService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeansException;
Expand Down Expand Up @@ -106,10 +105,6 @@ public void initialize() throws InterruptedException {
private void validateDependencies() {
LOG.info("Validating FeatureFlagStore dependencies...");
try {
if (redisService instanceof NoRedisServiceImpl) {
return;
}

// Test Redis connectivity with a simple operation
String testKey = "ff:_health_check";
redisService.putValue(testKey, "test");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.apache.atlas.service.metrics.MetricUtils;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
Expand Down Expand Up @@ -191,6 +192,22 @@ public String getValue(String key) {
}
}

@Override
public String getValue(String key, String defaultValue) {
try {
String value = getValue(key);
if (StringUtils.isEmpty(value)) {
return defaultValue;
} else {
return value;
}
} catch (Exception e) {
MetricUtils.recordRedisConnectionFailure();
getLogger().error("Redis getValue operation failed for key: {}", key, e);
throw e;
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Method Fails Safe Fallback, Causes Duplicate Metrics

The getValue(key, defaultValue) method re-throws exceptions instead of returning the defaultValue when an error occurs, defeating its purpose as a safe fallback. This also leads to duplicated metric recording and error logging, as the inner getValue(key) call already handles these.

Fix in Cursor Fix in Web


@Override
public String putValue(String key, String value) {
try {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public interface RedisService {

String getValue(String key);

String getValue(String key, String defaultValue);

String putValue(String key, String value);

String putValue(String key, String value, int timeout);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.apache.atlas.service.redis;

import org.apache.atlas.AtlasException;
import org.apache.atlas.annotation.ConditionalOnAtlasProperty;
import org.apache.atlas.service.metrics.MetricUtils;
import org.redisson.Redisson;
import org.slf4j.Logger;
Expand All @@ -13,9 +12,8 @@
import javax.annotation.PostConstruct;

@Component
@ConditionalOnAtlasProperty(property = "atlas.redis.service.impl")
@Order(Ordered.HIGHEST_PRECEDENCE)
public class RedisServiceImpl extends AbstractRedisService{
public class RedisServiceImpl extends AbstractRedisService {

private static final Logger LOG = LoggerFactory.getLogger(RedisServiceImpl.class);
private static final long RETRY_DELAY_MS = 1000L;
Expand Down

This file was deleted.

Loading
Loading