-
Notifications
You must be signed in to change notification settings - Fork 749
Emit metric to tune LeaseArbiter Linger metric #3824
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,6 +80,7 @@ public class FlowTriggerHandler { | |
| private ContextAwareCounter jobDoesNotExistInSchedulerCount; | ||
| private ContextAwareCounter failedToSetEventReminderCount; | ||
| private ContextAwareMeter leasesObtainedDueToReminderCount; | ||
| private ContextAwareMeter failedPersistingLeaseCount; | ||
|
|
||
| @Inject | ||
| public FlowTriggerHandler(Config config, Optional<MultiActiveLeaseArbiter> leaseDeterminationStore, | ||
|
|
@@ -98,6 +99,7 @@ public FlowTriggerHandler(Config config, Optional<MultiActiveLeaseArbiter> lease | |
| this.jobDoesNotExistInSchedulerCount = this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_JOB_DOES_NOT_EXIST_COUNT); | ||
| this.failedToSetEventReminderCount = this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_FAILED_TO_SET_REMINDER_COUNT); | ||
| this.leasesObtainedDueToReminderCount = this.metricContext.contextAwareMeter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_LEASES_OBTAINED_DUE_TO_REMINDER_COUNT); | ||
| this.failedPersistingLeaseCount = this.metricContext.contextAwareMeter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_FAILED_PERSISTING_LEASE_COUNT); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -129,6 +131,7 @@ public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction flo | |
| leaseObtainedStatus.getEventTimeMillis()); | ||
| return; | ||
| } | ||
| this.failedPersistingLeaseCount.mark(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shall we also have a meter for success? or are you planning to compute from (successfullyObtained - failedToRecord/Persist)?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch there are only logs for this so adding a metric. |
||
| // If persisting the flow action failed, then we set another trigger for this event to occur immediately to | ||
| // re-attempt handling the event | ||
| scheduleReminderForEvent(jobProps, | ||
|
|
||
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.
nit: the MALeaseArbiter API name is
recordLeaseSuccess... seems more consistent to titlefailedToRecordLeaseSuccessCount