umustafi commented on code in PR #3636:
URL: https://github.com/apache/gobblin/pull/3636#discussion_r1099374152


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -330,8 +330,9 @@ public AddSpecResponse onAddSpec(Spec addedSpec) {
 
     // Check quota limits against run immediately flows or adhoc flows before 
saving the schedule
     // In warm standby mode, this quota check will happen on restli API layer 
when we accept the flow
-    if (!this.warmStandbyEnabled && 
(!jobConfig.containsKey(ConfigurationKeys.JOB_SCHEDULE_KEY) || 
PropertiesUtils.getPropAsBoolean(jobConfig, 
ConfigurationKeys.FLOW_RUN_IMMEDIATELY, "false"))) {
-      // This block should be reachable only for the first execution for the 
adhoc flows (flows that either do not have a schedule or have 
runImmediately=true.
+    if (!this.warmStandbyEnabled && 
!jobConfig.containsKey(ConfigurationKeys.JOB_SCHEDULE_KEY)) {
+      // This block should be reachable only for the execution for the adhoc 
flows
+      // For flow that has scheduler but run-immediately set to be true, we 
won't check teh quota as we will use a different execution id later

Review Comment:
   typo `the`



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -330,8 +330,9 @@ public AddSpecResponse onAddSpec(Spec addedSpec) {
 
     // Check quota limits against run immediately flows or adhoc flows before 
saving the schedule

Review Comment:
   lets update this to be adhoc flows only



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -330,8 +330,9 @@ public AddSpecResponse onAddSpec(Spec addedSpec) {
 
     // Check quota limits against run immediately flows or adhoc flows before 
saving the schedule
     // In warm standby mode, this quota check will happen on restli API layer 
when we accept the flow

Review Comment:
   afaik 
`[FlowConfigV2ResourceLocalHandler](https://github.com/apache/gobblin/blob/69f3f9c33c9679d723c447fbe626db8f1b7afa9e/gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowConfigV2ResourceHandlerWithWarmStandby.java#L106)`
  and 
`[FlowCatalog](https://github.com/apache/gobblin/blob/69f3f9c33c9679d723c447fbe626db8f1b7afa9e/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_catalog/FlowCatalog.java#L403
 )` are not doing quota check on adding the spec. Where do we do the check in 
API layer? 



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