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

Alexander Kolbasov commented on SENTRY-1795:
--------------------------------------------

Note that now we are ding the following in each transaction:

1) Get the current ID value
2) Increment it by one
3) Store with a new ID value

This guarantees that we never have holes since if transaction succeeds the new 
value will always be the old value incremented by one. If another instance is 
doing the same thing concurrently, one of them will fail because the ID is a 
primary key and no duplicates are allowed, so one transaction succeeds and 
another is failed and retried.


> Delta tables should not have holes
> ----------------------------------
>
>                 Key: SENTRY-1795
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1795
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>    Affects Versions: sentry-ha-redesign
>            Reporter: Alexander Kolbasov
>            Assignee: Lei (Eddy) Xu
>              Labels: hdfs, sentry-ha
>             Fix For: sentry-ha-redesign
>
>         Attachments: SENTRY-1795.00-sentry-ha-redesign.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> SENTRY-1792 explains how we can have holes in the delta tables. We should 
> plug these holes.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to