Lina, Note that there my be multiple path values, but only a single path value for a given object since paths are stored as a set. The guarantee is provided by set semantics. We do not particularly care about duplicates across multiple objects.
- Alex. > On Apr 19, 2017, at 1:09 PM, Na Li <[email protected]> wrote: > > Sasha, > > For now, the path entry in DB is owned by each Authz object. > > The DB change Kalyan made does not guarantee that with the same path value, > there is only one instance of such path entry in DB in > https://issues.apache.org/jira/browse/SENTRY-1629 > <https://issues.apache.org/jira/browse/SENTRY-1629> (He will address this > later). Therefore, there could be two or more entries that have the same path > value. So Hao has to change the equals() to find the path instance owned by > authz Object. > > > > Thanks, > > Lina > > On Wed, Apr 19, 2017 at 2:05 PM, Hao Hao <[email protected] > <mailto:[email protected]>> wrote: > Hi Alex, > > I changed MPath class to include pathID to have correct MPath equality > comparison. Since the original equals() definition only compares 'path' > which for different MPath object it may have the same value. > > For pathID (primary key) assignment I change it to be auto-increment by > specifying value-strategy to be "increment ". > > Please let me know if you think any of the change is not reasonable. Thanks! > > Best, > Hao > > On Wed, Apr 19, 2017 at 11:37 AM, Alexander Kolbasov <[email protected] > <mailto:[email protected]>> > wrote: > > > Hao, > > > > Can you clarify the changes you propose for MPath class and related > > package.jdo changes for SENTRY-1587? > > > > You suggest changing the identity type from "database" to "application", > > but the pathId is not initialized in constructor and not assigned anywhere. > > What is your intention here? > > > > Also you changed the equals() method to include ID. What kind of equality > > do you require - equality by path value or equality by identity? What is > > your thinking here? > > > > This is in regards to the code review https://reviews.apache.org/r/58412 > > <https://reviews.apache.org/r/58412>. > > > > Thanks, > > > > - Alex > > >
