[dna-issues] [JBoss JIRA] Commented: (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
Fri Apr 3 16:35:22 EDT 2009
[ https://jira.jboss.org/jira/browse/DNA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460564#action_12460564 ]
Randall Hauch commented on DNA-341:
-----------------------------------
The UpdatePropertiesRequest and RemovePropertiesRequest probably need to be combined. The pros:
- It clearly and singularly defines the semantics (a remove is a remove, a set is a set, etc.)
- Reduce by one the number of RequestProcessor.process(...) methods that an implementation must provide.
- Separate requests may mean very similar code in process(UpdatePropertiesRequest) and process(RemovePropertiesRequest), so combining means that connectors are less likely to have duplicate code
- Combining means that more property changes (adds, sets, and removes) are handled in one RequestProcessor.process(...) method, which for some connector implementations could be far more efficient than if there were multiple process(...) method invocations (e.g., one invocation with an UpdatePropertiesRequest and a second for a RemovePropertiesRequest).
- Allows for the existing Graph optimization to reuse a single request for adjacent add/set/remove operations on the same node
- Any future optimization logic (request planning) might be simpler with a single merged request than with separate kinds of requests
- We can introduce other optional requests (those where the corresponding RequestProcessor.process(...) method has a default implementation) that have more optimal structures for a single operation.
The cons:
- Existing connectors have to be changed. (This may be moot anyway, since they have to be changed to some degree in order to fix this issue.)
- The combined request may have a larger size for doing only one operation
> 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
>
>
> 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