[ 
https://issues.apache.org/jira/browse/TRAFODION-2097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15373212#comment-15373212
 ] 

ASF GitHub Bot commented on TRAFODION-2097:
-------------------------------------------

Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/589#discussion_r70474212
  
    --- Diff: core/sql/exp/ExpLOBaccess.cpp ---
    @@ -1359,22 +1361,26 @@ Ex_Lob_Error ExLob::openDataCursor(char *file, 
LobsCursorType type, Int64 range,
         it = lobCursors_.find(string(file, strlen(file))); // to get the 
actual cursor object in the map
     
         if (!fdData_ || (openFlags_ != O_RDONLY)) 
    -    {
    -      hdfsCloseFile(fs_, fdData_);
    -      fdData_ = NULL;
    -      openFlags_ = O_RDONLY;
    -      fdData_ = hdfsOpenFile(fs_, lobDataFile_, openFlags_, 0, 0, 0);
    -      if (!fdData_) {
    -        openFlags_ = -1;
    -        lobCursorLock_.unlock();
    -        return LOB_DATA_FILE_OPEN_ERROR;
    +      {
    +        hdfsCloseFile(fs_, fdData_);
    +        fdData_ = NULL;
    +        openFlags_ = O_RDONLY;
    +        fdData_ = hdfsOpenFile(fs_, lobDataFile_, openFlags_, 0, 0, 0);
    +       
    +        if (!fdData_)
    +          {
    +            openFlags_ = -1;
    +            *hdfsDetailError = errno;
    --- End diff --
    
    In the function prototype, hdfsDetailError defaults to NULL, So, should we 
check for null before attempting to store errno in there? (An alternative would 
be to make hdfsDetailError a reference parameter instead of a pointer; then the 
caller always has to provide it.)


> Retry logic needed for  methods that do hdfs reads 
> ---------------------------------------------------
>
>                 Key: TRAFODION-2097
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2097
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>    Affects Versions: 2.1-incubating
>            Reporter: Sandhya Sundaresan
>            Assignee: Sandhya Sundaresan
>
> Sometimes hdfsOpenFile returns an EAGAIN on a file when hdfsOpenFile s called 
> for reads. IF EAGAIN is returned,  Trafodion should retry the operation a few 
> times. 
> This was observed in hive/TEST018 automated tests. A sleep was added to get 
> around the issue . But we need to remove the sleep and ensure the selects 
> that happen right afetr the "Unload"s will be able to retry the operation. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to