-
Notifications
You must be signed in to change notification settings - Fork 9
Staging helper #5406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staging helper #5406
Conversation
…tency Mlh 1240 custom metadata consistency
MLH-1275 remove other redis implementations
MLH-1277 v1 tag delete fix
int counter = 0; | ||
|
||
while (currentSize != expectedFieldKeys && counter++ < totalIterationsAllowed) { | ||
while (currentSize < expectedFieldKeys && counter++ < totalIterationsAllowed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Type-Def Cache Timeout and Loop Condition Issues
The type-def cache refresh may time out prematurely because totalIterationsAllowed
is hardcoded to 5, resulting in a 2.5-second wait instead of the intended 5 seconds. Additionally, the while
loop condition changed from !=
to <
, which means the refresh no longer waits or detects if the field key count exceeds the expected value.
CURRENT_CLASSIFICATION_TYPEDEF_INTERNAL_VERSION = Long.parseLong(redisService.getValue(Constants.TYPEDEF_CLASSIFICATION_METADATA_CACHE_LATEST_VERSION, "1")); | ||
CURRENT_STRUCT_TYPEDEF_INTERNAL_VERSION = Long.parseLong(redisService.getValue(Constants.TYPEDEF_STRUCT_CACHE_LATEST_VERSION, "1")); | ||
CURRENT_ENTITY_TYPEDEF_INTERNAL_VERSION = Long.parseLong(redisService.getValue(Constants.TYPEDEF_ENTITY_CACHE_LATEST_VERSION, "1")); | ||
CURRENT_RELATIONSHIP_TYPEDEF_INTERNAL_VERSION = Long.parseLong(redisService.getValue(Constants.TYPEDEF_RELATIONSHIP_CACHE_LATEST_VERSION, "1")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: High Availability Mode Initialization Bug
Static typedef internal version variables are only initialized from Redis when HA is disabled. In HA mode, they remain 0, leading to incorrect version comparisons and cache refresh logic failures. The initialization of these static variables also lacks synchronization, which could cause race conditions if init()
is called concurrently.
getLogger().error("Redis getValue operation failed for key: {}", key, e); | ||
throw e; | ||
} | ||
} |
There was a problem hiding this comment.
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.
No description provided.