phet commented on code in PR #3899:
URL: https://github.com/apache/gobblin/pull/3899#discussion_r1540592313


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/api/MultiActiveLeaseArbiter.java:
##########
@@ -117,12 +117,16 @@ public long getEventTimeMillis() {
     }
 
     /**
-     * Completes the lease referenced by this status object if it has not 
expired.
+     * Completes the lease referenced by this status object if it has not 
expired. Defaults to true if no lease arbiter
+     * to complete lease on.
      * @return true if able to complete lease, false otherwise.
      * @throws IOException
      */
     public boolean completeLease() throws IOException {
-      return multiActiveLeaseArbiter.recordLeaseSuccess(this);
+      if (multiActiveLeaseArbiter != null) {

Review Comment:
   actually, sorry, I don't understand how we'd ever have a lease w/o a real 
MALA attached?
   
   if this arose from a desire to "mock" `LeaseObtainedStatus` for a 
"no-op"/always-true MALA impl, I'd suggest instead having that impl nonetheless 
pass itself (`this`) as the MALA param, but if need be override its own 
`recordLeaseSuccess`



-- 
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