[
https://issues.apache.org/jira/browse/SENTRY-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15975820#comment-15975820
]
Na Li commented on SENTRY-1643:
-------------------------------
based on
"http://www.datanucleus.org/products/accessplatform_2_1/datanucleus-accessplatform.pdf"
page 101, could setting "key-cache-size" to 1 solve this issue, instead of
letting application manage the Change_ID?
key-cache-size: number of unique identifiers to cache. The keys are
pre-allocated, cached and used on demand. If key-cache-size is greater than 1,
it may generate holes in the object keys in the database, if not all keys are
used. Refer to persistence property
datanucleus.valuegeneration.increment.allocationSize. No. Defaults to 10
...................................................................................................................................................
> AutoIncrement ChangeID of MSentryPermChange/MSentryPathChange may be
> error-prone
> --------------------------------------------------------------------------------
>
> Key: SENTRY-1643
> URL: https://issues.apache.org/jira/browse/SENTRY-1643
> Project: Sentry
> Issue Type: Sub-task
> Components: Hdfs Plugin
> Affects Versions: sentry-ha-redesign
> Reporter: Hao Hao
> Assignee: Lei (Eddy) Xu
> Priority: Critical
> Fix For: sentry-ha-redesign
>
> Attachments: SENTRY-1643.00-sentry-ha-redesign.patch,
> SENTRY-1643.01-sentry-ha-redesign.patch,
> SENTRY-1643.02-sentry-ha-redesign.patch
>
>
> In MSentryPermChange/MSentryPathChange table, the changeID field is
> auto-increment.
> {noformat}
> <field name="changeID" primary-key="true" value-strategy="increment">
> <column name="CHANGE_ID" jdbc-type="BIGINT" allows-null="false"/>
> </field>{noformat}
> However, found through the integration unit test TestHDFSIntegration, the
> value does not seem to be correctly auto increased. e.g Instead of increasing
> by one for each new entry, it increased by some unexpected number.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)