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

Peter Cseh commented on OOZIE-2629:
-----------------------------------

Thanks for the patch!
I don't know if this would solve the issue though.
If I see correctly, the [SharelibService only 
checks|https://github.com/apache/oozie/blob/master/core/src/main/java/org/apache/oozie/service/ShareLibService.java#L679]
 for the {{lib_}} prefix so it would pick up the the {{lib_TIMESTAMP_tmp}} 
folder as well.

And the leftover folders won't be purged as they are not matching the sharelib 
purge filter: 
https://github.com/apache/oozie/blob/master/core/src/main/java/org/apache/oozie/service/ShareLibService.java#L471

I think it would be a better solution to add the {{tmp_]} prefix while 
uploading and add a rollback mechanism to delete the temp folder if an 
exception occurrs during upload.

> Get OozieShareLibCLI to perform a final rename to destPath when creating a 
> Sharelib
> -----------------------------------------------------------------------------------
>
>                 Key: OOZIE-2629
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2629
>             Project: Oozie
>          Issue Type: Improvement
>    Affects Versions: 4.3.0
>            Reporter: Yishan Yang
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: OOZIE-2629-1.patch, OOZIE-2629-2.patch, 
> OOZIE-2629-3.patch, OOZIE-2629-4.patch
>
>
> Change the OozieShareLibCLI to perform a final 'rename' to avoid a condition 
> where 'half' of the sharelib could exist during sharelib installation, if 
> Oozie attempts to run a workflow at the same time as the sharelib 
> installation. Oozie will only start if the sharelib exists, but this by 
> itself is not enough since the sharelib could be in an unusable state.



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

Reply via email to