Skip to content
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

[GOBBLIN-1907] Handle Lease Completion From Other Multi-active Participants #3771

Merged
merged 3 commits into from
Sep 14, 2023

Conversation

umustafi
Copy link
Contributor

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

  • Here are some details about my PR, including screenshots (if applicable):
    When other participants complete a lease (not just acquire it) in the time that the current participant has attempted the lease, we will see a NULL lease_acquisition_timestamp and should appropriately handle the resulting value. This case was missed and we were only expecting another participant to have acquired the lease. 
    We also add warning logs for JobExceptions that can be hiding the stack trace of errors encountered in runtime. 

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Tested behavior without change to see NPE and after updates the tests pass without any exceptions

Commits

  • 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":
    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"

@@ -17,8 +17,10 @@

package org.apache.gobblin.runtime.api;

import com.google.common.base.Optional;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use java Optional

(seems the original class under test mistakenly used the deprecated guava one... I presume it's not too difficult at this early stage to correct)

Copy link
Contributor Author

@umustafi umustafi Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the guava optional with the Java one in the MysqlMultiActiveLeaseArbiter[Test] but am leaving the other related classes as is for now. Will fix going forward.

@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2023

Codecov Report

Merging #3771 (22c6687) into master (d6f546e) will decrease coverage by 2.43%.
The diff coverage is 53.33%.

@@             Coverage Diff              @@
##             master    #3771      +/-   ##
============================================
- Coverage     49.74%   47.31%   -2.43%     
- Complexity     9438    10955    +1517     
============================================
  Files          1767     2152     +385     
  Lines         69294    85105   +15811     
  Branches       7888     9451    +1563     
============================================
+ Hits          34471    40271    +5800     
- Misses        31636    41186    +9550     
- Partials       3187     3648     +461     
Files Changed Coverage Δ
.../modules/scheduler/GobblinServiceJobScheduler.java 68.31% <0.00%> (-0.36%) ⬇️
...blin/runtime/api/MysqlMultiActiveLeaseArbiter.java 78.02% <66.66%> (-0.42%) ⬇️

... and 391 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@ZihanLi58 ZihanLi58 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ZihanLi58 ZihanLi58 merged commit d600b52 into apache:master Sep 14, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants