You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Alok Lal (JIRA)" <ji...@apache.org> on 2015/06/27 00:57:05 UTC

[jira] [Created] (RANGER-572) Service def helper's cache should look at not only the timestamp but also the version

Alok Lal created RANGER-572:
-------------------------------

             Summary: Service def helper's cache should look at not only the timestamp but also the version
                 Key: RANGER-572
                 URL: https://issues.apache.org/jira/browse/RANGER-572
             Project: Ranger
          Issue Type: Bug
    Affects Versions: 0.5.0
            Reporter: Alok Lal


we store only the seconds part of the update time in the database.  As a result if a service def helper class is used within the same second after an update then it could get stale data.  In worse case the transaction may error out, e.g. an attempt is made to create a service right after a service def has been updated, say, with a new resource added to it.

A better way is for service def helper to use not only the update timestamp but also the version while checking for uniqueness.  If the current logic if updating version becomes robust enough then perhaps we can only use version number.



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