GOBBLIN-2263: Refresh DagAction latency anchor#4198
Merged
Blazer-007 merged 1 commit intoJun 1, 2026
Conversation
1f9e13a to
5bc0ce0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes inflated “launch latency” metrics for downstream jobs in multi-hop DAGs by refreshing the dagAction.launch.storeInsertTimeMillis anchor on each JobSpec immediately before submission, using the current DagTask lease metadata.
Changes:
- Add
DagProcUtils.submitNextNodes(...)/submitJobToExecutor(...)overloads that acceptLeaseParams, and stampJobSpecconfig +configAsPropertiesbeforeproducer.addSpec(jobSpec). - Update
LaunchDagProc,ReevaluateDagProc, andResumeDagProcto pass their currentLeaseParamsinto the submission path. - Add unit tests verifying stale timestamps are replaced in both the
JobSpecconfig and properties during submission.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java |
Adds lease-aware submission overloads and stamps JobSpec with current store-insert time prior to executor submission. |
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/LaunchDagProc.java |
Passes current lease params into submitNextNodes so initial job submissions use the fresh anchor. |
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/ReevaluateDagProc.java |
Passes current lease params into job (re)submission and downstream node submission to keep anchors fresh. |
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/ResumeDagProc.java |
Passes current lease params into submitNextNodes when resuming a failed DAG. |
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtilsTest.java |
Adds a test asserting stale store-insert time is replaced in config + properties before submission. |
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/ReevaluateDagProcTest.java |
Refactors task construction and adds REEVALUATE-path coverage for replacing stale store-insert timestamps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4198 +/- ##
============================================
+ Coverage 43.26% 51.23% +7.96%
- Complexity 2583 6235 +3652
============================================
Files 516 1102 +586
Lines 22087 43000 +20913
Branches 2505 4841 +2336
============================================
+ Hits 9557 22032 +12475
- Misses 11566 19132 +7566
- Partials 964 1836 +872 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Stamp each submitted job with the current DagAction store insert time so the launch latency metric measures per-action queueing rather than elapsed DAG runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
5bc0ce0 to
fd239ac
Compare
Blazer-007
approved these changes
Jun 1, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
GaaS launch latency is emitted when each job is submitted to the executor. The metric reads its anchor from
dagAction.launch.storeInsertTimeMillisin the submittedJobSpec.For multi-hop DAGs, downstream
REEVALUATEDagActions already have fresh store-insert timestamps, but the downstreamJobSpecs still carried the original flowLAUNCHtimestamp from compilation time. As a result, downstream jobs reportedjob submission time - original flow launch time, which made normal long-running DAG progress look like multi-minute or multi-hour launch latency.This PR refreshes
dagAction.launch.storeInsertTimeMillison theJobSpecimmediately before each job submission using the currentDagTasklease params. That makes the metric measurejob submission time - current DagAction insert timefor both initial LAUNCH jobs and downstream REEVALUATE/RESUME jobs.Implementation details:
DagProcUtilsreplaces staledagAction.launch.storeInsertTimeMillisin bothJobSpecconfig andconfigAsPropertiesbeforeproducer.addSpec(jobSpec).LaunchDagProc,ReevaluateDagProc, andResumeDagProcpass their currentLeaseParamsinto the submission path.Tests
DagProcUtilsTest.testSubmitJobToExecutorReplacesStaleStoreInsertTimeMillisto verify stale anchors are replaced in bothJobSpecconfig and properties before submission.ReevaluateDagProcTest.testCurrentJobToRunReplacesStaleStoreInsertTimeMillisto cover the downstream REEVALUATE path.JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_282-msft.jdk/Contents/Home" ./gradlew :gobblin-service:test --tests "org.apache.gobblin.service.modules.orchestration.proc.DagProcUtilsTest"git diff --check origin/master...HEADJAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_282-msft.jdk/Contents/Home" ./gradlew :gobblin-service:test --tests "org.apache.gobblin.service.modules.orchestration.proc.DagProcUtilsTest" --tests "org.apache.gobblin.service.modules.orchestration.proc.ReevaluateDagProcTest" --tests "org.apache.gobblin.service.modules.orchestration.proc.LaunchDagProcTest"; the suite compiled but failed duringTestMetastoreDatabaseFactorysetup because Docker/Testcontainers is not available in this environment.mint buildnot applicable: this checkout is not a LinkedIn multiproduct directory.Commits
Made with Cursor