agam-99 opened a new pull request, #4191:
URL: https://github.com/apache/gobblin/pull/4191

   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
     - [ ] My PR addresses the following [Gobblin 
JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references 
them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
         - JIRA to be filed; happy to retitle once assigned.
   
   
     ### Description
     - [x] Here are some details about my PR, including screenshots (if 
applicable):
   
     Downstream executors (e.g., a GridGateway producer that submits jobs after 
`LaunchDagProc`) cannot today measure the true end-to-end latency from when a 
LAUNCH `DagAction` row landed in the `dag_action` store to when the executor 
accepts the job, because that source timestamp is not propagated onto the 
`JobSpec` config. The two existing anchors fall short:
   
     - `flow.executionId` is set to `System.currentTimeMillis()` at 
REST-handler time for ad-hoc flows (close enough), but for scheduled flows it 
is rewritten by `MysqlMultiActiveLeaseArbiter` to the post-CDC consensus DB 
timestamp — silently skipping CDC propagation latency.
     - `LeaseParams.eventTimeMillis` is stamped at change-monitor consume time 
(`System.currentTimeMillis()` in the one-arg constructor at 
`DagActionStore.java:118-120`) — also after CDC.
   
     **Change:**
     - Adds an optional `dbUpdateTimeMillis` field to the 
`DagActionStoreChangeEvent` Avro schema so MySQL CDC producers can carry the 
binlog event timestamp (true row-modification time) across the kafka hop. 
Optional (`["null","long"]`, default `null`) for backwards compatibility — 
older producers continue to work unchanged.
     - Adds `storeInsertTimeMillis` to `DagActionStore.LeaseParams` with a 
sentinel `UNKNOWN_STORE_INSERT_TIME_MILLIS = -1L` for callers that do not have 
it. All existing constructors continue to work; a new four-arg constructor 
accepts the timestamp.
     - Adds `DAG_ACTION_LAUNCH_STORE_INSERT_TIME_MILLIS_KEY = 
"dagAction.launch.storeInsertTimeMillis"` to `ConfigurationKeys`.
     - `LaunchDagProc.initialize()` stamps the value onto the `FlowSpec` config 
when the carrier `LeaseParams` provides one (skipping it when 
`UNKNOWN_STORE_INSERT_TIME_MILLIS`), alongside the existing 
`FLOW_EXECUTION_ID_KEY` stamp.
     - `DagTask` exposes the consensus `LeaseParams` via `getLeaseParams()` so 
`DagProc` subclasses can read per-event metadata.
   
     The PR is plumbing-only: it does not change which timestamp is consumed by 
`MultiActiveLeaseArbiter`, lease consensus semantics, or any existing behavior. 
Downstream consumers can opt in by reading the new JobSpec key; absence is 
fully backwards-compatible.
   
   
     ### Tests
     - [x] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   
     This change is pure pass-through plumbing on an optional field. The Avro 
field is exercised by the generated builder/setter on schema regeneration; 
`LaunchDagProc` only writes the key when the value is non-sentinel, and 
existing tests construct `LeaseParams` via the legacy constructors which 
default to `UNKNOWN_STORE_INSERT_TIME_MILLIS`, so they remain valid. Downstream 
behavioral tests (anchor-precedence, large-latency, scheduled vs ad-hoc) live 
in the consumer side (LinkedIn-internal ddm-common). I'm happy to add a small 
`LaunchDagProcTest` case asserting the stamp is added iff the lease params 
carry a non-sentinel value if reviewers prefer.
   
   
     ### Commits
   
     - [x] My commits all reference JIRA issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)":
         1. Subject is separated from body by a blank line
         2. Subject is limited to 50 characters
         3. Subject does not end with a period
         4. Subject uses the imperative mood ("add", not "adding")
         5. Body wraps at 72 characters
         6. Body explains "what" and "why", not "how"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to