[dna-issues] [JBoss JIRA] Updated: (DNA-341) Graph API behavior when removing all property values doesn't reflect that of JCR
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Tue Apr 7 17:21:23 EDT 2009
[ https://jira.jboss.org/jira/browse/DNA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Randall Hauch updated DNA-341:
------------------------------
Attachment: DNA-341.patch
Attached a patch that changes the connector API. Specifically the semantics and a few method signatures of UpdatePropertiesRequest class were changed to no longer assume that an empty property should be removed; rather, the names of properties that are to be removed are tracked explicitly, and the number of values in a property no longer has any relationship to whether the property is to be removed. All connectors were changed to apply these new semantics.
A number of other changes to the connector API were made. New SetPropertyRequest and RemovePropertyRequest requests types were added as being more efficient when a single property is being set or removed. These are optional requests, meaning that the RequestProcessor has default implementations for the corresponding "process" methods that convert the reqeusts to UpdatedPropertiesRequest. Thus, a connector doesn't have to implement these, but it may be more efficient for it to do so.
Also, the Graph batch implementation was improved to optimize adjacent calls to set/remove properties on the same node. In other words, if a batch is used to set a property on node A and then is immediately used to set another property on the same node, the batch will combine the two requests. However, this optimization does not apply if any other operations are performed between the set/remove property operations.
Finally, a minor error was found and corrected in how the connector unit tests reported the (trivial) metrics for creating nodes. The total times (line 2) were correct, but the average and the times for additional nodes (line 3) were all incorrect.
> Graph API behavior when removing all property values doesn't reflect that of JCR
> --------------------------------------------------------------------------------
>
> Key: DNA-341
> URL: https://jira.jboss.org/jira/browse/DNA-341
> Project: DNA
> Issue Type: Bug
> Components: API, Graph, JCR
> Affects Versions: 0.3
> Reporter: Randall Hauch
> Assignee: Randall Hauch
> Priority: Critical
> Fix For: 0.4
>
> Attachments: DNA-341.patch
>
>
> Section 4.7.3 of the JSR-170 specification (version 1.0.1) states:
> Every property must have a value. The range of property states does not include having a "null value", or "no value". Setting a
> property to "null" is equivalent to removing that property. In the case of multi-value properties, the setting of a particular value
> within the array to null results in the removal of that value and the compacting of the array. As a result it is possible to have a multi-
> value property with no values (an empty array). See 7.1.5 Adding and Writing Properties.
> However, currently the Graph API and connector behavior is such that whenever a property is updated (or set) to no values, the property is removed automatically. This means that it is not possible for the Graph API or connectors to support a multi-valued JCR property with no values.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list