-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
|
||
@Override | ||
public List<EventHandler> getAllEventHandlers() { | ||
return cassandraEventHandlerDAO.getAllEventHandlers(); |
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.
Not reading from cache first?
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.
Done
|
||
@Override | ||
public List<EventHandler> getEventHandlersForEvent(String event, boolean activeOnly) { | ||
return cassandraEventHandlerDAO.getEventHandlersForEvent(event, activeOnly); |
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.
read from cache first?
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.
Done
return cassandraMetadataDAO.getAllWorkflowDefs(); | ||
} | ||
|
||
private void refreshTaskDefsCache() { |
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.
Does @trace create metrics for this method call as well?
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.
If not, we can add a metrics to the getAllTaskDefsFromDB
method of CassdrandMetaDataDao
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.
LOGGER.error("refresh TaskDefs failed ", e); | ||
} | ||
} | ||
|
||
private TaskDef getTaskDefFromDB(String name) { |
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.
Add taskdefname tag to the metric?
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.
added
Pull Request type
./gradlew generateLock saveLock
to refresh dependencies)NOTE: Please remember to run
./gradlew spotlessApply
to fix any format violations.Changes in this PR
Caches for CassandraMetadataDAO and CassandraEventHandlerDAO are extracted into decorators, CacheableMetadataDAO and CacheableEventHandlerDAO respectively
Issue: Including cache within the DAO makes it impossible to opt-out of it.
Alternatives considered
None