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

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

                Author: ASF GitHub Bot
            Created on: 25/Mar/22 17:10
            Start Date: 25/Mar/22 17:10
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on a change in pull request #3486:
URL: https://github.com/apache/gobblin/pull/3486#discussion_r835463106



##########
File path: 
gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceSource.java
##########
@@ -223,6 +224,15 @@ protected void addLineageSourceInfo(SourceState 
sourceState, SourceEntity entity
       }
     } catch (Exception e) {
       throw new RuntimeException(e);
+    } finally {
+      if(salesforceExtractor != null) {
+        try {
+          // Only close connection here since we don't want to update the high 
watermark for the workUnitState here

Review comment:
       I specifically call closeConnection instead close method is because in 
close method, we first set the high watermark for the workunitState and then 
call closeConnection. Although I see we create a new workunitState when 
creating the extractor and setting HWM for that should not affect the 
correctness, I want to avoid any risk in the future and only call 
closeConnection to close the resources 




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


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

    Worklog Id:     (was: 747876)
    Time Spent: 2h 20m  (was: 2h 10m)

> Make RestApiConnector be able to close the connection finally
> -------------------------------------------------------------
>
>                 Key: GOBBLIN-1616
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1616
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> In RestApiConnector, we only consume the HttpEntity but not close the 
> response, which potentially leave the socket as CLOSE_WAIT status and eat up 
> the resources. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to