You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "umustafi (via GitHub)" <gi...@apache.org> on 2024/07/16 20:15:21 UTC
[PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
umustafi opened a new pull request, #4004:
URL: https://github.com/apache/gobblin/pull/4004
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
- [X] 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"
- https://issues.apache.org/jira/browse/GOBBLIN-2113
### Description
- [X] Here are some details about my PR, including screenshots (if applicable):
After changing `flowExecutionId` from a Str to a long in a previous PR, we encounter `NumberFormatException` in the `DagActionStoreChangeMonitor` when processing HB events. This ends up killing the `HighLevelConsumer` queues for the hosts that receive the HB events in their partition.
```
{{Encountered exception while processing record so stopping queue processing. Record: LiKafka10ConsumerRecord(consumerRecord=ConsumerRecord(topic = ds_mysql_makto-db-152_prod_SHARED_GOBBLIN_DAG_ACTION_STORE_20221208211255, partition = 0, leaderEpoch = null, offset = 905733, NoTimestampType = -1, serialized key size = -1, serialized value size = -1, headers = RecordHeaders(headers = [], isReadOnly = false), key = , value = {"changeEventIdentifier":
{"key": "", "txId": "", "produceTimestampMillis": 1721078158347, "operationType": "HEARTBEAT"}
, "flowGroup": "", "flowName": "", "flowExecutionId": "", "jobName": "", "dagAction": null})) Exception: java.lang.NumberFormatException: For input string: ""}}
```
### Tests
- [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
Updates the following unit test for Heartbeat (HB) events which was using valid flow names, groups, and flowExecutionId for HB event that did not accurately reflect a HB event received from CDC. After updating its values the test failed locally
```
Gradle suite > Gradle test > org.apache.gobblin.runtime.DagActionStoreChangeMonitorTest > testProcessMessageWithHeartbeatAndNullDagAction FAILED
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:601)
at java.lang.Long.parseLong(Long.java:631)
at org.apache.gobblin.service.monitoring.DagActionStoreChangeMonitor.processMessage(DagActionStoreChangeMonitor.java:203)
at org.apache.gobblin.runtime.DagActionStoreChangeMonitorTest$MockDagActionStoreChangeMonitor.processMessageForTest(DagActionStoreChangeMonitorTest.java:97)
at org.apache.gobblin.runtime.DagActionStoreChangeMonitorTest.testProcessMessageWithHeartbeatAndNullDagAction(DagActionStoreChangeMonitorTest.java:139)
Failed tests:
[org.apache.gobblin.runtime.DagActionStoreChangeMonitorTest::testProcessMessageWithHeartbeatAndNullDagAction
```
It passes after the update.
### 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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo commented on code in PR #4004:
URL: https://github.com/apache/gobblin/pull/4004#discussion_r1680136542
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/utils/FlowCompilationValidationHelper.java:
##########
@@ -112,20 +112,26 @@ public Optional<Dag<JobExecutionPlan>> createExecutionPlanIfValid(FlowSpec flowS
TimingEvent flowCompilationTimer = new TimingEvent(this.eventSubmitter, TimingEvent.FlowTimings.FLOW_COMPILED);
Map<String, String> flowMetadata = TimingEventUtils.getFlowMetadata(flowSpec);
- Optional<Dag<JobExecutionPlan>> jobExecutionPlanDagOptional =
- validateAndHandleConcurrentExecution(flowConfig, flowSpec, flowGroup, flowName, flowMetadata);
- if (!jobExecutionPlanDagOptional.isPresent()) {
- return Optional.absent();
- }
+ try {
+ Optional<Dag<JobExecutionPlan>> jobExecutionPlanDagOptional =
+ validateAndHandleConcurrentExecution(flowConfig, flowSpec, flowGroup, flowName, flowMetadata);
- if (jobExecutionPlanDagOptional.get().isEmpty()) {
- populateFlowCompilationFailedEventMessage(eventSubmitter, flowSpec, flowMetadata);
- return Optional.absent();
- }
+ if (!jobExecutionPlanDagOptional.isPresent()) {
+ return Optional.absent();
+ }
+
+ if (jobExecutionPlanDagOptional.get().isEmpty()) {
+ populateFlowCompilationFailedEventMessage(eventSubmitter, flowSpec, flowMetadata);
+ return Optional.absent();
+ }
- flowCompilationTimer.stop(flowMetadata);
- return jobExecutionPlanDagOptional;
+ flowCompilationTimer.stop(flowMetadata);
+ return jobExecutionPlanDagOptional;
+ } catch (IOException e) {
+ log.error("Encountered exception when attempting to compile and perform checks for flow: {}", flowSpec);
Review Comment:
If you want to log this out maybe only print out the flowspec IDs
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo commented on code in PR #4004:
URL: https://github.com/apache/gobblin/pull/4004#discussion_r1680136134
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/utils/FlowCompilationValidationHelper.java:
##########
@@ -112,20 +112,26 @@ public Optional<Dag<JobExecutionPlan>> createExecutionPlanIfValid(FlowSpec flowS
TimingEvent flowCompilationTimer = new TimingEvent(this.eventSubmitter, TimingEvent.FlowTimings.FLOW_COMPILED);
Map<String, String> flowMetadata = TimingEventUtils.getFlowMetadata(flowSpec);
- Optional<Dag<JobExecutionPlan>> jobExecutionPlanDagOptional =
- validateAndHandleConcurrentExecution(flowConfig, flowSpec, flowGroup, flowName, flowMetadata);
- if (!jobExecutionPlanDagOptional.isPresent()) {
- return Optional.absent();
- }
+ try {
Review Comment:
Do we still want the try/catch here?
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on PR #4004:
URL: https://github.com/apache/gobblin/pull/4004#issuecomment-2231920866
checks on my branch https://github.com/umustafi/gobblin/pull/34
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #4004:
URL: https://github.com/apache/gobblin/pull/4004#issuecomment-2231794218
## [Codecov](https://app.codecov.io/gh/apache/gobblin/pull/4004?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 38.72%. Comparing base [(`b44a91e`)](https://app.codecov.io/gh/apache/gobblin/commit/b44a91ea69dded11fc2229237026a575ec94603a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`36a3f58`)](https://app.codecov.io/gh/apache/gobblin/commit/36a3f58b45a1faf1fd6fdcafb738ab7b5f579139?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 4 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #4004 +/- ##
=========================================
Coverage 38.72% 38.72%
Complexity 1596 1596
=========================================
Files 388 388
Lines 15957 15957
Branches 1578 1578
=========================================
Hits 6180 6180
Misses 9283 9283
Partials 494 494
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/gobblin/pull/4004?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #4004:
URL: https://github.com/apache/gobblin/pull/4004#discussion_r1680103982
##########
gobblin-modules/gobblin-kafka-09/src/test/java/org/apache/gobblin/runtime/DagActionStoreChangeMonitorTest.java:
##########
@@ -150,7 +150,7 @@ public void testProcessMessageWithHeartbeatAndNullDagAction() throws SpecNotFoun
@Test (dependsOnMethods = "testProcessMessageWithHeartbeatAndNullDagAction")
public void testProcessMessageWithHeartbeatAndFlowInfo() throws SpecNotFoundException {
Kafka09ConsumerClient.Kafka09ConsumerRecord consumerRecord =
- wrapDagActionStoreChangeEvent(OperationType.HEARTBEAT, FLOW_GROUP, FLOW_NAME, FLOW_EXECUTION_ID, DagActionValue.RESUME);
+ wrapDagActionStoreChangeEvent(OperationType.HEARTBEAT, "", "", "", DagActionValue.RESUME);
Review Comment:
Not a real case but wanted to check some edge case behavior
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "arjun4084346 (via GitHub)" <gi...@apache.org>.
arjun4084346 commented on code in PR #4004:
URL: https://github.com/apache/gobblin/pull/4004#discussion_r1680044655
##########
gobblin-modules/gobblin-kafka-09/src/test/java/org/apache/gobblin/runtime/DagActionStoreChangeMonitorTest.java:
##########
@@ -150,7 +150,7 @@ public void testProcessMessageWithHeartbeatAndNullDagAction() throws SpecNotFoun
@Test (dependsOnMethods = "testProcessMessageWithHeartbeatAndNullDagAction")
public void testProcessMessageWithHeartbeatAndFlowInfo() throws SpecNotFoundException {
Kafka09ConsumerClient.Kafka09ConsumerRecord consumerRecord =
- wrapDagActionStoreChangeEvent(OperationType.HEARTBEAT, FLOW_GROUP, FLOW_NAME, FLOW_EXECUTION_ID, DagActionValue.RESUME);
+ wrapDagActionStoreChangeEvent(OperationType.HEARTBEAT, "", "", "", DagActionValue.RESUME);
Review Comment:
is this a real case? can a heartbeat message not have flow name and have dag action?
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2113] Process Heartbeat DagAction CDC messages with empty FlowExecutionId str [gobblin]
Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo merged PR #4004:
URL: https://github.com/apache/gobblin/pull/4004
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org