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

[jira] [Commented] (HUDI-1794) Generating a new instant time in HoodieActiveTimeline is not thread safe

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

ASF GitHub Bot commented on HUDI-1794:
--------------------------------------

prashantwason commented on pull request #2819:
URL: https://github.com/apache/hudi/pull/2819#issuecomment-894617851


   @vinothchandar @ssdong This is ready for a review again.


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Generating a new instant time in HoodieActiveTimeline is not thread safe
> ------------------------------------------------------------------------
>
>                 Key: HUDI-1794
>                 URL: https://issues.apache.org/jira/browse/HUDI-1794
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Prashant Wason
>            Assignee: Prashant Wason
>            Priority: Major
>              Labels: pull-request-available, sev:high
>
> When generating a new instant time in HoodieActiveTimeline, a static instance of SimpleDateFormat is used. This class is not thread safe.
> We have a production usecase where multiple HUDI datasets are processed in parallel in different threads of a ThreadPool. Each of these threads creates its own SparkRDDBackedWriteClient and calls startCommit() which generates a new commit time. Because SimpleDateFormat is not thread safe, we get corrupted instant times in several threads.
> The solution is to use a thread-specific instance of the SimpleDateFormat for generating new instant times. 
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)