[jira] Created: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

View: New views
7 Messages — Rating Filter:   Alert me  

[jira] Created: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When trying to reuse version label in transaction, exception is thrown
----------------------------------------------------------------------

                 Key: JCR-1587
                 URL: https://issues.apache.org/jira/browse/JCR-1587
             Project: Jackrabbit
          Issue Type: Bug
          Components: versioning
    Affects Versions: core 1.4.3, core 1.4.4
         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
Java version: 1.6.0_06
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
            Reporter: Roman Puchkovskiy


Following sequence causes failure:
1. first transaction:
  1.1 create versionable node
  1.2 create version 1 of this node
2. second transaction:
  2.1 create version 2 of this node
  2.2 assign a label to version 2
3. third transaction:
  3.1 restore a node to version 1
  3.2 remove version 2
  3.3 make version 3 of  same node
  3.4 assign same label (which was assigned to version 2) to version 3 -> fails

Same sequence which does not use transactions at all works fine.
Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Roman Puchkovskiy updated JCR-1587:
-----------------------------------

    Attachment: test-reassign-version-label-in-tx.zip

This is a Maven project. To run tests, unpack and run 'mvn test'.
Test contains two methods: one of them does not use transactions (passes), another uses transactions (fails).

> When trying to reuse version label in transaction, exception is thrown
> ----------------------------------------------------------------------
>
>                 Key: JCR-1587
>                 URL: https://issues.apache.org/jira/browse/JCR-1587
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
> Java version: 1.6.0_06
> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>            Reporter: Roman Puchkovskiy
>         Attachments: test-reassign-version-label-in-tx.zip
>
>
> Following sequence causes failure:
> 1. first transaction:
>   1.1 create versionable node
>   1.2 create version 1 of this node
> 2. second transaction:
>   2.1 create version 2 of this node
>   2.2 assign a label to version 2
> 3. third transaction:
>   3.1 restore a node to version 1
>   3.2 remove version 2
>   3.3 make version 3 of  same node
>   3.4 assign same label (which was assigned to version 2) to version 3 -> fails
> Same sequence which does not use transactions at all works fine.
> Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596405#action_12596405 ]

Marcel Reutegger commented on JCR-1587:
---------------------------------------

The sequence of checking the various places where an ItemState can reside is not correct in XAItemStateManager.

E.g. in getItemState() first checks the transaction change log if it contains an item. If the item is not known to the change log the base class (LocalItemStateManager) is called. This means the change logs and item state managers are checked in the following sequence:

1) transaction change log
2) local change log
3) shared item state manager

This is actually wrong and should rather be:

1) local change log
2) transaction change log
3) shared item state manager

The test fails because the property for the version label "2" is marked deleted in the transaction change log, while at the same time is added in the local change log. Because the sequence of the checks is wrong, the version label property is incorrectly reported as destroyed.

> When trying to reuse version label in transaction, exception is thrown
> ----------------------------------------------------------------------
>
>                 Key: JCR-1587
>                 URL: https://issues.apache.org/jira/browse/JCR-1587
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
> Java version: 1.6.0_06
> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>            Reporter: Roman Puchkovskiy
>         Attachments: test-reassign-version-label-in-tx.zip
>
>
> Following sequence causes failure:
> 1. first transaction:
>   1.1 create versionable node
>   1.2 create version 1 of this node
> 2. second transaction:
>   2.1 create version 2 of this node
>   2.2 assign a label to version 2
> 3. third transaction:
>   3.1 restore a node to version 1
>   3.2 remove version 2
>   3.3 make version 3 of  same node
>   3.4 assign same label (which was assigned to version 2) to version 3 -> fails
> Same sequence which does not use transactions at all works fine.
> Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Marcel Reutegger updated JCR-1587:
----------------------------------

    Attachment: JCR-1587.patch

Proposed fix.

All tests pass, including daily integration tests.

Please review.

> When trying to reuse version label in transaction, exception is thrown
> ----------------------------------------------------------------------
>
>                 Key: JCR-1587
>                 URL: https://issues.apache.org/jira/browse/JCR-1587
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
> Java version: 1.6.0_06
> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>            Reporter: Roman Puchkovskiy
>         Attachments: JCR-1587.patch, test-reassign-version-label-in-tx.zip
>
>
> Following sequence causes failure:
> 1. first transaction:
>   1.1 create versionable node
>   1.2 create version 1 of this node
> 2. second transaction:
>   2.1 create version 2 of this node
>   2.2 assign a label to version 2
> 3. third transaction:
>   3.1 restore a node to version 1
>   3.2 remove version 2
>   3.3 make version 3 of  same node
>   3.4 assign same label (which was assigned to version 2) to version 3 -> fails
> Same sequence which does not use transactions at all works fine.
> Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596639#action_12596639 ]

Roman Puchkovskiy commented on JCR-1587:
----------------------------------------

My tests pass too, and application works correctly in point where this issue is concerned. Tested with jackrabbit-core-1.4.4 with patch applied.

> When trying to reuse version label in transaction, exception is thrown
> ----------------------------------------------------------------------
>
>                 Key: JCR-1587
>                 URL: https://issues.apache.org/jira/browse/JCR-1587
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
> Java version: 1.6.0_06
> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>            Reporter: Roman Puchkovskiy
>         Attachments: JCR-1587.patch, test-reassign-version-label-in-tx.zip
>
>
> Following sequence causes failure:
> 1. first transaction:
>   1.1 create versionable node
>   1.2 create version 1 of this node
> 2. second transaction:
>   2.1 create version 2 of this node
>   2.2 assign a label to version 2
> 3. third transaction:
>   3.1 restore a node to version 1
>   3.2 remove version 2
>   3.3 make version 3 of  same node
>   3.4 assign same label (which was assigned to version 2) to version 3 -> fails
> Same sequence which does not use transactions at all works fine.
> Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Marcel Reutegger resolved JCR-1587.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

Committed patch in revision: 656240

> When trying to reuse version label in transaction, exception is thrown
> ----------------------------------------------------------------------
>
>                 Key: JCR-1587
>                 URL: https://issues.apache.org/jira/browse/JCR-1587
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
> Java version: 1.6.0_06
> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>            Reporter: Roman Puchkovskiy
>             Fix For: 1.5
>
>         Attachments: JCR-1587.patch, test-reassign-version-label-in-tx.zip
>
>
> Following sequence causes failure:
> 1. first transaction:
>   1.1 create versionable node
>   1.2 create version 1 of this node
> 2. second transaction:
>   2.1 create version 2 of this node
>   2.2 assign a label to version 2
> 3. third transaction:
>   3.1 restore a node to version 1
>   3.2 remove version 2
>   3.3 make version 3 of  same node
>   3.4 assign same label (which was assigned to version 2) to version 3 -> fails
> Same sequence which does not use transactions at all works fine.
> Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1587) When trying to reuse version label in transaction, exception is thrown

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jukka Zitting updated JCR-1587:
-------------------------------

    Fix Version/s:     (was: 1.5)
                   core 1.4.5

Merged to the 1.4 branch in revision 661624.

> When trying to reuse version label in transaction, exception is thrown
> ----------------------------------------------------------------------
>
>                 Key: JCR-1587
>                 URL: https://issues.apache.org/jira/browse/JCR-1587
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: core 1.4.3, core 1.4.4
>         Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4
> Java version: 1.6.0_06
> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>            Reporter: Roman Puchkovskiy
>             Fix For: core 1.4.5
>
>         Attachments: JCR-1587.patch, test-reassign-version-label-in-tx.zip
>
>
> Following sequence causes failure:
> 1. first transaction:
>   1.1 create versionable node
>   1.2 create version 1 of this node
> 2. second transaction:
>   2.1 create version 2 of this node
>   2.2 assign a label to version 2
> 3. third transaction:
>   3.1 restore a node to version 1
>   3.2 remove version 2
>   3.3 make version 3 of  same node
>   3.4 assign same label (which was assigned to version 2) to version 3 -> fails
> Same sequence which does not use transactions at all works fine.
> Going to attach a test case.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.