-
Notifications
You must be signed in to change notification settings - Fork 749
[GOBBLIN-1930] Improve Multi-active related logs and metrics #3800
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
00a26ee
Improve Multi-active related logs and metrics
e3bfa64
Add more metrics and logs around forwarding dag action to DagManager
d4c7c2f
Improve logs in response to review comments
fff6670
Replace flow execution id with trigger timestamp from multi-active
07ea65c
Update flow action execution id within lease arbiter
627e7ec
Fix test & make Lease Statuses more lean
afaedbe
Update javadoc
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,28 +79,42 @@ abstract class LeaseAttemptStatus {} | |
| class NoLongerLeasingStatus extends LeaseAttemptStatus {} | ||
|
|
||
| /* | ||
| The participant calling this method acquired the lease for the event in question. The class contains the | ||
| `eventTimestamp` associated with the lease as well as the time the caller obtained the lease or | ||
| `leaseAcquisitionTimestamp`. | ||
| The participant calling this method acquired the lease for the event in question. `Flow action`'s flow execution id | ||
| is the timestamp associated with the lease and the time the caller obtained the lease is stored within the | ||
| `leaseAcquisitionTimestamp` field. | ||
| */ | ||
| @Data | ||
| class LeaseObtainedStatus extends LeaseAttemptStatus { | ||
| private final DagActionStore.DagAction flowAction; | ||
| private final long eventTimestamp; | ||
| private final long leaseAcquisitionTimestamp; | ||
|
|
||
| /** | ||
| * Returns event time in millis since epoch for the event of this lease acquisition. | ||
| * @return | ||
|
umustafi marked this conversation as resolved.
Outdated
|
||
| */ | ||
| public long getEventTimeMillis() { | ||
| return Long.parseLong(flowAction.getFlowExecutionId()); | ||
| } | ||
| } | ||
|
|
||
| /* | ||
| This flow action event already has a valid lease owned by another participant. | ||
| `eventTimeMillis` is the timestamp the lease is associated with, which may be a different timestamp for the same flow | ||
| action corresponding to the same instance of the event or a distinct one. | ||
| `Flow action`'s flow execution id is the timestamp the lease is associated with, which may be a different timestamp | ||
| for the same flow action corresponding to the same instance of the event or a distinct one. | ||
|
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. somewhat confusing, "which may be a different timestamp for the same..." - reword?
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. tried to reword lmk what u think |
||
| `minimumLingerDurationMillis` is the minimum amount of time to wait before this participant should return to check if | ||
| the lease has completed or expired | ||
| */ | ||
| @Data | ||
| class LeasedToAnotherStatus extends LeaseAttemptStatus { | ||
| private final DagActionStore.DagAction flowAction; | ||
| private final long eventTimeMillis; | ||
| private final long minimumLingerDurationMillis; | ||
|
|
||
| /** | ||
| * Returns event time in millis since epoch for the event whose lease was obtained by another participant. | ||
| * @return | ||
| */ | ||
| public long getEventTimeMillis() { | ||
| return Long.parseLong(flowAction.getFlowExecutionId()); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this would better belong as a method of the
DagActionclass defined on line 39There 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.
this is included as a method of the class, it's static because it returns a new dagAction obj