You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "sivabalan narayanan (Jira)" <ji...@apache.org> on 2022/04/07 19:59:00 UTC

[jira] [Commented] (HUDI-3798) Allow TransactionManager to work w/ multiple txn owners

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

sivabalan narayanan commented on HUDI-3798:
-------------------------------------------

Findings:

With existing transaction manager impl, the shared variables are accessed/updated only within lock context. i.e. if the caller is able to acquire the lock, the state is updated within transaction manager. and within end transaction, only if the owner matches, the shared state is updated and then lock is released. So, I don't see any issues as such. 

But I found a bug wrt existing txn manager. If end transaction is called by a different caller than who instantiated the lock, it will go ahead and release the lock and end the transaction. So, we need to fix that. 

> Allow TransactionManager to work w/ multiple txn owners
> -------------------------------------------------------
>
>                 Key: HUDI-3798
>                 URL: https://issues.apache.org/jira/browse/HUDI-3798
>             Project: Apache Hudi
>          Issue Type: Task
>            Reporter: sivabalan narayanan
>            Assignee: sivabalan narayanan
>            Priority: Blocker
>             Fix For: 0.11.0
>
>
> As of now, transaction manager is designed in such a way that no two writers can access it concurrently. Some state is being shared among all callers like currentTxnOwnerInstant, lastCompletedTxnOwner. Lets revisit this and ensure lock manager is the one which manages the concurrency, but txn manager is just a proxy for it. 
>  
> Also fix the usages of different beginTransaction methods. 
>  
> Ref: [https://github.com/apache/hudi/pull/4363#pullrequestreview-915499359]
>  
>  



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