You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/12 00:42:00 UTC

[jira] [Work logged] (GOBBLIN-1656) Return different Http Status on GaaS if Quota is Exceeded

     [ https://issues.apache.org/jira/browse/GOBBLIN-1656?focusedWorklogId=789798&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-789798 ]

ASF GitHub Bot logged work on GOBBLIN-1656:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Jul/22 00:41
            Start Date: 12/Jul/22 00:41
    Worklog Time Spent: 10m 
      Work Description: Will-Lo commented on code in PR #3516:
URL: https://github.com/apache/gobblin/pull/3516#discussion_r918451533


##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java:
##########
@@ -133,7 +134,13 @@ public CreateResponse createFlowConfig(FlowConfig flowConfig, boolean triggerLis
     if (!flowConfig.hasSchedule() && this.flowCatalog.exists(flowSpec.getUri())) {
       return new CreateResponse(new ComplexResourceKey<>(flowConfig.getId(), new EmptyRecord()), HttpStatus.S_409_CONFLICT);
     } else {
-      this.flowCatalog.put(flowSpec, triggerListener);
+      try {
+        this.flowCatalog.put(flowSpec, triggerListener);
+      } catch (Throwable e) {
+        if (e instanceof QuotaExceededException) {

Review Comment:
   We need to catch the generic throwable underneath though due to the function definition of the callback, but I think this look cleaner so I can add this.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 789798)
    Time Spent: 5h  (was: 4h 50m)

> Return different Http Status on GaaS if Quota is Exceeded
> ---------------------------------------------------------
>
>                 Key: GOBBLIN-1656
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1656
>             Project: Apache Gobblin
>          Issue Type: New Feature
>          Components: gobblin-service
>            Reporter: William Lo
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 5h
>  Remaining Estimate: 0h
>
> GaaS has quota limits for proxy users and flowGroups.
> When a user wants to create a flow that exceeds their specified quota, the flow should
> 1) Not be run
> 2) Return a http status code (i.e. 503) due to exceeding the resource. This allows clients to implement some wait and retry functionality



--
This message was sent by Atlassian Jira
(v8.20.10#820010)