Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1243#discussion_r118223887
  
    --- Diff: src/backend/executor/nodeShareInputScan.c ---
    @@ -666,6 +717,29 @@ static int retry_write(int fd, char *buf, int wsize)
        return 0;
     }
     
    +
    +
    +/*
    + * generate_lock_file_name
    + *
    + * Called by reader or writer to make the unique lock file name.
    + */
    +void generate_lock_file_name(char* p, int size, int share_id, const char* 
name)
    +{
    +   if (strncmp(name , "writer", 6) == 0)
    --- End diff --
    
    My habit is:
    
    strncmp(name , "writer", strlen("writer")) == 0
    
    So you do not need to calculate the string length yourself (compiler does 
this for you).
    
    Anyway, up to you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to