[ https://issues.apache.org/jira/browse/GOBBLIN-2173?focusedWorklogId=944165&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-944165 ]
ASF GitHub Bot logged work on GOBBLIN-2173: ------------------------------------------- Author: ASF GitHub Bot Created on: 18/Nov/24 18:43 Start Date: 18/Nov/24 18:43 Worklog Time Spent: 10m Work Description: phet commented on code in PR #4076: URL: https://github.com/apache/gobblin/pull/4076#discussion_r1847013522 ########## gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MultiActiveLeaseArbiter.java: ########## @@ -61,6 +61,17 @@ public interface MultiActiveLeaseArbiter { LeaseAttemptStatus tryAcquireLease(DagActionStore.LeaseParams leaseParams, boolean adoptConsensusFlowExecutionId) throws IOException; + /** + * This method checks if lease can be acquired on provided flow in lease params + * returns true if entry for the same flow does not exists within epsilon time + * in leaseArbiterStore, else returns false + * @param leaseParams uniquely identifies the flow, the present action upon it, the time the action + * was triggered, and if the dag action event we're checking on is a reminder event + * @return true if lease can be acquired on the flow passed in the lease params, false otherwise + */ + boolean isLeaseAcquirable(DagActionStore.LeaseParams leaseParams) Review Comment: the method name itself suggests a pre-check capability (e.g. first check whether it's acquirable and if so, then `tryAcquireLease`... being assured of success). of course, because check-then-act patterns are susceptible to race conditions, we'd never actually provide such an API - let's not confuse anyone! how about `boolean existsSimilarLeaseWithinConsolidationPeriod(LeaseParams)`? (or `existsEquivalentLeaseWithinConsolidationPeriod`) Issue Time Tracking ------------------- Worklog Id: (was: 944165) Time Spent: 1.5h (was: 1h 20m) > Adhoc flows are not being deleted from GaaS FlowSpec store > ---------------------------------------------------------- > > Key: GOBBLIN-2173 > URL: https://issues.apache.org/jira/browse/GOBBLIN-2173 > Project: Apache Gobblin > Issue Type: Bug > Components: gobblin-service > Reporter: Abhishek Jain > Assignee: Abhishek Tiwari > Priority: Critical > Time Spent: 1.5h > Remaining Estimate: 0h > > In GaaS, we store adhoc flows temporarily in our flowspec DB in order to > persist them in service restart/failover scenarios. However, it is expected > that once these flows are kicked off/ forwarded to the DagProcEngine, they > need to be removed from our flowspec db. > This is currently not consistently happening, there seems to be some edge > case(s) where they are persisted in the db. This can be fatal for users such > as DIL that run adhoc flows using the same flowgroup/flowname consistently, > which will lead to their flows being stuck. We need to find which edge cases > are not handling the flow spec deletion properly. -- This message was sent by Atlassian Jira (v8.20.10#820010)