oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OODT-195) XMLValidationLayer: Elements Map and ProductType to Element Map can become inconsistent
Date Sun, 29 May 2011 19:24:47 GMT

     [ https://issues.apache.org/jira/browse/OODT-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Chris A. Mattmann resolved OODT-195.

    Resolution: Fixed

- ok, I couldn't resist :-) In r1128940, I committed my proposed fix for this. Note that I
had to modify the unit test I committed earlier as I was getting the elements using the wrong
string. Now, all tests pass (so regression going forward).

I didn't make the methods synchronized yet. Let's see how this plays out and if we need it
then address it then.

Thanks to Michael for concisely reporting the issue, and to B. Foster for the discussion!

> XMLValidationLayer: Elements Map and ProductType to Element Map can become inconsistent
> ---------------------------------------------------------------------------------------
>                 Key: OODT-195
>                 URL: https://issues.apache.org/jira/browse/OODT-195
>             Project: OODT
>          Issue Type: Bug
>          Components: file manager
>    Affects Versions: 0.1-incubating, 0.2
>            Reporter: Michael Starch
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 0.3
>         Attachments: OODT-195.unittest.mattmann.052911.patch.txt
> XMLValidation layer does not update the the product-type-to-element map upon element
modification or removal.  Thus the product-type-to-element map can contain elements that have
been removed, or modified, leaving it inconsistent with the elements contained in the element
> As suggested by Brian Foster:
> The product-type-to-element map can be changed to map ProductType to ElemementId strings.
 Then the actual element can be obtained from the element map.  The product-type-to-element
map would still need to be updated (see below solution) on removal of an element to ensure
that it contains no elements previously removed.
> An alternative solution:
> Update both maps upon modification or removal.  This way allows both modified elements
and removed elements are handled in the exact same manner. This fix will fail if the element
map is modified outside of the removeElement or modifyElement methods.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message